diff --git "a/bird-queries-validation.json" "b/bird-queries-validation.json" --- "a/bird-queries-validation.json" +++ "b/bird-queries-validation.json" @@ -2,7 +2,9 @@ { "query_id": 0, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm" + ], "query": "What is the highest eligible free rate for K-12 students in the schools in Alameda County?", "answer": "SELECT `Free Meal Count (K-12)` / `Enrollment (K-12)` FROM frpm WHERE `County Name` = 'Alameda' ORDER BY (CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)`) DESC LIMIT 1", "difficulty": "simple", @@ -11,7 +13,9 @@ { "query_id": 1, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm" + ], "query": "Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.", "answer": "SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3", "difficulty": "moderate", @@ -20,7 +24,10 @@ { "query_id": 2, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Please list the zip code of all the charter schools in Fresno County Office of Education.", "answer": "SELECT T2.Zip FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`District Name` = 'Fresno County Office of Education' AND T1.`Charter School (Y/N)` = 1", "difficulty": "simple", @@ -29,7 +36,10 @@ { "query_id": 3, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the unabbreviated mailing address of the school with the highest FRPM count for K-12 students?", "answer": "SELECT T2.MailStreet FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 1", "difficulty": "simple", @@ -38,7 +48,10 @@ { "query_id": 4, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.", "answer": "SELECT T2.Phone FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`Charter School (Y/N)` = 1 AND T2.OpenDate > '2000-01-01'", "difficulty": "moderate", @@ -47,7 +60,10 @@ { "query_id": 5, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "How many schools with an average score in Math under 400 in the SAT test are exclusively virtual?", "answer": "SELECT COUNT(DISTINCT T2.School) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' AND T1.AvgScrMath < 400", "difficulty": "simple", @@ -56,7 +72,10 @@ { "query_id": 6, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program.", "answer": "SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magnet = 1 AND T1.NumTstTakr > 500", "difficulty": "simple", @@ -65,7 +84,10 @@ { "query_id": 7, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?", "answer": "SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1", "difficulty": "simple", @@ -74,7 +96,10 @@ { "query_id": 8, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?", "answer": "SELECT NumTstTakr FROM satscores WHERE cds = ( SELECT CDSCode FROM frpm ORDER BY `FRPM Count (K-12)` DESC LIMIT 1 )", "difficulty": "simple", @@ -83,7 +108,10 @@ { "query_id": 9, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded?", "answer": "SELECT COUNT(T2.`School Code`) FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath > 560 AND T2.`Charter Funding Type` = 'Directly funded'", "difficulty": "simple", @@ -92,7 +120,10 @@ { "query_id": 10, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "For the school with the highest average score in Reading in the SAT test, what is its FRPM count for students aged 5-17?", "answer": "SELECT T2.`FRPM Count (Ages 5-17)` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrRead DESC LIMIT 1", "difficulty": "simple", @@ -101,7 +132,10 @@ { "query_id": 11, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Please list the codes of the schools with a total enrollment of over 500.", "answer": "SELECT T2.CDSCode FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` + T2.`Enrollment (Ages 5-17)` > 500", "difficulty": "simple", @@ -110,7 +144,10 @@ { "query_id": 12, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "Among the schools with an SAT excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17?", "answer": "SELECT MAX(CAST(T1.`Free Meal Count (Ages 5-17)` AS REAL) / T1.`Enrollment (Ages 5-17)`) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr > 0.3", "difficulty": "moderate", @@ -119,7 +156,10 @@ { "query_id": 13, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "Please list the phone numbers of the schools with the top 3 SAT excellence rate.", "answer": "SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr DESC LIMIT 3", "difficulty": "simple", @@ -128,7 +168,10 @@ { "query_id": 14, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "List the top five schools, by descending order, from the highest to the lowest, the most number of Enrollment (Ages 5-17). Please give their NCES school identification number.", "answer": "SELECT T1.NCESSchool FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.`Enrollment (Ages 5-17)` DESC LIMIT 5", "difficulty": "simple", @@ -137,7 +180,10 @@ { "query_id": 15, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "Which active district has the highest average score in Reading?", "answer": "SELECT T1.District FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Active' ORDER BY T2.AvgScrRead DESC LIMIT 1", "difficulty": "simple", @@ -146,7 +192,10 @@ { "query_id": 16, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "How many schools in merged Alameda have number of test takers less than 100?", "answer": "SELECT COUNT(T1.CDSCode) FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.StatusType = 'Merged' AND T2.NumTstTakr < 100 AND T1.County = 'Alameda'", "difficulty": "simple", @@ -155,7 +204,10 @@ { "query_id": 17, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "What is the charter number of the school that the average score in Writing is 499?", "answer": "SELECT T1.CharterNum FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite = 499", "difficulty": "simple", @@ -164,7 +216,10 @@ { "query_id": 18, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "How many schools in Contra Costa (directly funded) have number of test takers not more than 250?", "answer": "SELECT COUNT(T1.CDSCode) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`County Name` = 'Contra Costa' AND T2.NumTstTakr <= 250", "difficulty": "simple", @@ -173,7 +228,10 @@ { "query_id": 19, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "What is the phone number of the school that has the highest average score in Math?", "answer": "SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY T2.AvgScrMath DESC LIMIT 1", "difficulty": "simple", @@ -182,7 +240,10 @@ { "query_id": 20, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "How many schools in Amador which the Low Grade is 9 and the High Grade is 12?", "answer": "SELECT COUNT(T1.`School Name`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Amador' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12", "difficulty": "simple", @@ -191,7 +252,9 @@ { "query_id": 21, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm" + ], "query": "In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?", "answer": "SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `Free Meal Count (K-12)` < 700", "difficulty": "simple", @@ -200,7 +263,9 @@ { "query_id": 22, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores" + ], "query": "Which school in Contra Costa has the highest number of test takers?", "answer": "SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND sname IS NOT NULL ORDER BY NumTstTakr DESC LIMIT 1", "difficulty": "simple", @@ -209,7 +274,10 @@ { "query_id": 23, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "List the names of schools with more than 30 difference in enrollements between K-12 and ages 5-17? Please also give the full street adress of the schools.", "answer": "SELECT T1.School, T1.StreetAbr FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Enrollment (K-12)` - T2.`Enrollment (Ages 5-17)` > 30", "difficulty": "moderate", @@ -218,7 +286,10 @@ { "query_id": 24, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "Give the names of the schools with the percent eligible for free meals in K-12 is more than 0.1 and test takers whose test score is greater than or equal to 1500?", "answer": "SELECT T2.`School Name` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE CAST(T2.`Free Meal Count (K-12)` AS REAL) / T2.`Enrollment (K-12)` > 0.1 AND T1.NumGE1500 > 0", "difficulty": "moderate", @@ -227,7 +298,10 @@ { "query_id": 25, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "satscores" + ], "query": "Name schools in Riverside which the average of average math score for SAT is grater than 400, what is the funding type of these schools?", "answer": "SELECT T1.sname, T2.`Charter Funding Type` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T2.`District Name` LIKE 'Riverside%' GROUP BY T1.sname, T2.`Charter Funding Type` HAVING CAST(SUM(T1.AvgScrMath) AS REAL) / COUNT(T1.cds) > 400", "difficulty": "moderate", @@ -236,7 +310,10 @@ { "query_id": 26, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "State the names and full communication address of high schools in Monterey which has more than 800 free or reduced price meals for ages 15-17?", "answer": "SELECT T1.`School Name`, T2.Zip, T2.Street, T2.City, T2.State FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Monterey' AND T1.`Free Meal Count (Ages 5-17)` > 800 AND T1.`School Type` = 'High Schools (Public)'", "difficulty": "moderate", @@ -245,7 +322,10 @@ { "query_id": 27, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "satscores", + "schools" + ], "query": "What is the average score in writing for the schools that were opened after 1991 or closed before 2000? List the school names along with the score. Also, list the communication number of the schools if there is any.", "answer": "SELECT T2.School, T1.AvgScrWrite, T2.Phone, strftime('%Y', T2.OpenDate), strftime('%Y', T2.ClosedDate) FROM schools AS T2 LEFT JOIN satscores AS T1 ON T2.CDSCode = T1.cds WHERE strftime('%Y', T2.OpenDate) > '1991' AND strftime('%Y', T2.ClosedDate) < '2000'", "difficulty": "moderate", @@ -254,7 +334,10 @@ { "query_id": 28, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Consider the average difference between K-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and DOC type of schools which has a difference above this average.", "answer": "SELECT T2.School, T2.DOC FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.FundingType = 'Locally funded' AND (T1.`Enrollment (K-12)` - T1.`Enrollment (Ages 5-17)`) > (SELECT AVG(T3.`Enrollment (K-12)` - T3.`Enrollment (Ages 5-17)`) FROM frpm AS T3 INNER JOIN schools AS T4 ON T3.CDSCode = T4.CDSCode WHERE T4.FundingType = 'Locally funded')", "difficulty": "challenging", @@ -263,7 +346,10 @@ { "query_id": 29, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "When did the first-through-twelfth-grade school with the largest enrollment open?", "answer": "SELECT T2.OpenDate FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1", "difficulty": "simple", @@ -272,7 +358,10 @@ { "query_id": 30, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?", "answer": "SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5", "difficulty": "simple", @@ -281,7 +370,9 @@ { "query_id": 31, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm" + ], "query": "What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12?", "answer": "SELECT CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)` FROM frpm ORDER BY `Enrollment (K-12)` DESC LIMIT 9, 2", "difficulty": "moderate", @@ -290,7 +381,10 @@ { "query_id": 32, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the eligible free or reduced price meal rate for the top 5 schools in grades 1-12 with the highest free or reduced price meal count of the schools with the ownership code 66?", "answer": "SELECT CAST(T1.`FRPM Count (K-12)` AS REAL) / T1.`Enrollment (K-12)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.SOC = 66 ORDER BY T1.`FRPM Count (K-12)` DESC LIMIT 5", "difficulty": "moderate", @@ -299,7 +393,10 @@ { "query_id": 33, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "If there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? Include the name of the school.", "answer": "SELECT T2.Website, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000 AND T2.Website IS NOT NULL", "difficulty": "moderate", @@ -308,7 +405,10 @@ { "query_id": 34, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the free rate for students between the ages of 5 and 17 at the school run by Kacey Gibson?", "answer": "SELECT CAST(T2.`Free Meal Count (Ages 5-17)` AS REAL) / T2.`Enrollment (Ages 5-17)` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.AdmFName1 = 'Kacey' AND T1.AdmLName1 = 'Gibson'", "difficulty": "moderate", @@ -317,7 +417,10 @@ { "query_id": 35, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12?", "answer": "SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Charter School (Y/N)` = 1 ORDER BY T1.`Enrollment (K-12)` ASC LIMIT 1", "difficulty": "moderate", @@ -326,7 +429,10 @@ { "query_id": 36, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "Under whose administration does the school with the highest number of test takers whose total SAT Scores are greater or equal to 1500 belong to? Indicate his or her full name.", "answer": "SELECT T2.AdmFName1, T2.AdmLName1, T2.AdmFName2, T2.AdmLName2, T2.AdmFName3, T2.AdmLName3 FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1", "difficulty": "challenging", @@ -335,7 +441,10 @@ { "query_id": 37, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the complete address of the school with the lowest excellence rate? Indicate the Street, City, Zip and State.", "answer": "SELECT T2.Street, T2.City, T2.Zip, T2.State FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY CAST(T1.NumGE1500 AS REAL) / T1.NumTstTakr ASC LIMIT 1", "difficulty": "moderate", @@ -344,7 +453,10 @@ { "query_id": 38, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?", "answer": "SELECT T2.Website FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr BETWEEN 2000 AND 3000 AND T2.County = 'Los Angeles'", "difficulty": "simple", @@ -353,7 +465,10 @@ { "query_id": 39, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980?", "answer": "SELECT AVG(T1.NumTstTakr) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE strftime('%Y', T2.OpenDate) = '1980' AND T2.County = 'Fresno'", "difficulty": "simple", @@ -362,7 +477,10 @@ { "query_id": 40, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the telephone number for the school with the lowest average score in reading in Fresno Unified?", "answer": "SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.District = 'Fresno Unified' AND T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1", "difficulty": "moderate", @@ -371,7 +489,10 @@ { "query_id": 41, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "Which exclusively virtual schools have the top 5 highest average reading scores?", "answer": "SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' ORDER BY T1.AvgScrRead DESC LIMIT 5", "difficulty": "simple", @@ -380,7 +501,10 @@ { "query_id": 42, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the type of education offered in the school who scored the highest average in Math?", "answer": "SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1", "difficulty": "simple", @@ -389,7 +513,10 @@ { "query_id": 43, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?", "answer": "SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1", "difficulty": "moderate", @@ -398,7 +525,10 @@ { "query_id": 44, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the average writing score of the school who has the highest number of test takers whose total SAT sscores are greater or equal to 1500? Indicate the city to where the school is situated.", "answer": "SELECT T1.AvgScrWrite, T2.City FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1", "difficulty": "simple", @@ -407,7 +537,10 @@ { "query_id": 45, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores.", "answer": "SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'", "difficulty": "moderate", @@ -416,7 +549,10 @@ { "query_id": 46, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Which state special schools have the highest number of enrollees from grades 1 through 12?", "answer": "SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1", "difficulty": "simple", @@ -425,7 +561,9 @@ { "query_id": 47, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?", "answer": "SELECT CAST(COUNT(School) AS REAL) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND strftime('%Y', OpenDate) = '1980'", "difficulty": "moderate", @@ -434,7 +572,9 @@ { "query_id": 48, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?", "answer": "SELECT CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'", "difficulty": "moderate", @@ -443,7 +583,9 @@ { "query_id": 49, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.", "answer": "SELECT DISTINCT County, School, ClosedDate FROM schools WHERE County = ( SELECT County FROM schools WHERE StatusType = 'Closed' GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1 ) AND StatusType = 'Closed' AND school IS NOT NULL", "difficulty": "moderate", @@ -452,7 +594,10 @@ { "query_id": 50, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the postal street address for the school with the 6th highest Math average? Indicate the school's name.", "answer": "SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 5, 1", "difficulty": "simple", @@ -461,7 +606,10 @@ { "query_id": 51, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "In which mailing street address can you find the school that has the lowest average score in reading? Also give the school's name.", "answer": "SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1", "difficulty": "simple", @@ -470,7 +618,10 @@ { "query_id": 52, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?", "answer": "SELECT COUNT(T1.cds) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Lakeport' AND (T1.AvgScrRead + T1.AvgScrMath + T1.AvgScrWrite) >= 1500", "difficulty": "simple", @@ -479,7 +630,10 @@ { "query_id": 53, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "How many test takers are there at the school/s whose mailing city address is in Fresno?", "answer": "SELECT T1.NumTstTakr FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Fresno'", "difficulty": "simple", @@ -488,7 +642,9 @@ { "query_id": 54, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.", "answer": "SELECT School, MailZip FROM schools WHERE AdmFName1 = 'Avetik' AND AdmLName1 = 'Atoian'", "difficulty": "simple", @@ -497,7 +653,9 @@ { "query_id": 55, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Of the schools with a mailing state address in California, what is the ratio of the schools located in the county of Colusa against the school located in the county of Humboldt?", "answer": "SELECT CAST(SUM(CASE WHEN County = 'Colusa' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN County = 'Humboldt' THEN 1 ELSE 0 END) FROM schools WHERE MailState = 'CA'", "difficulty": "moderate", @@ -506,7 +664,9 @@ { "query_id": 56, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Of all the schools with a mailing state address in California, how many are active in San Joaquin?", "answer": "SELECT COUNT(CDSCode) FROM schools WHERE City = 'San Joaquin' AND MailState = 'CA' AND StatusType = 'Active'", "difficulty": "simple", @@ -515,7 +675,10 @@ { "query_id": 57, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the phone number and extension number for the school that had the 333rd highest average writing score?", "answer": "SELECT T2.Phone, T2.Ext FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrWrite DESC LIMIT 332, 1", "difficulty": "simple", @@ -524,7 +687,9 @@ { "query_id": 58, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name.", "answer": "SELECT Phone, Ext, School FROM schools WHERE Zip = '95203-3704'", "difficulty": "simple", @@ -533,7 +698,9 @@ { "query_id": 59, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?", "answer": "SELECT Website FROM schools WHERE (AdmFName1 = 'Mike' AND AdmLName1 = 'Larson') OR (AdmFName1 = 'Dante' AND AdmLName1 = 'Alvarez')", "difficulty": "simple", @@ -542,7 +709,9 @@ { "query_id": 60, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What are the websites for all the partially virtual chartered schools located in San Joaquin?", "answer": "SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1", "difficulty": "simple", @@ -551,7 +720,9 @@ { "query_id": 61, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "How many chartered schools located in the city of Hickman are owned by the Elementary School District?", "answer": "SELECT COUNT(School) FROM schools WHERE DOC = 52 AND Charter = 1 AND City = 'Hickman'", "difficulty": "simple", @@ -560,7 +731,10 @@ { "query_id": 62, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the total number of non-chartered schools in the county of Los Angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?", "answer": "SELECT COUNT(T2.School) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.Charter = 0 AND CAST(T1.`Free Meal Count (K-12)` AS REAL) * 100 / T1.`Enrollment (K-12)` < 0.18", "difficulty": "challenging", @@ -569,7 +743,9 @@ { "query_id": 63, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "In chartered schools with charter number 00D2, what are the names of all the administrators? Include the name of the school and the city to which it belongs", "answer": "SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'", "difficulty": "simple", @@ -578,7 +754,9 @@ { "query_id": 64, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the total number of schools with a mailing city in Hickman belonging to the charter number 00D4?", "answer": "SELECT COUNT(*) FROM schools WHERE CharterNum = '00D4' AND MailCity = 'Hickman'", "difficulty": "simple", @@ -587,7 +765,9 @@ { "query_id": 65, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?", "answer": "SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN FundingType != 'Locally funded' THEN 1 ELSE 0 END) FROM schools WHERE County = 'Santa Clara' AND Charter = 1", "difficulty": "moderate", @@ -596,7 +776,9 @@ { "query_id": 66, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?", "answer": "SELECT COUNT(School) FROM schools WHERE strftime('%Y', OpenDate) BETWEEN '2000' AND '2005' AND County = 'Stanislaus' AND FundingType = 'Directly funded'", "difficulty": "simple", @@ -605,7 +787,9 @@ { "query_id": 67, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the total amount of Community College District closure in 1989 in the city of San Francisco?", "answer": "SELECT COUNT(School) FROM schools WHERE strftime('%Y', ClosedDate) = '1989' AND City = 'San Francisco' AND DOCType = 'Community College District'", "difficulty": "simple", @@ -614,7 +798,9 @@ { "query_id": 68, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)?", "answer": "SELECT County FROM schools WHERE strftime('%Y', ClosedDate) BETWEEN '1980' AND '1989' AND StatusType = 'Closed' AND SOC = 11 GROUP BY County ORDER BY COUNT(School) DESC LIMIT 1", "difficulty": "moderate", @@ -623,7 +809,9 @@ { "query_id": 69, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Please provide the National Center for Educational Statistics school district identification number for all schools with a School Ownership Code that are part of the State Special Schools.", "answer": "SELECT NCESDist FROM schools WHERE SOC = 31", "difficulty": "simple", @@ -632,7 +820,9 @@ { "query_id": 70, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "How many active and closed District Community Day Schools are there in the county of Alpine?", "answer": "SELECT COUNT(School) FROM schools WHERE (StatusType = 'Closed' OR StatusType = 'Active') AND County = 'Alpine'", "difficulty": "simple", @@ -641,7 +831,10 @@ { "query_id": 71, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the district code for the School that does not offer a magnet program in the city of Fresno?", "answer": "SELECT T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.City = 'Fresno' AND T2.Magnet = 0", "difficulty": "simple", @@ -650,7 +843,10 @@ { "query_id": 72, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "How many students from the ages of 5 to 17 are enrolled at the State Special School school in Fremont for the 2014-2015 academic year?", "answer": "SELECT T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND T1.`Academic Year` BETWEEN 2014 AND 2015", "difficulty": "moderate", @@ -659,7 +855,10 @@ { "query_id": 73, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040?", "answer": "SELECT T1.`FRPM Count (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.MailStreet = 'PO Box 1040' AND T2.SOCType = 'Youth Authority Facilities'", "difficulty": "simple", @@ -668,7 +867,10 @@ { "query_id": 74, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 613360?", "answer": "SELECT MIN(T1.`Low Grade`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.NCESDist = 613360 AND T2.EdOpsCode = 'SPECON'", "difficulty": "moderate", @@ -677,7 +879,10 @@ { "query_id": 75, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school.", "answer": "SELECT T2.EILName, T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Breakfast Provision 2' AND T1.`County Code` = 37", "difficulty": "simple", @@ -686,7 +891,10 @@ { "query_id": 76, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the city location of the high school level school with Lunch Provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of Merced?", "answer": "SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Lunch Provision 2' AND T2.County = 'Merced' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12 AND T2.EILCode = 'HS'", "difficulty": "moderate", @@ -695,7 +903,10 @@ { "query_id": 77, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent (%) Eligible FRPM (Ages 5-17)?", "answer": "SELECT T2.School, T1.`FRPM Count (Ages 5-17)` * 100 / T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'", "difficulty": "moderate", @@ -704,7 +915,9 @@ { "query_id": 78, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the most common type of grade span served in the city of Adelanto?", "answer": "SELECT GSserved FROM schools WHERE City = 'Adelanto' GROUP BY GSserved ORDER BY COUNT(GSserved) DESC LIMIT 1", "difficulty": "simple", @@ -713,7 +926,9 @@ { "query_id": 79, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.", "answer": "SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC LIMIT 1", "difficulty": "moderate", @@ -722,7 +937,10 @@ { "query_id": 80, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the school type of the school with the highest latitude? Indicate the name of the school as well as the latitude coordinates.", "answer": "SELECT T1.`School Type`, T1.`School Name`, T2.Latitude FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.Latitude DESC LIMIT 1", "difficulty": "simple", @@ -731,7 +949,10 @@ { "query_id": 81, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "In which city can you find the school in the state of California with the lowest latitude coordinates and what is its lowest grade? Indicate the school name.", "answer": "SELECT T2.City, T1.`Low Grade`, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.State = 'CA' ORDER BY T2.Latitude ASC LIMIT 1", "difficulty": "moderate", @@ -740,7 +961,9 @@ { "query_id": 82, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the grade span offered in the school with the highest longitude?", "answer": "SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1", "difficulty": "simple", @@ -749,7 +972,10 @@ { "query_id": 83, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade, how many offers Multiple Provision Types? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.", "answer": "SELECT T2.City, COUNT(T2.CDSCode) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.`NSLP Provision Status` = 'Multiple Provision Types' GROUP BY T2.City", "difficulty": "challenging", @@ -758,7 +984,9 @@ { "query_id": 84, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What are the two most common first names among the school administrators? Indicate the district to which they administer.", "answer": "SELECT DISTINCT T1.AdmFName1, T1.District FROM schools AS T1 INNER JOIN ( SELECT admfname1 FROM schools GROUP BY admfname1 ORDER BY COUNT(admfname1) DESC LIMIT 2 ) AS T2 ON T1.AdmFName1 = T2.admfname1", "difficulty": "simple", @@ -767,7 +995,10 @@ { "query_id": 85, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the Percent (%) Eligible Free (K-12) in the school administered by an administrator whose first name is Alusine. List the district code of the school.", "answer": "SELECT T1.`Free Meal Count (K-12)` * 100 / T1.`Enrollment (K-12)`, T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'", "difficulty": "moderate", @@ -776,7 +1007,9 @@ { "query_id": 86, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools" + ], "query": "What is the administrator's last name that oversees the school with Charter number 40? Indicate the district, the county where the school is situated, and the name of the school.", "answer": "SELECT AdmLName1, District, County, School FROM schools WHERE CharterNum = '0040'", "difficulty": "simple", @@ -785,7 +1018,10 @@ { "query_id": 87, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "frpm", + "schools" + ], "query": "What is the e-mail address of the administrator of the school located in the San Bernardino county, District of San Bernardino City Unified that opened between 1/1/2009 to 12/31/2010 whose school types are public Intermediate/Middle Schools and Unified Scools?", "answer": "SELECT T2.AdmEmail1 FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'San Bernardino' AND T2.City = 'San Bernardino' AND T2.DOC = 54 AND strftime('%Y', T2.OpenDate) BETWEEN '2009' AND '2010' AND T2.SOC = 62", "difficulty": "challenging", @@ -794,7 +1030,10 @@ { "query_id": 88, "database_id": "california_schools", - "table_id": "N/A", + "table_id": [ + "schools", + "satscores" + ], "query": "What is the administrator's email address for the school with the highest number of test takers who received SAT scores of at least 1500?Provide the name of the school.", "answer": "SELECT T2.AdmEmail1, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1", "difficulty": "simple", @@ -803,7 +1042,10 @@ { "query_id": 89, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "How many accounts who choose issuance after transaction are staying in East Bohemia region?", "answer": "SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'East Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'", "difficulty": "moderate", @@ -812,7 +1054,11 @@ { "query_id": 90, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "How many accounts who have region in Prague are eligible for loans?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T1.district_id = T3.district_id WHERE T3.A3 = 'Prague'", "difficulty": "simple", @@ -821,7 +1067,9 @@ { "query_id": 91, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "district" + ], "query": "The average unemployment ratio of 1995 and 1996, which one has higher percentage?", "answer": "SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district", "difficulty": "simple", @@ -830,7 +1078,10 @@ { "query_id": 92, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "List out the no. of districts that have female average salary is more than 6000 but less than 10000?", "answer": "SELECT DISTINCT T2.district_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000", "difficulty": "simple", @@ -839,7 +1090,10 @@ { "query_id": 93, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "How many male customers who are living in North Bohemia have average salary greater than 8000?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'North Bohemia' AND T2.A11 > 8000", "difficulty": "moderate", @@ -848,7 +1102,11 @@ { "query_id": 94, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "district" + ], "query": "List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?", "answer": "SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1", "difficulty": "challenging", @@ -857,7 +1115,11 @@ { "query_id": 95, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "district" + ], "query": "List out the account numbers of clients who are youngest and have highest average salary?", "answer": "SELECT T1.account_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.district_id = ( SELECT district_id FROM client ORDER BY birth_date DESC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1", "difficulty": "moderate", @@ -866,7 +1128,10 @@ { "query_id": 96, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "disp" + ], "query": "How many customers who choose statement of weekly issuance are Owner?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'Owner' AND T1.frequency = 'POPLATEK TYDNE'", "difficulty": "simple", @@ -875,7 +1140,10 @@ { "query_id": 97, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "disp" + ], "query": "List out the clients who choose statement of issuance after transaction are Disponent?", "answer": "SELECT T2.client_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND T2.type = 'DISPONENT'", "difficulty": "simple", @@ -884,7 +1152,10 @@ { "query_id": 98, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.", "answer": "SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1", "difficulty": "moderate", @@ -893,7 +1164,10 @@ { "query_id": 99, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "disp", + "loan" + ], "query": "Among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993.", "answer": "SELECT T1.account_id FROM loan AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1993' AND T1.duration = 12 ORDER BY T1.amount DESC LIMIT 1", "difficulty": "moderate", @@ -902,7 +1176,10 @@ { "query_id": 100, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "Among the account opened, how many female customers who were born before 1950 and stayed in Slokolov?", "answer": "SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND STRFTIME('%Y', T2.birth_date) < '1950' AND T1.A2 = 'Slokolov'", "difficulty": "moderate", @@ -911,7 +1188,9 @@ { "query_id": 101, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans" + ], "query": "List out the accounts who have the earliest trading date in 1995 ?", "answer": "SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1", "difficulty": "simple", @@ -920,7 +1199,10 @@ { "query_id": 102, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "account" + ], "query": "State different accounts who have account opening date before 1997 and own an amount of money greater than 3000USD", "answer": "SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T2.date) < '1997' AND T1.amount > 3000", "difficulty": "simple", @@ -929,7 +1211,11 @@ { "query_id": 103, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "card", + "disp" + ], "query": "Which client issued his/her card in 1994/3/3, give his/her client id.", "answer": "SELECT T2.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T3.issued = '1994-03-03'", "difficulty": "simple", @@ -938,7 +1224,10 @@ { "query_id": 104, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans" + ], "query": "The transaction of 840 USD happened in 1998/10/14, when was this account opened?", "answer": "SELECT T1.date FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.amount = 840 AND T2.date = '1998-10-14'", "difficulty": "simple", @@ -947,7 +1236,10 @@ { "query_id": 105, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "There was a loan approved in 1994/8/25, where was that account opened, give the district Id of the branch.", "answer": "SELECT T1.district_id FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date = '1994-08-25'", "difficulty": "simple", @@ -956,7 +1248,10 @@ { "query_id": 106, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans" + ], "query": "What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?", "answer": "SELECT T2.amount FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T1.date = '1996-10-21' ORDER BY T2.amount DESC LIMIT 1", "difficulty": "simple", @@ -965,7 +1260,10 @@ { "query_id": 107, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "What is the gender of the oldest client who opened his/her account in the highest average salary branch?", "answer": "SELECT T2.gender FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id ORDER BY T1.A11 DESC, T2.birth_date ASC LIMIT 1", "difficulty": "simple", @@ -974,7 +1272,10 @@ { "query_id": 108, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "loan" + ], "query": "For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account?", "answer": "SELECT T2.amount FROM loan AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id ORDER BY T1.amount DESC, T2.date ASC LIMIT 1", "difficulty": "simple", @@ -983,7 +1284,10 @@ { "query_id": 109, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "How many clients opened their accounts in Jesenik branch were women?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A2 = 'Jesenik'", "difficulty": "simple", @@ -992,7 +1296,10 @@ { "query_id": 110, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "disp" + ], "query": "What is the disposition id of the client who made 5100 USD transaction in 1998/9/2?", "answer": "SELECT T1.disp_id FROM disp AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.date = '1998-09-02' AND T2.amount = 5100", "difficulty": "simple", @@ -1001,7 +1308,10 @@ { "query_id": 111, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "How many accounts were opened in Litomerice in 1996?", "answer": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1996' AND T1.A2 = 'Litomerice'", "difficulty": "simple", @@ -1010,7 +1320,10 @@ { "query_id": 112, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "For the female client who was born in 1976/1/29, which district did she opened her account?", "answer": "SELECT T1.A2 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'", "difficulty": "simple", @@ -1019,7 +1332,11 @@ { "query_id": 113, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "loan" + ], "query": "For the client who applied 98832 USD loan in 1996/1/3, when was his/her birthday?", "answer": "SELECT T3.birth_date FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.date = '1996-01-03' AND T1.amount = 98832", "difficulty": "simple", @@ -1028,7 +1345,10 @@ { "query_id": 114, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "For the first client who opened his/her account in Prague, what is his/her account ID?", "answer": "SELECT T1.account_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'Prague' ORDER BY T1.date ASC LIMIT 1", "difficulty": "simple", @@ -1037,7 +1357,10 @@ { "query_id": 115, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?", "answer": "SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'south Bohemia' GROUP BY T2.A4 ORDER BY T2.A4 DESC LIMIT 1", "difficulty": "challenging", @@ -1046,7 +1369,11 @@ { "query_id": 116, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "loan" + ], "query": "For the client who first applied the loan in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27?", "answer": "SELECT CAST((SUM(IIF(T3.date = '1998-12-27', T3.balance, 0)) - SUM(IIF(T3.date = '1993-03-22', T3.balance, 0))) AS REAL) * 100 / SUM(IIF(T3.date = '1993-03-22', T3.balance, 0)) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN trans AS T3 ON T3.account_id = T2.account_id WHERE T1.date = '1993-07-05'", "difficulty": "challenging", @@ -1055,7 +1382,9 @@ { "query_id": 117, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "loan" + ], "query": "What is the percentage of loan amount that has been fully paid with no issue.", "answer": "SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan", "difficulty": "moderate", @@ -1064,7 +1393,9 @@ { "query_id": 118, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "loan" + ], "query": "For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue.", "answer": "SELECT CAST(SUM(status = 'C') AS REAL) * 100 / COUNT(amount) FROM loan WHERE amount < 100000", "difficulty": "moderate", @@ -1073,7 +1404,10 @@ { "query_id": 119, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.", "answer": "SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND STRFTIME('%Y', T1.date)= '1993'", "difficulty": "moderate", @@ -1082,7 +1416,10 @@ { "query_id": 120, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.", "answer": "SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000'", "difficulty": "moderate", @@ -1091,7 +1428,10 @@ { "query_id": 121, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "List account ID and account opening date for accounts from 'Prachatice'.", "answer": "SELECT T1.account_id, T1.date FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Prachatice'", "difficulty": "simple", @@ -1100,7 +1440,11 @@ { "query_id": 122, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "State the district and region for loan ID '4990'.", "answer": "SELECT T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.loan_id = 4990", "difficulty": "simple", @@ -1109,7 +1453,11 @@ { "query_id": 123, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "Provide the account ID, district and region for loan amount greater than USD300,000.", "answer": "SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.amount > 300000", "difficulty": "simple", @@ -1118,7 +1466,11 @@ { "query_id": 124, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "List the loan ID, district and average salary for loan with duration of 60 months.", "answer": "SELECT T3.loan_id, T2.A2, T2.A11 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.duration = 60", "difficulty": "simple", @@ -1127,7 +1479,11 @@ { "query_id": 125, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "For loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996.", "answer": "SELECT CAST((T3.A13 - T3.A12) AS REAL) * 100 / T3.A12 FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.status = 'D'", "difficulty": "challenging", @@ -1136,7 +1492,10 @@ { "query_id": 126, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993.", "answer": "SELECT CAST(SUM(T1.A2 = 'Decin') AS REAL) * 100 / COUNT(account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1993'", "difficulty": "simple", @@ -1145,7 +1504,9 @@ { "query_id": 127, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account" + ], "query": "List the account IDs with monthly issuance of statements.", "answer": "SELECT account_id FROM account WHERE Frequency = 'POPLATEK MESICNE'", "difficulty": "simple", @@ -1154,7 +1515,10 @@ { "query_id": 128, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "List the top ten districts, by descending order, from the highest to the lowest, the number of female account holders.", "answer": "SELECT T2.A2, COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' GROUP BY T2.district_id, T2.A2 ORDER BY COUNT(T1.client_id) DESC LIMIT 10", "difficulty": "moderate", @@ -1163,7 +1527,11 @@ { "query_id": 129, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "district" + ], "query": "Which are the top ten withdrawals (non-credit card) by district names for the month of January 1996?", "answer": "SELECT T1.district_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'VYDAJ' AND T2.date LIKE '1996-01%' ORDER BY A2 ASC LIMIT 10", "difficulty": "moderate", @@ -1172,7 +1540,11 @@ { "query_id": 130, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district", + "disp" + ], "query": "How many of the account holders in South Bohemia still do not own credit cards?", "answer": "SELECT COUNT(T3.account_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.client_id = T3.client_id WHERE T1.A3 = 'south Bohemia' AND T3.type != 'OWNER'", "difficulty": "moderate", @@ -1181,7 +1553,11 @@ { "query_id": 131, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "Which district has highest active loan?", "answer": "SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1", "difficulty": "moderate", @@ -1190,7 +1566,11 @@ { "query_id": 132, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "loan" + ], "query": "What is the average loan amount by male borrowers?", "answer": "SELECT AVG(T3.amount) FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.gender = 'M'", "difficulty": "simple", @@ -1199,7 +1579,9 @@ { "query_id": 133, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "district" + ], "query": "In 1996, which districts have the highest unemployment rate? List their branch location and district name.", "answer": "SELECT district_id, A2 FROM district ORDER BY A13 DESC LIMIT 1", "difficulty": "simple", @@ -1208,7 +1590,10 @@ { "query_id": 134, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "In the branch where the largest number of crimes were committed in 1996, how many accounts were opened?", "answer": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id GROUP BY T1.A16 ORDER BY T1.A16 DESC LIMIT 1", "difficulty": "simple", @@ -1217,7 +1602,10 @@ { "query_id": 135, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "account" + ], "query": "After making a credit card withdrawal, how many account/s with monthly issuance has a negative balance?", "answer": "SELECT COUNT(T1.account_id) FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T1.balance < 0 AND T1.operation = 'VYBER KARTOU' AND T2.frequency = 'POPLATEK MESICNE'", "difficulty": "moderate", @@ -1226,7 +1614,10 @@ { "query_id": 136, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "Between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date BETWEEN '1995-01-01' AND '1997-12-31' AND T1.frequency = 'POPLATEK MESICNE' AND T2.amount > 250000", "difficulty": "moderate", @@ -1235,7 +1626,11 @@ { "query_id": 137, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "How many accounts have running contracts in Branch location 1?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T1.district_id = 1 AND (T3.status = 'C' OR T3.status = 'D')", "difficulty": "moderate", @@ -1244,7 +1639,10 @@ { "query_id": 138, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "In the branch where the second-highest number of crimes were committed in 1995 occurred, how many male clients are there?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A15 = (SELECT T3.A15 FROM district AS T3 ORDER BY T3.A15 DESC LIMIT 1, 1)", "difficulty": "moderate", @@ -1253,7 +1651,10 @@ { "query_id": 139, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "disp" + ], "query": "How many high-level credit cards have \"disponent\" type of disposition?", "answer": "SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'gold' AND T2.type = 'DISPONENT'", "difficulty": "simple", @@ -1262,7 +1663,10 @@ { "query_id": 140, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "How many accounts are there in the district of \"Pisek\"?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Pisek'", "difficulty": "simple", @@ -1271,7 +1675,11 @@ { "query_id": 141, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "district" + ], "query": "Which districts have transactions greater than USS$10,000 in 1997?", "answer": "SELECT T1.district_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T1.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date) = '1997' GROUP BY T1.district_id HAVING SUM(T3.amount) > 10000", "difficulty": "simple", @@ -1280,7 +1688,11 @@ { "query_id": 142, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "account", + "district" + ], "query": "Which accounts placed orders for household payment in Pisek?", "answer": "SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.k_symbol = 'SIPO' AND T3.A2 = 'Pisek'", "difficulty": "simple", @@ -1289,7 +1701,10 @@ { "query_id": 143, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "disp" + ], "query": "What are the accounts that have both gold and junior credit cards?", "answer": "SELECT T2.account_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type IN ('gold', 'junior')", "difficulty": "simple", @@ -1298,7 +1713,11 @@ { "query_id": 144, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "trans", + "disp" + ], "query": "How much is the average amount in credit card made by account holders in a month, in year 2021?", "answer": "SELECT AVG(T3.amount) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date) = '2021' AND T3.operation = 'VYBER KARTOU'", "difficulty": "moderate", @@ -1307,7 +1726,10 @@ { "query_id": 145, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans", + "account" + ], "query": "Who are the account holder identification numbers whose spent per month on the credit card is less than the average, in 1998?", "answer": "SELECT T1.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1998' AND T1.operation = 'VYBER KARTOU' AND T1.amount < (SELECT AVG(amount) FROM trans WHERE STRFTIME('%Y', date) = '1998')", "difficulty": "moderate", @@ -1316,7 +1738,12 @@ { "query_id": 146, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "card", + "disp", + "loan" + ], "query": "Who are the female account holders who own credit cards and also have loans?", "answer": "SELECT T1.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id INNER JOIN card AS T4 ON T2.disp_id = T4.disp_id WHERE T1.gender = 'F'", "difficulty": "simple", @@ -1325,7 +1752,10 @@ { "query_id": 147, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "How many female clients' accounts are in the region of South Bohemia?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A3 = 'south Bohemia'", "difficulty": "simple", @@ -1334,7 +1764,11 @@ { "query_id": 148, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "disp" + ], "query": "Please list the accounts whose district is Tabor that are eligible for loans.", "answer": "SELECT T2.account_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'OWNER' AND T1.A2 = 'Tabor'", "difficulty": "moderate", @@ -1343,7 +1777,11 @@ { "query_id": 149, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "disp" + ], "query": "Please list the account types that are not eligible for loans, and the average income of residents in the district where the account is located exceeds $8000 but is no more than $9000.", "answer": "SELECT T3.type FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type != 'OWNER' AND T1.A11 BETWEEN 8000 AND 9000", "difficulty": "challenging", @@ -1352,7 +1790,11 @@ { "query_id": 150, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "district" + ], "query": "How many accounts in North Bohemia has made a transaction with the partner's bank being AB?", "answer": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.bank = 'AB' AND T1.A3 = 'north Bohemia'", "difficulty": "moderate", @@ -1361,7 +1803,11 @@ { "query_id": 151, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "district" + ], "query": "Please list the name of the districts with accounts that made withdrawal transactions.", "answer": "SELECT DISTINCT T1.A2 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'VYDAJ'", "difficulty": "moderate", @@ -1370,7 +1816,10 @@ { "query_id": 152, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "What is the average number of crimes committed in 1995 in regions where the number exceeds 4000 and the region has accounts that are opened starting from the year 1997?", "answer": "SELECT AVG(T1.A15) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) >= '1997' AND T1.A15 > 4000", "difficulty": "moderate", @@ -1379,7 +1828,10 @@ { "query_id": 153, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "disp" + ], "query": "How many 'classic' cards are eligible for loan?", "answer": "SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'classic' AND T2.type = 'Owner'", "difficulty": "simple", @@ -1388,7 +1840,10 @@ { "query_id": 154, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "How many male clients in 'Hl.m. Praha' district?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A2 = 'Hl.m. Praha'", "difficulty": "simple", @@ -1397,7 +1852,9 @@ { "query_id": 155, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card" + ], "query": "How many percent of 'Gold' cards were issued prior to 1998?", "answer": "SELECT CAST(SUM(type = 'gold') AS REAL) * 100 / COUNT(card_id) FROM card WHERE STRFTIME('%Y', issued) < '1998'", "difficulty": "simple", @@ -1406,7 +1863,10 @@ { "query_id": 156, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "disp", + "loan" + ], "query": "Who is the owner of the account with the largest loan amount?", "answer": "SELECT T1.client_id FROM disp AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T1.type = 'OWNER' ORDER BY T2.amount DESC LIMIT 1", "difficulty": "simple", @@ -1415,7 +1875,10 @@ { "query_id": 157, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "What is the number of committed crimes in 1995 in the district of the account with the id 532?", "answer": "SELECT T1.A15 FROM district AS T1 INNER JOIN `account` AS T2 ON T1.district_id = T2.district_id WHERE T2.account_id = 532", "difficulty": "simple", @@ -1424,7 +1887,11 @@ { "query_id": 158, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "order" + ], "query": "What is the district Id of the account that placed the order with the id 33333?", "answer": "SELECT T3.district_id FROM `order` AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.order_id = 33333", "difficulty": "simple", @@ -1433,7 +1900,12 @@ { "query_id": 159, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "trans", + "disp" + ], "query": "List all the withdrawals in cash transactions that the client with the id 3356 makes.", "answer": "SELECT T4.trans_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 3356 AND T4.operation = 'VYBER'", "difficulty": "simple", @@ -1442,7 +1914,10 @@ { "query_id": 160, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "Among the weekly issuance accounts, how many have a loan of under 200000?", "answer": "SELECT COUNT(T1.account_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000", "difficulty": "simple", @@ -1451,7 +1926,11 @@ { "query_id": 161, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "card", + "disp" + ], "query": "What type of credit card does the client with the id 13539 own?", "answer": "SELECT T3.type FROM disp AS T1 INNER JOIN client AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T1.disp_id = T3.disp_id WHERE T2.client_id = 13539", "difficulty": "simple", @@ -1460,7 +1939,10 @@ { "query_id": 162, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "What is the region of the client with the id 3541 from?", "answer": "SELECT T2.district_id, T1.A3 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.client_id = 3541", "difficulty": "simple", @@ -1469,7 +1951,11 @@ { "query_id": 163, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "loan" + ], "query": "Which district has the most accounts with loan contracts finished with no problems?", "answer": "SELECT T1.district_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T3.status = 'A' GROUP BY T1.district_id ORDER BY COUNT(T2.account_id) DESC LIMIT 1", "difficulty": "moderate", @@ -1478,7 +1964,11 @@ { "query_id": 164, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "order" + ], "query": "Who placed the order with the id 32423?", "answer": "SELECT T3.client_id FROM `order` AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.order_id = 32423", "difficulty": "simple", @@ -1487,7 +1977,11 @@ { "query_id": 165, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "trans", + "district" + ], "query": "Please list all the transactions made by accounts from district 5.", "answer": "SELECT T3.trans_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T1.district_id = 5", "difficulty": "simple", @@ -1496,7 +1990,10 @@ { "query_id": 166, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "How many of the accounts are from Jesenik district?", "answer": "SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A2 = 'Jesenik'", "difficulty": "simple", @@ -1505,7 +2002,10 @@ { "query_id": 167, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "disp" + ], "query": "List all the clients' IDs whose junior credit cards were issued after 1996.", "answer": "SELECT T2.client_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'junior' AND T1.issued >= '1997-01-01'", "difficulty": "simple", @@ -1514,7 +2014,10 @@ { "query_id": 168, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women?", "answer": "SELECT CAST(SUM(T2.gender = 'F') AS REAL) * 100 / COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.A11 > 10000", "difficulty": "moderate", @@ -1523,7 +2026,12 @@ { "query_id": 169, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "disp", + "loan" + ], "query": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?", "answer": "SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T3.account_id = T2.account_id INNER JOIN client AS T4 ON T4.client_id = T3.client_id WHERE T4.gender = 'M' AND T3.type = 'OWNER'", "difficulty": "challenging", @@ -1532,7 +2040,9 @@ { "query_id": 170, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "trans" + ], "query": "How many credit card withdrawals were recorded after 1995?", "answer": "SELECT COUNT(account_id) FROM trans WHERE STRFTIME('%Y', date) > '1995' AND operation = 'VYBER KARTOU'", "difficulty": "simple", @@ -1541,7 +2051,9 @@ { "query_id": 171, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "district" + ], "query": "What was the difference in the number of crimes committed in East and North Bohemia in 1996?", "answer": "SELECT SUM(IIF(A3 = 'East Bohemia', A16, 0)) - SUM(IIF(A3 = 'North Bohemia', A16, 0)) FROM district", "difficulty": "moderate", @@ -1550,7 +2062,9 @@ { "query_id": 172, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "disp" + ], "query": "How many owner and disponent dispositions are there from account number 1 to account number 10?", "answer": "SELECT SUM(type = 'Owner') , SUM(type = 'Disponent') FROM disp WHERE account_id BETWEEN 1 AND 10", "difficulty": "simple", @@ -1559,7 +2073,10 @@ { "query_id": 173, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "order" + ], "query": "How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total?", "answer": "SELECT T1.frequency, T2.k_symbol FROM account AS T1 INNER JOIN `order` AS T2 ON T1.account_id = T2.account_id WHERE T1.account_id = 3 AND T2.amount = 3539", "difficulty": "simple", @@ -1568,7 +2085,11 @@ { "query_id": 174, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "disp" + ], "query": "What year was account owner number 130 born?", "answer": "SELECT STRFTIME('%Y', T1.birth_date) FROM client AS T1 INNER JOIN disp AS T3 ON T1.client_id = T3.client_id INNER JOIN account AS T2 ON T3.account_id = T2.account_id WHERE T2.account_id = 130", "difficulty": "simple", @@ -1577,7 +2098,10 @@ { "query_id": 175, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "disp" + ], "query": "How many accounts have an owner disposition and request for a statement to be generated upon a transaction?", "answer": "SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'OWNER' AND T1.frequency = 'POPLATEK PO OBRATU'", "difficulty": "moderate", @@ -1586,7 +2110,11 @@ { "query_id": 176, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "loan" + ], "query": "What is the amount of debt that client number 992 has, and how is this client doing with payments?", "answer": "SELECT T3.amount, T3.status FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.client_id = 992", "difficulty": "simple", @@ -1595,7 +2123,11 @@ { "query_id": 177, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "trans" + ], "query": "What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman?", "answer": "SELECT T3.balance, T1.gender FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T1.client_id = 4 AND T3.trans_id = 851", "difficulty": "simple", @@ -1604,7 +2136,11 @@ { "query_id": 178, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "card", + "disp" + ], "query": "Which kind of credit card does client number 9 possess?", "answer": "SELECT T3.type FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.client_id = 9", "difficulty": "simple", @@ -1613,7 +2149,11 @@ { "query_id": 179, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "trans" + ], "query": "How much, in total, did client number 617 pay for all of the transactions in 1998?", "answer": "SELECT SUM(T3.amount) FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date)= '1998' AND T1.client_id = 617", "difficulty": "simple", @@ -1622,7 +2162,11 @@ { "query_id": 180, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "district" + ], "query": "Please provide a list of clients who were born between 1983 and 1987 and whose account branch is in East Bohemia, along with their IDs.", "answer": "SELECT T1.client_id, T3.account_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN account AS T3 ON T2.district_id = T3.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.birth_date) BETWEEN '1983' AND '1987'", "difficulty": "moderate", @@ -1631,7 +2175,11 @@ { "query_id": 181, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "loan" + ], "query": "Please provide the IDs of the 3 female clients with the largest loans.", "answer": "SELECT T1.client_id FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.gender = 'F' ORDER BY T3.amount DESC LIMIT 3", "difficulty": "simple", @@ -1640,7 +2188,11 @@ { "query_id": 182, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "trans", + "account" + ], "query": "How many male customers who were born between 1974 and 1976 have made a payment on their home in excess of $4000?", "answer": "SELECT COUNT(T1.account_id) FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE STRFTIME('%Y', T3.birth_date) BETWEEN '1974' AND '1976' AND T3.gender = 'M' AND T1.amount > 4000 AND T1.k_symbol = 'SIPO'", "difficulty": "moderate", @@ -1649,7 +2201,10 @@ { "query_id": 183, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district" + ], "query": "How many accounts in Beroun were opened after 1996?", "answer": "SELECT COUNT(account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T1.date) > '1996' AND T2.A2 = 'Beroun'", "difficulty": "simple", @@ -1658,7 +2213,11 @@ { "query_id": 184, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "card", + "disp" + ], "query": "How many female customers have a junior credit card?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.gender = 'F' AND T3.type = 'junior'", "difficulty": "simple", @@ -1667,7 +2226,10 @@ { "query_id": 185, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "What proportion of customers who have accounts at the Prague branch are female?", "answer": "SELECT CAST(SUM(T2.gender = 'F') AS REAL) / COUNT(T2.client_id) * 100 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'Prague'", "difficulty": "moderate", @@ -1676,7 +2238,10 @@ { "query_id": 186, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account" + ], "query": "What percentage of male clients request for weekly statements to be issued?", "answer": "SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T2.frequency = 'POPLATEK TYDNE'", "difficulty": "moderate", @@ -1685,7 +2250,10 @@ { "query_id": 187, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "disp" + ], "query": "How many clients who choose statement of weekly issuance are User?", "answer": "SELECT COUNT(T2.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T2.account_id = T1.account_id WHERE T1.frequency = 'POPLATEK TYDNE' AND T2.type = 'USER'", "difficulty": "simple", @@ -1694,7 +2262,10 @@ { "query_id": 188, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "Among the accounts who have loan validity more than 24 months, list out the accounts that have the lowest approved amount and have account opening date before 1997.", "answer": "SELECT T1.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T1.duration > 24 AND STRFTIME('%Y', T2.date) < '1997' ORDER BY T1.amount ASC LIMIT 1", "difficulty": "moderate", @@ -1703,7 +2274,11 @@ { "query_id": 189, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "account", + "district" + ], "query": "Name the account numbers of female clients who are oldest and have lowest average salary?", "answer": "SELECT T3.account_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN account AS T3 ON T2.district_id = T3.district_id WHERE T1.gender = 'F' ORDER BY T1.birth_date ASC, T2.A11 ASC LIMIT 1", "difficulty": "moderate", @@ -1712,7 +2287,10 @@ { "query_id": 190, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "client", + "district" + ], "query": "How many clients who were born in 1920 stay in east Bohemia?", "answer": "SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T1.birth_date) = '1920' AND T2.A3 = 'east Bohemia'", "difficulty": "simple", @@ -1721,7 +2299,10 @@ { "query_id": 191, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "How many loan accounts are for pre-payment of duration of 24 months with weekly issuance of statement.", "answer": "SELECT COUNT(T2.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.duration = 24 AND T1.frequency = 'POPLATEK TYDNE'", "difficulty": "simple", @@ -1730,7 +2311,10 @@ { "query_id": 192, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "loan" + ], "query": "What is the average amount of loan which are still on running contract with statement issuance after each transaction?", "answer": "SELECT AVG(T2.payments) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU'", "difficulty": "moderate", @@ -1739,7 +2323,11 @@ { "query_id": 193, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "account", + "district", + "disp" + ], "query": "List all ID and district for clients that can only have the right to issue permanent orders or apply for loans.", "answer": "SELECT T3.client_id, T2.district_id, T2.A2 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id WHERE T3.type = 'OWNER'", "difficulty": "moderate", @@ -1748,7 +2336,11 @@ { "query_id": 194, "database_id": "financial", - "table_id": "N/A", + "table_id": [ + "card", + "disp", + "client" + ], "query": "Provide the IDs and age of the client with high level credit card, which is eligible for loans.", "answer": "SELECT T1.client_id, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T3.birth_date) FROM disp AS T1 INNER JOIN card AS T2 ON T2.disp_id = T1.disp_id INNER JOIN client AS T3 ON T1.client_id = T3.client_id WHERE T2.type = 'gold' AND T1.type = 'OWNER'", "difficulty": "moderate", @@ -1757,7 +2349,9 @@ { "query_id": 195, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "What is the most common bond type?", "answer": "SELECT T.bond_type FROM ( SELECT bond_type, COUNT(bond_id) FROM bond GROUP BY bond_type ORDER BY COUNT(bond_id) DESC LIMIT 1 ) AS T", "difficulty": "simple", @@ -1766,7 +2360,10 @@ { "query_id": 196, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "In the non-carcinogenic molecules, how many contain chlorine atoms?", "answer": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'cl' AND T1.label = '-'", "difficulty": "simple", @@ -1775,7 +2372,10 @@ { "query_id": 197, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "Calculate the average number of oxygen atoms in single-bonded molecules.", "answer": "SELECT AVG(oxygen_count) FROM (SELECT T1.molecule_id, COUNT(T1.element) AS oxygen_count FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '-' AND T1.element = 'o' GROUP BY T1.molecule_id) AS oxygen_counts", "difficulty": "moderate", @@ -1784,7 +2384,11 @@ { "query_id": 198, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "On average how many carcinogenic molecules are single bonded?", "answer": "SELECT AVG(single_bond_count) FROM (SELECT T3.molecule_id, COUNT(T1.bond_type) AS single_bond_count FROM bond AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN molecule AS T3 ON T3.molecule_id = T2.molecule_id WHERE T1.bond_type = '-' AND T3.label = '+' GROUP BY T3.molecule_id) AS subquery", "difficulty": "challenging", @@ -1793,7 +2397,10 @@ { "query_id": 199, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "In the molecule containing sodium atoms, how many are non-carcinogenic?", "answer": "SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'na' AND T2.label = '-'", "difficulty": "simple", @@ -1802,7 +2409,10 @@ { "query_id": 200, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Find the triple-bonded molecules which are carcinogenic.", "answer": "SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#' AND T2.label = '+'", "difficulty": "simple", @@ -1811,7 +2421,10 @@ { "query_id": 201, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "What is the percentage of carbon in double-bond molecules?", "answer": "SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element = 'c' THEN T1.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T1.atom_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '='", "difficulty": "moderate", @@ -1820,7 +2433,9 @@ { "query_id": 202, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "How many triple type bonds are there?", "answer": "SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '#'", "difficulty": "simple", @@ -1829,7 +2444,9 @@ { "query_id": 203, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "In how many atoms is there no bromine?", "answer": "SELECT COUNT(DISTINCT T.atom_id) FROM atom AS T WHERE T.element <> 'br'", "difficulty": "simple", @@ -1838,7 +2455,9 @@ { "query_id": 204, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "Of the first 100 molecules in number order, how many are carcinogenic?", "answer": "SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE molecule_id BETWEEN 'TR000' AND 'TR099' AND T.label = '+'", "difficulty": "simple", @@ -1847,7 +2466,9 @@ { "query_id": 205, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "Identify by their ID the molecules in which there is silicon.", "answer": "SELECT T.atom_id FROM atom AS T WHERE T.element = 'si'", "difficulty": "simple", @@ -1856,7 +2477,10 @@ { "query_id": 206, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What elements are in the TR004_8_9 bond atoms?", "answer": "SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR004_8_9'", "difficulty": "challenging", @@ -1865,7 +2489,11 @@ { "query_id": 207, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "What elements are in a double type bond?", "answer": "SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN connected AS T3 ON T1.atom_id = T3.atom_id WHERE T2.bond_type = '='", "difficulty": "challenging", @@ -1874,7 +2502,10 @@ { "query_id": 208, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Which type of label is the most numerous in atoms with hydrogen?", "answer": "SELECT T.label FROM ( SELECT T2.label, COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h' GROUP BY T2.label ORDER BY COUNT(T2.molecule_id) DESC LIMIT 1 ) t", "difficulty": "moderate", @@ -1883,7 +2514,11 @@ { "query_id": 209, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "Tellurium is in what type of bond?", "answer": "SELECT DISTINCT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T3.element = 'te'", "difficulty": "simple", @@ -1892,7 +2527,10 @@ { "query_id": 210, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What atoms are connected in single type bonds?", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '-'", "difficulty": "simple", @@ -1901,7 +2539,11 @@ { "query_id": 211, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "molecule" + ], "query": "Indicate which atoms are connected in non-carcinogenic type molecules.", "answer": "SELECT DISTINCT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN connected AS T3 ON T1.atom_id = T3.atom_id WHERE T2.label = '-'", "difficulty": "simple", @@ -1910,7 +2552,10 @@ { "query_id": 212, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Which element is the least numerous in non-carcinogenic molecules?", "answer": "SELECT T.element FROM ( SELECT T1.element, COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' GROUP BY T1.element ORDER BY COUNT(DISTINCT T1.molecule_id) ASC LIMIT 4 ) t", "difficulty": "challenging", @@ -1919,7 +2564,10 @@ { "query_id": 213, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What type of bond is there between the atoms TR004_8 and TR004_20?", "answer": "SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR004_8' AND T2.atom_id2 = 'TR004_20' OR T2.atom_id2 = 'TR004_8' AND T2.atom_id = 'TR004_20'", "difficulty": "moderate", @@ -1928,7 +2576,10 @@ { "query_id": 214, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What type of label is not on molecules with atoms with tin?", "answer": "SELECT DISTINCT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element != 'sn'", "difficulty": "simple", @@ -1937,7 +2588,11 @@ { "query_id": 215, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "How many atoms with iodine and sulfur type elements are there in single bond molecules?", "answer": "SELECT COUNT(DISTINCT CASE WHEN T1.element = 'i' THEN T1.atom_id ELSE NULL END) AS iodine_nums , COUNT(DISTINCT CASE WHEN T1.element = 's' THEN T1.atom_id ELSE NULL END) AS sulfur_nums FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_type = '-'", "difficulty": "challenging", @@ -1946,7 +2601,10 @@ { "query_id": 216, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "Identify all connected atoms with a triple bond.", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'", "difficulty": "simple", @@ -1955,7 +2613,10 @@ { "query_id": 217, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "Identify all the atoms that are connected to the atoms of the TR181 molecule.", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T1.molecule_id = 'TR181'", "difficulty": "simple", @@ -1964,7 +2625,10 @@ { "query_id": 218, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What percentage of carcinogenic-type molecules does not contain fluorine?", "answer": "SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element <> 'f' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "challenging", @@ -1973,7 +2637,11 @@ { "query_id": 219, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "What is the percentage of carcinogenic molecules in triple type bonds?", "answer": "SELECT CAST(COUNT(DISTINCT CASE WHEN T2.label = '+' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#'", "difficulty": "challenging", @@ -1982,7 +2650,9 @@ { "query_id": 220, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "Please list top three elements of the toxicology of the molecule TR000 in alphabetical order.", "answer": "SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR000' ORDER BY T.element LIMIT 3", "difficulty": "challenging", @@ -1991,7 +2661,9 @@ { "query_id": 221, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6?", "answer": "SELECT SUBSTR(T.bond_id, 1, 7) AS atom_id1 , T.molecule_id || SUBSTR(T.bond_id, 8, 2) AS atom_id2 FROM bond AS T WHERE T.molecule_id = 'TR001' AND T.bond_id = 'TR001_2_6'", "difficulty": "simple", @@ -2000,7 +2672,9 @@ { "query_id": 222, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "What is the difference between the number of molecules that are carcinogenic and those that are not?", "answer": "SELECT COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) - COUNT(CASE WHEN T.label = '-' THEN T.molecule_id ELSE NULL END) AS diff_car_notcar FROM molecule t", "difficulty": "moderate", @@ -2009,7 +2683,9 @@ { "query_id": 223, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected" + ], "query": "What are the atom IDs of the bond TR_000_2_5?", "answer": "SELECT T.atom_id FROM connected AS T WHERE T.bond_id = 'TR000_2_5'", "difficulty": "simple", @@ -2018,7 +2694,9 @@ { "query_id": 224, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected" + ], "query": "What are the bond IDs that have the same atom ID 2 of TR000_2?", "answer": "SELECT T.bond_id FROM connected AS T WHERE T.atom_id2 = 'TR000_2'", "difficulty": "simple", @@ -2027,7 +2705,9 @@ { "query_id": 225, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Please list top five molecules that have double bonds in alphabetical order.", "answer": "SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '=' ORDER BY T.molecule_id LIMIT 5", "difficulty": "simple", @@ -2036,7 +2716,9 @@ { "query_id": 226, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "What is the percentage of double bonds in the molecule TR008?", "answer": "SELECT CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T WHERE T.molecule_id = 'TR008'", "difficulty": "moderate", @@ -2045,7 +2727,9 @@ { "query_id": 227, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "What is the percentage of molecules that are carcinogenic?", "answer": "SELECT CAST(COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(T.molecule_id) FROM molecule t", "difficulty": "simple", @@ -2054,7 +2738,9 @@ { "query_id": 228, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "How much of the hydrogen in molecule TR206 is accounted for? Please provide your answer in percentage.", "answer": "SELECT CAST(COUNT(CASE WHEN T.element = 'h' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id) FROM atom AS T WHERE T.molecule_id = 'TR206'", "difficulty": "moderate", @@ -2063,7 +2749,9 @@ { "query_id": 229, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "What is the type of bond that molecule TR000 has when involved in any bonds?", "answer": "SELECT DISTINCT T.bond_type FROM bond AS T WHERE T.molecule_id = 'TR000'", "difficulty": "simple", @@ -2072,7 +2760,10 @@ { "query_id": 230, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What are the elements of the toxicology and label of molecule TR060?", "answer": "SELECT DISTINCT T1.element, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR060'", "difficulty": "challenging", @@ -2081,7 +2772,9 @@ { "query_id": 231, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Which bond type accounted for the majority of the bonds found in molecule TR018 and state whether or not this molecule is carcinogenic?", "answer": "SELECT T.bond_type FROM ( SELECT T1.bond_type, COUNT(T1.molecule_id) FROM bond AS T1 WHERE T1.molecule_id = 'TR018' GROUP BY T1.bond_type ORDER BY COUNT(T1.molecule_id) DESC LIMIT 1 ) AS T", "difficulty": "challenging", @@ -2090,7 +2783,10 @@ { "query_id": 232, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order.", "answer": "SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-' AND T2.label = '-' ORDER BY T2.molecule_id LIMIT 3", "difficulty": "moderate", @@ -2099,7 +2795,10 @@ { "query_id": 233, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "Please list top two bonds that happened with the molecule TR006 in alphabetical order.", "answer": "SELECT DISTINCT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.molecule_id = 'TR006' ORDER BY T2.bond_id LIMIT 2", "difficulty": "simple", @@ -2108,7 +2807,10 @@ { "query_id": 234, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "How many bonds which involved atom 12 does molecule TR009 have?", "answer": "SELECT COUNT(T2.bond_id) FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.molecule_id = 'TR009' AND T2.atom_id = T1.molecule_id || '_1' AND T2.atom_id2 = T1.molecule_id || '_2'", "difficulty": "moderate", @@ -2117,7 +2819,10 @@ { "query_id": 235, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "How many molecules are carcinogenic and have the bromine element?", "answer": "SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.element = 'br'", "difficulty": "simple", @@ -2126,7 +2831,10 @@ { "query_id": 236, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What are the bond type and the atoms of the bond ID of TR001_6_9?", "answer": "SELECT T1.bond_type, T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.bond_id = 'TR001_6_9'", "difficulty": "moderate", @@ -2135,7 +2843,10 @@ { "query_id": 237, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Which molecule does the atom TR001_10 belong to? Please state whether this molecule is carcinogenic or not.", "answer": "SELECT T2.molecule_id , IIF(T2.label = '+', 'YES', 'NO') AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_10'", "difficulty": "moderate", @@ -2144,7 +2855,9 @@ { "query_id": 238, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "How many molecules have a triple bond type?", "answer": "SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.bond_type = '#'", "difficulty": "simple", @@ -2153,7 +2866,9 @@ { "query_id": 239, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected" + ], "query": "How many connections does the atom 19 have?", "answer": "SELECT COUNT(T.bond_id) FROM connected AS T WHERE SUBSTR(T.atom_id, -2) = '19'", "difficulty": "simple", @@ -2162,7 +2877,9 @@ { "query_id": 240, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "List all the elements of the toxicology of the molecule \"TR004\".", "answer": "SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR004'", "difficulty": "challenging", @@ -2171,7 +2888,9 @@ { "query_id": 241, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "How many of the molecules are not carcinogenic?", "answer": "SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '-'", "difficulty": "simple", @@ -2180,7 +2899,10 @@ { "query_id": 242, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Among all the atoms from 21 to 25, list all the molecules that are carcinogenic.", "answer": "SELECT DISTINCT T2.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE SUBSTR(T1.atom_id, -2) BETWEEN '21' AND '25' AND T2.label = '+'", "difficulty": "moderate", @@ -2189,7 +2911,10 @@ { "query_id": 243, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What are the bonds that have phosphorus and nitrogen as their atom elements?", "answer": "SELECT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id IN ( SELECT T3.bond_id FROM connected AS T3 INNER JOIN atom AS T4 ON T3.atom_id = T4.atom_id WHERE T4.element = 'p' ) AND T1.element = 'n'", "difficulty": "moderate", @@ -2198,7 +2923,10 @@ { "query_id": 244, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Is the molecule with the most double bonds carcinogenic?", "answer": "SELECT T1.label FROM molecule AS T1 INNER JOIN ( SELECT T.molecule_id, COUNT(T.bond_type) FROM bond AS T WHERE T.bond_type = '=' GROUP BY T.molecule_id ORDER BY COUNT(T.bond_type) DESC LIMIT 1 ) AS T2 ON T1.molecule_id = T2.molecule_id", "difficulty": "moderate", @@ -2207,7 +2935,10 @@ { "query_id": 245, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What is the average number of bonds the atoms with the element iodine have?", "answer": "SELECT CAST(COUNT(T2.bond_id) AS REAL) / COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i'", "difficulty": "moderate", @@ -2216,7 +2947,10 @@ { "query_id": 246, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "List the bond type and the bond ID of the atom 45.", "answer": "SELECT T1.bond_type, T1.bond_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE SUBSTR(T2.atom_id, 7, 2) = '45'", "difficulty": "moderate", @@ -2225,7 +2959,10 @@ { "query_id": 247, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "List all the elements of atoms that can not bond with any other atoms.", "answer": "SELECT DISTINCT T.element FROM atom AS T WHERE T.element NOT IN ( SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id )", "difficulty": "challenging", @@ -2234,7 +2971,11 @@ { "query_id": 248, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "What are the atoms of the triple bond with the molecule \"TR447\"?", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_type = '#' AND T3.molecule_id = 'TR447'", "difficulty": "simple", @@ -2243,7 +2984,10 @@ { "query_id": 249, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What are the elements of the atoms of TR144_8_19?", "answer": "SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR144_8_19'", "difficulty": "challenging", @@ -2252,7 +2996,10 @@ { "query_id": 250, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Of all the carcinogenic molecules, which one has the most double bonds?", "answer": "SELECT T.molecule_id FROM ( SELECT T3.molecule_id, COUNT(T1.bond_type) FROM bond AS T1 INNER JOIN molecule AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.label = '+' AND T1.bond_type = '=' GROUP BY T3.molecule_id ORDER BY COUNT(T1.bond_type) DESC LIMIT 1 ) AS T", "difficulty": "moderate", @@ -2261,7 +3008,10 @@ { "query_id": 251, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What is the least common element of all carcinogenic molecules?", "answer": "SELECT T.element FROM ( SELECT T2.element, COUNT(DISTINCT T2.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+' GROUP BY T2.element ORDER BY COUNT(DISTINCT T2.molecule_id) LIMIT 1 ) t", "difficulty": "moderate", @@ -2270,7 +3020,10 @@ { "query_id": 252, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What are the atoms that can bond with the atom that has the element lead?", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'pb'", "difficulty": "simple", @@ -2279,7 +3032,11 @@ { "query_id": 253, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "List the elements of all the triple bonds.", "answer": "SELECT DISTINCT T3.element FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T1.bond_type = '#'", "difficulty": "challenging", @@ -2288,7 +3045,10 @@ { "query_id": 254, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What percentage of bonds have the most common combination of atoms' elements?", "answer": "SELECT CAST((SELECT COUNT(T1.atom_id) FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id GROUP BY T2.bond_type ORDER BY COUNT(T2.bond_id) DESC LIMIT 1 ) AS REAL) * 100 / ( SELECT COUNT(atom_id) FROM connected )", "difficulty": "moderate", @@ -2297,7 +3057,10 @@ { "query_id": 255, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "What proportion of single bonds are carcinogenic?", "answer": "SELECT CAST(COUNT(CASE WHEN T2.label = '+' THEN T1.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bond_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-'", "difficulty": "moderate", @@ -2306,7 +3069,9 @@ { "query_id": 256, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "Calculate the total atoms consisting of the element carbon and hydrogen.", "answer": "SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.element = 'c' OR T.element = 'h'", "difficulty": "simple", @@ -2315,7 +3080,10 @@ { "query_id": 257, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "List down atom id2 for atoms with element sulfur.", "answer": "SELECT DISTINCT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 's'", "difficulty": "simple", @@ -2324,7 +3092,11 @@ { "query_id": 258, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "What are the bond type for atoms with element Tin?", "answer": "SELECT DISTINCT T3.bond_type FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T3.bond_id = T2.bond_id WHERE T1.element = 'sn'", "difficulty": "moderate", @@ -2333,7 +3105,11 @@ { "query_id": 259, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "How many elements are there for single bond molecules?", "answer": "SELECT COUNT(DISTINCT T.element) FROM ( SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T", "difficulty": "simple", @@ -2342,7 +3118,11 @@ { "query_id": 260, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.", "answer": "SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element IN ('p', 'br')", "difficulty": "moderate", @@ -2351,7 +3131,10 @@ { "query_id": 261, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Write down bond id for molecules that are carcinogenic.", "answer": "SELECT DISTINCT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "simple", @@ -2360,7 +3143,10 @@ { "query_id": 262, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Among the single bond molecule id, which molecules are not carcinogenic?", "answer": "SELECT DISTINCT T1.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'", "difficulty": "simple", @@ -2369,7 +3155,11 @@ { "query_id": 263, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "What is the composition of element chlorine in percentage among the single bond molecules?", "answer": "SELECT CAST(COUNT(CASE WHEN T.element = 'cl' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id) FROM ( SELECT T1.atom_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T", "difficulty": "challenging", @@ -2378,7 +3168,9 @@ { "query_id": 264, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "What are the labels for TR000, TR001 and TR002?", "answer": "SELECT molecule_id, T.label FROM molecule AS T WHERE T.molecule_id IN ('TR000', 'TR001', 'TR002')", "difficulty": "simple", @@ -2387,7 +3179,9 @@ { "query_id": 265, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "List down the molecule id for non carcinogenic molecules.", "answer": "SELECT T.molecule_id FROM molecule AS T WHERE T.label = '-'", "difficulty": "simple", @@ -2396,7 +3190,9 @@ { "query_id": 266, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.", "answer": "SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.molecule_id BETWEEN 'TR000' AND 'TR030' AND T.label = '+'", "difficulty": "simple", @@ -2405,7 +3201,10 @@ { "query_id": 267, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "List down the bond type for molecules from molecule id TR000 to TR050.", "answer": "SELECT T2.molecule_id, T2.bond_type FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id BETWEEN 'TR000' AND 'TR050'", "difficulty": "moderate", @@ -2414,7 +3213,10 @@ { "query_id": 268, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What are the elements for bond id TR001_10_11?", "answer": "SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR001_10_11'", "difficulty": "challenging", @@ -2423,7 +3225,11 @@ { "query_id": 269, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "How many bond id have element iodine?", "answer": "SELECT COUNT(T3.bond_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T1.element = 'i'", "difficulty": "simple", @@ -2432,7 +3238,10 @@ { "query_id": 270, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic?", "answer": "SELECT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca' GROUP BY T2.label ORDER BY COUNT(T2.label) DESC LIMIT 1", "difficulty": "moderate", @@ -2441,7 +3250,10 @@ { "query_id": 271, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "Does bond id TR001_1_8 have both element of chlorine and carbon?", "answer": "SELECT T2.bond_id, T2.atom_id2, T1.element AS flag_have_CaCl FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T2.bond_id = 'TR001_1_8' AND (T1.element = 'c1' OR T1.element = 'c')", "difficulty": "simple", @@ -2450,7 +3262,11 @@ { "query_id": 272, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "List down two molecule id of triple bond non carcinogenic molecules with element carbon.", "answer": "SELECT DISTINCT T2.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element = 'c' AND T2.label = '-'", "difficulty": "moderate", @@ -2459,7 +3275,10 @@ { "query_id": 273, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What is the percentage of element chlorine in carcinogenic molecules?", "answer": "SELECT CAST(COUNT( CASE WHEN T1.element = 'cl' THEN T1.element ELSE NULL END) AS REAL) * 100 / COUNT(T1.element) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "moderate", @@ -2468,7 +3287,9 @@ { "query_id": 274, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "List the toxicology elements associated with molecule TR001.", "answer": "SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001'", "difficulty": "simple", @@ -2477,7 +3298,9 @@ { "query_id": 275, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Give me the molecule ID of the double bond type.", "answer": "SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '='", "difficulty": "simple", @@ -2486,7 +3309,10 @@ { "query_id": 276, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "Write down the atom IDs of the first and second atoms of triple bond type molecules.", "answer": "SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'", "difficulty": "simple", @@ -2495,7 +3321,10 @@ { "query_id": 277, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What are the toxicology elements associated with bond ID TR005_16_26?", "answer": "SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR005_16_26'", "difficulty": "challenging", @@ -2504,7 +3333,10 @@ { "query_id": 278, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "How many of the single bond type molecules are non-carcinogenic?", "answer": "SELECT COUNT(DISTINCT T2.molecule_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'", "difficulty": "simple", @@ -2513,7 +3345,10 @@ { "query_id": 279, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "What is the label for bond ID TR001_10_11?", "answer": "SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'", "difficulty": "simple", @@ -2522,7 +3357,10 @@ { "query_id": 280, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.", "answer": "SELECT DISTINCT T1.bond_id, T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#'", "difficulty": "moderate", @@ -2531,7 +3369,10 @@ { "query_id": 281, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.", "answer": "SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND SUBSTR(T1.atom_id, -1) = '4' AND LENGTH(T1.atom_id) = 7", "difficulty": "challenging", @@ -2540,7 +3381,10 @@ { "query_id": 282, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What is the ratio of Hydrogen elements in molecule ID TR006? Please indicate its label.", "answer": "SELECT CAST(COUNT(CASE WHEN T.element = 'h' THEN T.atom_id ELSE NULL END) AS REAL) / COUNT(T.atom_id) FROM ( SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006' ) AS T UNION ALL SELECT DISTINCT T3.label FROM ( SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006' ) AS T3", "difficulty": "challenging", @@ -2549,7 +3393,10 @@ { "query_id": 283, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Identify whether the chemical compound that contains Calcium is carcinogenic.", "answer": "SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca'", "difficulty": "moderate", @@ -2558,7 +3405,10 @@ { "query_id": 284, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "Determine the bond type that is formed in the chemical compound containing element Tellurium.", "answer": "SELECT DISTINCT T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'te'", "difficulty": "moderate", @@ -2567,7 +3417,11 @@ { "query_id": 285, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom", + "bond" + ], "query": "Name chemical elements that form a bond TR001_10_11.", "answer": "SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_id = 'TR001_10_11'", "difficulty": "challenging", @@ -2576,7 +3430,9 @@ { "query_id": 286, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.", "answer": "SELECT CAST(COUNT(CASE WHEN T.bond_type = '#' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T", "difficulty": "simple", @@ -2585,7 +3441,9 @@ { "query_id": 287, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.", "answer": "SELECT CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T WHERE T.molecule_id = 'TR047'", "difficulty": "moderate", @@ -2594,7 +3452,10 @@ { "query_id": 288, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Identify whether the molecule that contains atom TR001_1 is carcinogenic.", "answer": "SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_1'", "difficulty": "simple", @@ -2603,7 +3464,9 @@ { "query_id": 289, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "Is molecule TR151 carcinogenic?", "answer": "SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR151'", "difficulty": "simple", @@ -2612,7 +3475,9 @@ { "query_id": 290, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "Which toxic element can be found in the molecule TR151?", "answer": "SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR151'", "difficulty": "challenging", @@ -2621,7 +3486,9 @@ { "query_id": 291, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "How many chemical compounds in the database are identified as carcinogenic.", "answer": "SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'", "difficulty": "simple", @@ -2630,7 +3497,9 @@ { "query_id": 292, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.", "answer": "SELECT T.atom_id FROM atom AS T WHERE T.molecule_id BETWEEN 'TR010' AND 'TR050' AND T.element = 'c'", "difficulty": "simple", @@ -2639,7 +3508,10 @@ { "query_id": 293, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "How many atoms belong to the molecule labeled with carcinogenic compounds?", "answer": "SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "simple", @@ -2648,7 +3520,10 @@ { "query_id": 294, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "Which bond ids are double-bond with carcinogenic compound?", "answer": "SELECT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.bond_type = '='", "difficulty": "simple", @@ -2657,7 +3532,10 @@ { "query_id": 295, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?", "answer": "SELECT COUNT(T1.atom_id) AS atomnums_h FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.element = 'h'", "difficulty": "simple", @@ -2666,7 +3544,10 @@ { "query_id": 296, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "Indicate the molecule id is belonging to the TR00_1_2 bond that has the first atom named TR00_1.", "answer": "SELECT T2.molecule_id, T2.bond_id, T1.atom_id FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T1.atom_id = 'TR000_1' AND T2.bond_id = 'TR000_1_2'", "difficulty": "simple", @@ -2675,7 +3556,10 @@ { "query_id": 297, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Among the atoms that contain element carbon, which one does not contain compound carcinogenic?", "answer": "SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'", "difficulty": "simple", @@ -2684,7 +3568,10 @@ { "query_id": 298, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.", "answer": "SELECT CAST(COUNT(CASE WHEN T1.element = 'h' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "moderate", @@ -2693,7 +3580,9 @@ { "query_id": 299, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "Is molecule TR124 carcinogenic?", "answer": "SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR124'", "difficulty": "simple", @@ -2702,7 +3591,9 @@ { "query_id": 300, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "What atoms comprise TR186?", "answer": "SELECT T.atom_id FROM atom AS T WHERE T.molecule_id = 'TR186'", "difficulty": "simple", @@ -2711,7 +3602,9 @@ { "query_id": 301, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "What is the bond type of TR007_4_19?", "answer": "SELECT T.bond_type FROM bond AS T WHERE T.bond_id = 'TR007_4_19'", "difficulty": "simple", @@ -2720,7 +3613,10 @@ { "query_id": 302, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "Name the elements that comprise the atoms of bond TR001_2_4.", "answer": "SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_2_4'", "difficulty": "challenging", @@ -2729,7 +3625,10 @@ { "query_id": 303, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "How many double bonds does TR006 have and is it carcinogenic?", "answer": "SELECT COUNT(T1.bond_id), T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '=' AND T2.molecule_id = 'TR006' GROUP BY T2.label", "difficulty": "moderate", @@ -2738,7 +3637,10 @@ { "query_id": 304, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "List all carcinogenic molecules and their elements.", "answer": "SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "difficulty": "challenging", @@ -2747,7 +3649,10 @@ { "query_id": 305, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "Name all bonds with single bond types and what atoms are connected to the molecules.", "answer": "SELECT T1.bond_id, T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '-'", "difficulty": "simple", @@ -2756,7 +3661,10 @@ { "query_id": 306, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "Which molecules have triple bonds and list all the elements they contain.", "answer": "SELECT DISTINCT T1.molecule_id, T2.element FROM bond AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#'", "difficulty": "challenging", @@ -2765,7 +3673,10 @@ { "query_id": 307, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "Name the atoms' elements that form bond TR000_2_3.", "answer": "SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR000_2_3'", "difficulty": "challenging", @@ -2774,7 +3685,10 @@ { "query_id": 308, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "How many bonds are created by bonding atoms with chlorine element?", "answer": "SELECT COUNT(T1.bond_id) FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T2.element = 'cl'", "difficulty": "simple", @@ -2783,7 +3697,10 @@ { "query_id": 309, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "List out the atom id that belongs to the TR346 molecule and how many bond type can be created by this molecule?", "answer": "SELECT T1.atom_id, COUNT(DISTINCT T2.bond_type) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR346' GROUP BY T1.atom_id, T2.bond_type", "difficulty": "simple", @@ -2792,7 +3709,10 @@ { "query_id": 310, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound?", "answer": "SELECT COUNT(DISTINCT T2.molecule_id), SUM(CASE WHEN T2.label = '+' THEN 1 ELSE 0 END) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '='", "difficulty": "moderate", @@ -2801,7 +3721,10 @@ { "query_id": 311, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "How many molecules without sulphur element is not having double bond?", "answer": "SELECT COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element <> 's' AND T2.bond_type <> '='", "difficulty": "simple", @@ -2810,7 +3733,11 @@ { "query_id": 312, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "What is the carcinogenic label for bond TR001_2_4?", "answer": "SELECT DISTINCT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_id = 'TR001_2_4'", "difficulty": "simple", @@ -2819,7 +3746,9 @@ { "query_id": 313, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "How many atoms belong to molecule id TR005?", "answer": "SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.molecule_id = 'TR005'", "difficulty": "simple", @@ -2828,7 +3757,9 @@ { "query_id": 314, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "How many single bonds are there in the list?", "answer": "SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '-'", "difficulty": "simple", @@ -2837,7 +3768,10 @@ { "query_id": 315, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Among the molecules which contain \"cl\" element, which of them are carcinogenic?", "answer": "SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'cl' AND T2.label = '+'", "difficulty": "simple", @@ -2846,7 +3780,10 @@ { "query_id": 316, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Among the molecules which contain \"c\" element, which of them are not carcinogenic?", "answer": "SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'", "difficulty": "simple", @@ -2855,7 +3792,10 @@ { "query_id": 317, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Calculate the percentage of carcinogenic molecules which contain the Chlorine element.", "answer": "SELECT COUNT(CASE WHEN T2.label = '+' AND T1.element = 'cl' THEN T2.molecule_id ELSE NULL END) * 100 / COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id", "difficulty": "moderate", @@ -2864,7 +3804,10 @@ { "query_id": 318, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "What is the molecule id of bond id TR001_1_7?", "answer": "SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_1_7'", "difficulty": "simple", @@ -2873,7 +3816,10 @@ { "query_id": 319, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "atom" + ], "query": "How many elements are contained in bond_id TR001_3_4?", "answer": "SELECT COUNT(DISTINCT T1.element) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_3_4'", "difficulty": "challenging", @@ -2882,7 +3828,10 @@ { "query_id": 320, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2?", "answer": "SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_1' AND T2.atom_id2 = 'TR000_2'", "difficulty": "moderate", @@ -2891,7 +3840,10 @@ { "query_id": 321, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "connected", + "bond" + ], "query": "What is the molecule of atom id \"TR000_2\" and atom id 2 \"TR000_4\"?", "answer": "SELECT T1.molecule_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_2' AND T2.atom_id2 = 'TR000_4'", "difficulty": "simple", @@ -2900,7 +3852,9 @@ { "query_id": 322, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "What is the element of toxicology for the atom with the ID of TR000_1?", "answer": "SELECT T.element FROM atom AS T WHERE T.atom_id = 'TR000_1'", "difficulty": "challenging", @@ -2909,7 +3863,9 @@ { "query_id": 323, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "Is molecule TR000 is carcinogenic or not?", "answer": "SELECT label FROM molecule AS T WHERE T.molecule_id = 'TR000'", "difficulty": "simple", @@ -2918,7 +3874,9 @@ { "query_id": 324, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Find the percentage of atoms with single bond.", "answer": "SELECT CAST(COUNT(CASE WHEN T.bond_type = '-' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond t", "difficulty": "simple", @@ -2927,7 +3885,10 @@ { "query_id": 325, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "How many carcinogenic molecules that consisted of Nitrogen?", "answer": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'n' AND T1.label = '+'", "difficulty": "simple", @@ -2936,7 +3897,10 @@ { "query_id": 326, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "Which molecule consisted of Sulphur atom with double bond?", "answer": "SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 's' AND T2.bond_type = '='", "difficulty": "simple", @@ -2945,7 +3909,10 @@ { "query_id": 327, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Which non-carcinogenic molecules consisted more than 5 atoms?", "answer": "SELECT T.molecule_id FROM ( SELECT T1.molecule_id, COUNT(T2.atom_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '-' GROUP BY T1.molecule_id HAVING COUNT(T2.atom_id) > 5 ) t", "difficulty": "moderate", @@ -2954,7 +3921,10 @@ { "query_id": 328, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "List all the elements with double bond, consisted in molecule TR024.", "answer": "SELECT T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR024' AND T2.bond_type = '='", "difficulty": "challenging", @@ -2963,7 +3933,10 @@ { "query_id": 329, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "Which carcinogenic molecule have the highest number of atoms consisted in it?", "answer": "SELECT T.molecule_id FROM ( SELECT T2.molecule_id, COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' GROUP BY T2.molecule_id ORDER BY COUNT(T1.atom_id) DESC LIMIT 1 ) t", "difficulty": "moderate", @@ -2972,7 +3945,11 @@ { "query_id": 330, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms.", "answer": "SELECT CAST(SUM(CASE WHEN T1.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T2.element = 'h'", "difficulty": "challenging", @@ -2981,7 +3958,9 @@ { "query_id": 331, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "molecule" + ], "query": "How many of the molecules are carcinogenic?", "answer": "SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'", "difficulty": "simple", @@ -2990,7 +3969,9 @@ { "query_id": 332, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond" + ], "query": "Among the molecules between TR004 to TR010, how many of them has single bonds?", "answer": "SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.molecule_id BETWEEN 'TR004' AND 'TR010' AND T.bond_type = '-'", "difficulty": "simple", @@ -2999,7 +3980,9 @@ { "query_id": 333, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom" + ], "query": "In the molecule TR008, how many carbons are present?", "answer": "SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.molecule_id = 'TR008' AND T.element = 'c'", "difficulty": "simple", @@ -3008,7 +3991,10 @@ { "query_id": 334, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic?", "answer": "SELECT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR004_7' AND T2.label = '-'", "difficulty": "challenging", @@ -3017,7 +4003,10 @@ { "query_id": 335, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "What is the total number of molecules with double bonded oxygen?", "answer": "SELECT COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '=' AND T1.element = 'o'", "difficulty": "simple", @@ -3026,7 +4015,10 @@ { "query_id": 336, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "bond", + "molecule" + ], "query": "in molecules with triple bonds, how many of them are not carcinogenic?", "answer": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '#' AND T1.label = '-'", "difficulty": "simple", @@ -3035,7 +4027,10 @@ { "query_id": 337, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond" + ], "query": "List the element and bond type included in the molecule with molecule ID of TR016.", "answer": "SELECT DISTINCT T1.element, T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR016'", "difficulty": "challenging", @@ -3044,7 +4039,11 @@ { "query_id": 338, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "bond", + "molecule" + ], "query": "What is the atom ID of double bonded carbon in TR012 molecule?", "answer": "SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T2.molecule_id = 'TR012' AND T3.bond_type = '=' AND T1.element = 'c'", "difficulty": "moderate", @@ -3053,7 +4052,10 @@ { "query_id": 339, "database_id": "toxicology", - "table_id": "N/A", + "table_id": [ + "atom", + "molecule" + ], "query": "List the atom ID of the carcinogenic molecule that contains oxygen?", "answer": "SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'o' AND T2.label = '+'", "difficulty": "simple", @@ -3062,7 +4064,9 @@ { "query_id": 340, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Which are the cards that have incredibly powerful foils.", "answer": "SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL", "difficulty": "simple", @@ -3071,7 +4075,9 @@ { "query_id": 341, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the borderless cards available without powerful foils?", "answer": "SELECT id FROM cards WHERE borderColor = 'borderless' AND (cardKingdomId IS NULL OR cardKingdomId IS NULL)", "difficulty": "simple", @@ -3080,7 +4086,9 @@ { "query_id": 342, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "List the card names with value that cost more converted mana for the face.", "answer": "SELECT name FROM cards ORDER BY faceConvertedManaCost LIMIT 1", "difficulty": "simple", @@ -3089,7 +4097,9 @@ { "query_id": 343, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Name all cards with 2015 frame style ranking below 100 on EDHRec.", "answer": "SELECT id FROM cards WHERE edhrecRank < 100 AND frameVersion = 2015", "difficulty": "simple", @@ -3098,7 +4108,10 @@ { "query_id": 344, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "List all the mythic rarity print cards banned in gladiator format.", "answer": "SELECT DISTINCT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'gladiator' AND T2.status = 'Banned' AND T1.rarity = 'mythic'", "difficulty": "moderate", @@ -3107,7 +4120,10 @@ { "query_id": 345, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "For artifact type of cards that do not have multiple faces on the same card, state its legalities for vintage play format.", "answer": "SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.type = 'Artifact' AND T2.format = 'vintage' AND T1.side IS NULL", "difficulty": "moderate", @@ -3116,7 +4132,10 @@ { "query_id": 346, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "List all the card id and artist with unknown power which are legal for commander play format.", "answer": "SELECT T1.id, T1.artist FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Legal' AND T2.format = 'commander' AND (T1.power IS NULL OR T1.power = '*')", "difficulty": "moderate", @@ -3125,7 +4144,10 @@ { "query_id": 347, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards. State if these cards have missing or degraded properties and values.", "answer": "SELECT T1.id, T2.text, T1.hasContentWarning FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Stephen Daniele'", "difficulty": "moderate", @@ -3134,7 +4156,10 @@ { "query_id": 348, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "Describe the information about rulings for card named 'Sublime Epiphany' with number 74s.", "answer": "SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Sublime Epiphany' AND T1.number = '74s'", "difficulty": "simple", @@ -3143,7 +4168,10 @@ { "query_id": 349, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "Name the card and artist with the most ruling information. Also state if the card is a promotional printing.", "answer": "SELECT T1.name, T1.artist, T1.isPromo FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.isPromo = 1 GROUP BY T1.artist ORDER BY COUNT(DISTINCT T1.uuid) DESC LIMIT 1", "difficulty": "moderate", @@ -3152,7 +4180,10 @@ { "query_id": 350, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "State the alternative languages available for card named Annul numbered 29.", "answer": "SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Annul' AND T1.number = 29", "difficulty": "simple", @@ -3161,7 +4192,10 @@ { "query_id": 351, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Name all the cards which have alternative language in Japanese.", "answer": "SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Japanese'", "difficulty": "simple", @@ -3170,7 +4204,10 @@ { "query_id": 352, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Calculate the percentage of the cards availabe in Chinese Simplified.", "answer": "SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid", "difficulty": "moderate", @@ -3179,7 +4216,10 @@ { "query_id": 353, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "List all the sets available in Italian translation. State the total number of cards per set.", "answer": "SELECT T1.name, T1.totalSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Italian'", "difficulty": "simple", @@ -3188,7 +4228,9 @@ { "query_id": 354, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many types of cards does the artist Aaron Boyd illustrated about card art?", "answer": "SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'", "difficulty": "simple", @@ -3197,7 +4239,9 @@ { "query_id": 355, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the keyword found on card 'Angel of Mercy'?", "answer": "SELECT DISTINCT keywords FROM cards WHERE name = 'Angel of Mercy'", "difficulty": "simple", @@ -3206,7 +4250,9 @@ { "query_id": 356, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards have infinite power?", "answer": "SELECT COUNT(*) FROM cards WHERE power = '*'", "difficulty": "simple", @@ -3215,7 +4261,9 @@ { "query_id": 357, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What type of promotion is of card 'Duress'?", "answer": "SELECT promoTypes FROM cards WHERE name = 'Duress' AND promoTypes IS NOT NULL", "difficulty": "simple", @@ -3224,7 +4272,9 @@ { "query_id": 358, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the border color of card \"Ancestor's Chosen\"?", "answer": "SELECT DISTINCT borderColor FROM cards WHERE name = 'Ancestor''s Chosen'", "difficulty": "simple", @@ -3233,7 +4283,9 @@ { "query_id": 359, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the type of the card \"Ancestor's Chosen\" as originally printed?", "answer": "SELECT originalType FROM cards WHERE name = 'Ancestor''s Chosen' AND originalType IS NOT NULL", "difficulty": "simple", @@ -3242,7 +4294,10 @@ { "query_id": 360, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question\nWhat are the languages available for the set that card 'Angel of Mercy' is in?", "answer": "SELECT language FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )", "difficulty": "moderate", @@ -3251,7 +4306,10 @@ { "query_id": 361, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "How many cards of legalities whose status is restricted have text boxes?", "answer": "SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Restricted' AND T1.isTextless = 0", "difficulty": "simple", @@ -3260,7 +4318,10 @@ { "query_id": 362, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "What is the description about the ruling of card \"Condemn\"?", "answer": "SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Condemn'", "difficulty": "simple", @@ -3269,7 +4330,10 @@ { "query_id": 363, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "How many cards of legalities whose status is restricted are found in a starter deck?", "answer": "SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Restricted' AND T1.isStarter = 1", "difficulty": "simple", @@ -3278,7 +4342,10 @@ { "query_id": 364, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "What is the status of card \"Cloudchaser Eagle\"?", "answer": "SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Cloudchaser Eagle'", "difficulty": "simple", @@ -3287,7 +4354,10 @@ { "query_id": 365, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the type of card \"Benalish Knight\"?", "answer": "SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight'", "difficulty": "simple", @@ -3296,7 +4366,10 @@ { "query_id": 366, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "What is the rule of playing card \"Benalish Knight\"?", "answer": "SELECT T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight'", "difficulty": "simple", @@ -3305,7 +4378,10 @@ { "query_id": 367, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Please provide the names of the artists who illustrated the card art in Phyrexian.", "answer": "SELECT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Phyrexian'", "difficulty": "simple", @@ -3314,7 +4390,9 @@ { "query_id": 368, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the percentage of borderless cards?", "answer": "SELECT CAST(SUM(CASE WHEN borderColor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards", "difficulty": "simple", @@ -3323,7 +4401,10 @@ { "query_id": 369, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "How many cards that illusrtated in German have been reprinted?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.isReprint = 1", "difficulty": "simple", @@ -3332,7 +4413,10 @@ { "query_id": 370, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "How many borderless cards are illustrated in Russian?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.borderColor = 'borderless' AND T2.language = 'Russian'", "difficulty": "simple", @@ -3341,7 +4425,10 @@ { "query_id": 371, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the percentage of cards whose language is French among the Story Spotlight cards?", "answer": "SELECT CAST(SUM(CASE WHEN T2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.isStorySpotlight = 1", "difficulty": "challenging", @@ -3350,7 +4437,9 @@ { "query_id": 372, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards are there with toughness of 99?", "answer": "SELECT COUNT(id) FROM cards WHERE toughness = 99", "difficulty": "simple", @@ -3359,7 +4448,9 @@ { "query_id": 373, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Name the cards that were illustrated by Aaron Boyd.", "answer": "SELECT DISTINCT name FROM cards WHERE artist = 'Aaron Boyd'", "difficulty": "simple", @@ -3368,7 +4459,9 @@ { "query_id": 374, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many black border cards are only available on mtgo?", "answer": "SELECT COUNT(id) FROM cards WHERE availability = 'mtgo' AND borderColor = 'black'", "difficulty": "simple", @@ -3377,7 +4470,9 @@ { "query_id": 375, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "List down all the card IDs with converted mana cost of 0.", "answer": "SELECT id FROM cards WHERE convertedManaCost = 0", "difficulty": "simple", @@ -3386,7 +4481,9 @@ { "query_id": 376, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the card layout of cards with keyword of flying?", "answer": "SELECT layout FROM cards WHERE keywords = 'Flying'", "difficulty": "simple", @@ -3395,7 +4492,9 @@ { "query_id": 377, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards with original type of \"Summon - Angel\" have subtype other than \"Angel\"?", "answer": "SELECT COUNT(id) FROM cards WHERE originalType = 'Summon - Angel' AND subtypes != 'Angel'", "difficulty": "simple", @@ -3404,7 +4503,9 @@ { "query_id": 378, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.", "answer": "SELECT id FROM cards WHERE cardKingdomId IS NOT NULL AND cardKingdomFoilId IS NOT NULL", "difficulty": "simple", @@ -3413,7 +4514,9 @@ { "query_id": 379, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the cards belong to duel deck a? List the ID.", "answer": "SELECT id FROM cards WHERE duelDeck = 'a'", "difficulty": "simple", @@ -3422,7 +4525,9 @@ { "query_id": 380, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "List the edhrecRank for cards with frame version 2015.", "answer": "SELECT edhrecRank FROM cards WHERE frameVersion = 2015", "difficulty": "simple", @@ -3431,7 +4536,10 @@ { "query_id": 381, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "List down the name of artists for cards in Chinese Simplified.", "answer": "SELECT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Chinese Simplified'", "difficulty": "simple", @@ -3440,7 +4548,10 @@ { "query_id": 382, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What are the cards that only available in paper and Japanese language?", "answer": "SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.availability = 'paper' AND T2.language = 'Japanese'", "difficulty": "simple", @@ -3449,7 +4560,10 @@ { "query_id": 383, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "How many of the banned cards are white border?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Banned' AND T1.borderColor = 'white'", "difficulty": "simple", @@ -3458,7 +4572,11 @@ { "query_id": 384, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities", + "foreign_data" + ], "query": "List down the uuid for legacy cards and the foreign language of these cards.", "answer": "SELECT T1.uuid, T3.language FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid INNER JOIN foreign_data AS T3 ON T1.uuid = T3.uuid WHERE T2.format = 'legacy'", "difficulty": "simple", @@ -3467,7 +4585,10 @@ { "query_id": 385, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "Write down the ruling of Beacon of Immortality.", "answer": "SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Beacon of Immortality'", "difficulty": "simple", @@ -3476,7 +4597,10 @@ { "query_id": 386, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "How many cards are having future frame version and what are the legality status of these cards?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.frameVersion = 'future'", "difficulty": "simple", @@ -3485,7 +4609,10 @@ { "query_id": 387, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "What are the cards for set OGW? State the colour for these cards.", "answer": "SELECT id, colors FROM cards WHERE id IN ( SELECT id FROM set_translations WHERE setCode = 'OGW' )", "difficulty": "simple", @@ -3494,7 +4621,10 @@ { "query_id": 388, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "What are the cards in set 10E with converted mana of 5 have translation and what are the languages?", "answer": "SELECT id, language FROM set_translations WHERE id = ( SELECT id FROM cards WHERE convertedManaCost = 5 ) AND setCode = '10E'", "difficulty": "simple", @@ -3503,7 +4633,10 @@ { "query_id": 389, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "List down the name of cards with original types of Creature - Elf and the date of rulings for these cards.", "answer": "SELECT T1.id, T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Creature - Elf'", "difficulty": "simple", @@ -3512,7 +4645,10 @@ { "query_id": 390, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "What are the colors of cards from ID 1-20? What are the format of these cards?", "answer": "SELECT T1.colors, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.id BETWEEN 1 AND 20", "difficulty": "simple", @@ -3521,7 +4657,10 @@ { "query_id": 391, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Among the Artifact cards, which are black color and comes with foreign languague translation?", "answer": "SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Artifact' AND T1.colors = 'B'", "difficulty": "moderate", @@ -3530,7 +4669,10 @@ { "query_id": 392, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "Pick 3 cards with rarity of uncommon, list down name these cards according to ascending order of it's ruling date.", "answer": "SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'uncommon' ORDER BY T2.date ASC LIMIT 3", "difficulty": "simple", @@ -3539,7 +4681,9 @@ { "query_id": 393, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "On how many cards designed by John Avon is its foil non-powerful?", "answer": "SELECT COUNT(id) FROM cards WHERE (cardKingdomId IS NULL OR cardKingdomFoilId IS NULL) AND artist = 'John Avon'", "difficulty": "simple", @@ -3548,7 +4692,9 @@ { "query_id": 394, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many white bordered cards are powerful?", "answer": "SELECT COUNT(id) FROM cards WHERE borderColor = 'white' AND cardKingdomId IS NOT NULL AND cardKingdomFoilId IS NOT NULL", "difficulty": "simple", @@ -3557,7 +4703,9 @@ { "query_id": 395, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1?", "answer": "SELECT COUNT(id) FROM cards WHERE hAND = '-1' AND artist = 'UDON' AND Availability = 'print' AND type = 'mtgo'", "difficulty": "simple", @@ -3566,7 +4714,9 @@ { "query_id": 396, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards with a 1993 frame version and available on paper have a sensitive content warning?", "answer": "SELECT COUNT(id) FROM cards WHERE frameVersion = 1993 AND availability = 'paper' AND hasContentWarning = 1", "difficulty": "simple", @@ -3575,7 +4725,9 @@ { "query_id": 397, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the mana cost of cards with a normal layout, a 2003 frame version, with a black border color, and available in paper and mtgo?", "answer": "SELECT manaCost FROM cards WHERE availability = 'mtgo,paper' AND borderColor = 'black' AND frameVersion = 2003 AND layout = 'normal'", "difficulty": "moderate", @@ -3584,7 +4736,9 @@ { "query_id": 398, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How much unconverted mana do all the cards created by Rob Alexander cost in total?", "answer": "SELECT SUM(manaCost) FROM cards WHERE artist = 'Rob Alexander'", "difficulty": "simple", @@ -3593,7 +4747,9 @@ { "query_id": 399, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Lists all types of cards available in arena.", "answer": "SELECT DISTINCT subtypes, supertypes FROM cards WHERE availability = 'arena' AND subtypes IS NOT NULL AND supertypes IS NOT NULL", "difficulty": "simple", @@ -3602,7 +4758,9 @@ { "query_id": 400, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "set_translations" + ], "query": "Lists the set code of all cards translated into Spanish.", "answer": "SELECT setCode FROM set_translations WHERE language = 'Spanish'", "difficulty": "simple", @@ -3611,7 +4769,9 @@ { "query_id": 401, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What percentage of legendary frame effect cards have a maximum starting maximun hand\nsize of +3?", "answer": "SELECT SUM(CASE WHEN hAND = '+3' THEN 1.0 ELSE 0 END) / COUNT(id) * 100 FROM cards WHERE frameEffects = 'legendary'", "difficulty": "moderate", @@ -3620,7 +4780,9 @@ { "query_id": 402, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the percentage of Story Spotlight cards that also have a text box? List them by their ID.", "answer": "SELECT CAST(SUM(CASE WHEN isTextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isStorySpotlight = 1", "difficulty": "moderate", @@ -3629,7 +4791,9 @@ { "query_id": 403, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "foreign_data" + ], "query": "Calculate the percentage of cards in Spanish. List them by name.", "answer": "SELECT ( SELECT CAST(SUM(CASE WHEN language = 'Spanish' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM foreign_data ), name FROM foreign_data WHERE language = 'Spanish'", "difficulty": "simple", @@ -3638,7 +4802,10 @@ { "query_id": 404, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Indicates the name of all the languages into which the set whose number of cards is 309 is translated.", "answer": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.baseSetSize = 309", "difficulty": "simple", @@ -3647,7 +4814,10 @@ { "query_id": 405, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "How many Brazilian Portuguese translated sets are inside the Commander block?", "answer": "SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Portuguese (Brazil)' AND T1.block = 'Commander'", "difficulty": "moderate", @@ -3656,7 +4826,11 @@ { "query_id": 406, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities", + "rulings" + ], "query": "Lists by ID all Creature-type cards with legal status.", "answer": "SELECT T1.id FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid INNER JOIN legalities AS T3 ON T1.uuid = T3.uuid WHERE T3.status = 'Legal' AND T1.types = 'Creature'", "difficulty": "simple", @@ -3665,7 +4839,10 @@ { "query_id": 407, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Lists all types of cards in German.", "answer": "SELECT T1.subtypes, T1.supertypes FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.subtypes IS NOT NULL AND T1.supertypes IS NOT NULL", "difficulty": "moderate", @@ -3674,7 +4851,10 @@ { "query_id": 408, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "How many null power cards contain info about the triggered ability", "answer": "SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE (T1.power IS NULL OR T1.power LIKE '%*%') AND T2.text LIKE '%triggered ability%'", "difficulty": "moderate", @@ -3683,7 +4863,11 @@ { "query_id": 409, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities", + "rulings" + ], "query": "Indicates the number of cards with pre-modern format, ruling text \"This is a triggered mana ability\" that do not have multiple faces.", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid INNER JOIN rulings AS T3 ON T1.uuid = T3.uuid WHERE T2.format = 'premodern' AND T3.text = 'This is a triggered mana ability.' AND T1.Side IS NULL", "difficulty": "moderate", @@ -3692,7 +4876,10 @@ { "query_id": 410, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID.", "answer": "SELECT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Erica Yang' AND T2.format = 'pauper' AND T1.availability = 'paper'", "difficulty": "simple", @@ -3701,7 +4888,10 @@ { "query_id": 411, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "To which artist does the card with the text \"Das perfekte Gegenmittel zu einer dichten Formation\" belong?", "answer": "SELECT DISTINCT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.flavorText LIKE '%DAS perfekte Gegenmittel zu einer dichten Formation%'", "difficulty": "simple", @@ -3710,7 +4900,10 @@ { "query_id": 412, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the foreign name of the card in French of type Creature, normal layout and black border color, by artist Matthew D. Wilson?", "answer": "SELECT name FROM foreign_data WHERE uuid IN ( SELECT uuid FROM cards WHERE types = 'Creature' AND layout = 'normal' AND borderColor = 'black' AND artist = 'Matthew D. Wilson' ) AND language = 'French'", "difficulty": "moderate", @@ -3719,7 +4912,10 @@ { "query_id": 413, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "How many cards with print rarity have ruling text printed on 10/01/2009?", "answer": "SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'rare' AND T2.date = '2009-01-10'", "difficulty": "simple", @@ -3728,7 +4924,10 @@ { "query_id": 414, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What language is the set of 180 cards that belongs to the Ravnica block translated into?", "answer": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Ravnica' AND T1.baseSetSize = 180", "difficulty": "simple", @@ -3737,7 +4936,10 @@ { "query_id": 415, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "What percentage of cards with format commander and legal status do not have a content warning?", "answer": "SELECT CAST(SUM(CASE WHEN T1.hasContentWarning = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'commander' AND T2.status = 'Legal'", "difficulty": "challenging", @@ -3746,7 +4948,10 @@ { "query_id": 416, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What percentage of cards without power are in French?", "answer": "SELECT CAST(SUM(CASE WHEN T2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.power IS NULL OR T1.power LIKE '%*%'", "difficulty": "challenging", @@ -3755,7 +4960,10 @@ { "query_id": 417, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What percentage of Japanese translated sets are expansion sets?", "answer": "SELECT CAST(SUM(CASE WHEN T2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.type = 'expansion'", "difficulty": "moderate", @@ -3764,7 +4972,9 @@ { "query_id": 418, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What kind of printing is on the card that Daren Bader created?", "answer": "SELECT DISTINCT availability FROM cards WHERE artist = 'Daren Bader'", "difficulty": "simple", @@ -3773,7 +4983,9 @@ { "query_id": 419, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many color cards with no borders have been ranked higher than 12000 on EDHRec?", "answer": "SELECT COUNT(id) FROM cards WHERE edhrecRank > 12000 AND borderColor = 'borderless'", "difficulty": "simple", @@ -3782,7 +4994,9 @@ { "query_id": 420, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards are oversized, reprinted, and printed for promotions?", "answer": "SELECT COUNT(id) FROM cards WHERE isOversized = 1 AND isReprint = 1 AND isPromo = 1", "difficulty": "simple", @@ -3791,7 +5005,9 @@ { "query_id": 421, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Please list top three unknown power cards that have promotional types for arena league in alphabetical order.", "answer": "SELECT name FROM cards WHERE (power IS NULL OR power LIKE '%*%') AND promoTypes = 'arenaleague' ORDER BY name LIMIT 3", "difficulty": "simple", @@ -3800,7 +5016,9 @@ { "query_id": 422, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "foreign_data" + ], "query": "What is the language of the card with the multiverse number 149934?", "answer": "SELECT language FROM foreign_data WHERE multiverseid = 149934", "difficulty": "simple", @@ -3809,7 +5027,9 @@ { "query_id": 423, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Please provide the ids of top three powerful pairs of Kingdom Foil and Kingdom Cards sorted by Kingdom Foil id in alphabetical order.", "answer": "SELECT cardKingdomFoilId, cardKingdomId FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL ORDER BY cardKingdomFoilId LIMIT 3", "difficulty": "simple", @@ -3818,7 +5038,9 @@ { "query_id": 424, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What proportion of cards do not have a text box with a normal layout?", "answer": "SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards", "difficulty": "simple", @@ -3827,7 +5049,9 @@ { "query_id": 425, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?", "answer": "SELECT id FROM cards WHERE subtypes = 'Angel,Wizard' AND side IS NULL", "difficulty": "simple", @@ -3836,7 +5060,9 @@ { "query_id": 426, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.", "answer": "SELECT name FROM sets WHERE mtgoCode IS NULL ORDER BY name LIMIT 3", "difficulty": "simple", @@ -3845,7 +5071,10 @@ { "query_id": 427, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What languages are available in the set known as Archenemy on the magic card market and having the code ARC?", "answer": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.mcmName = 'Archenemy' AND T2.setCode = 'ARC'", "difficulty": "moderate", @@ -3854,7 +5083,10 @@ { "query_id": 428, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the name of set number 5 and its translation?", "answer": "SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 5 GROUP BY T1.name, T2.translation", "difficulty": "simple", @@ -3863,7 +5095,10 @@ { "query_id": 429, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the language and expansion type of set number 206?", "answer": "SELECT T2.language, T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 206", "difficulty": "simple", @@ -3872,7 +5107,10 @@ { "query_id": 430, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Please list top two sets of cards with their IDs that have Italian-language cards and are located in the Shadowmoor block in alphabetical order.", "answer": "SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Shadowmoor' AND T2.language = 'Italian' ORDER BY T1.id LIMIT 2", "difficulty": "simple", @@ -3881,7 +5119,10 @@ { "query_id": 431, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Which set is not available outside of the United States and has foil cards with Japanese writing on them? Please include the set ID in your response.", "answer": "SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Japanese' AND T1.isFoilOnly = 1 AND T1.isForeignOnly = 0", "difficulty": "challenging", @@ -3890,7 +5131,10 @@ { "query_id": 432, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Which Russian set of cards contains the most cards overall?", "answer": "SELECT T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Russian' GROUP BY T1.baseSetSize ORDER BY COUNT(T1.id) DESC LIMIT 1", "difficulty": "moderate", @@ -3899,7 +5143,10 @@ { "query_id": 433, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games?", "answer": "SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' AND T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode", "difficulty": "moderate", @@ -3908,7 +5155,10 @@ { "query_id": 434, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "How many sets are available just in Japanese and not in Magic: The Gathering Online?", "answer": "SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '')", "difficulty": "moderate", @@ -3917,7 +5167,9 @@ { "query_id": 435, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many card border with black color ? List out the card id.", "answer": "SELECT id FROM cards WHERE borderColor = 'black' GROUP BY id", "difficulty": "simple", @@ -3926,7 +5178,9 @@ { "query_id": 436, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards have frame effect as extendedart? List out the id of those cards.", "answer": "SELECT id FROM cards WHERE frameEffects = 'extendedart' GROUP BY id", "difficulty": "simple", @@ -3935,7 +5189,9 @@ { "query_id": 437, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Among black card borders, which card has full artwork?", "answer": "SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1", "difficulty": "simple", @@ -3944,7 +5200,9 @@ { "query_id": 438, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "set_translations" + ], "query": "Point out the language of set id \"174\"?", "answer": "SELECT language FROM set_translations WHERE id = 174", "difficulty": "simple", @@ -3953,7 +5211,9 @@ { "query_id": 439, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "List out the set name of the set code \"ALL\".", "answer": "SELECT name FROM sets WHERE code = 'ALL'", "difficulty": "simple", @@ -3962,7 +5222,9 @@ { "query_id": 440, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "foreign_data" + ], "query": "Which foreign language used by \"A Pedra Fellwar\"?", "answer": "SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'", "difficulty": "simple", @@ -3971,7 +5233,10 @@ { "query_id": 441, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "State the set code of the set with release date of 07/13/2007?", "answer": "SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.releaseDate = '2007-07-13'", "difficulty": "simple", @@ -3980,7 +5245,10 @@ { "query_id": 442, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Mention the base set size and set code of the set that was in block named \"Masques\" and \"Mirage\".", "answer": "SELECT DISTINCT T1.baseSetSize, T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.block IN ('Masques', 'Mirage')", "difficulty": "simple", @@ -3989,7 +5257,10 @@ { "query_id": 443, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Give the code of sets have expansion type of 'expansion'?", "answer": "SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.type = 'expansion' GROUP BY T2.setCode", "difficulty": "simple", @@ -3998,7 +5269,10 @@ { "query_id": 444, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Name the foreign name of the card that has boros watermark? List out the type of this card.", "answer": "SELECT DISTINCT T1.name, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'boros'", "difficulty": "simple", @@ -4007,7 +5281,10 @@ { "query_id": 445, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.", "answer": "SELECT DISTINCT T2.language, T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'colorpie'", "difficulty": "simple", @@ -4016,7 +5293,10 @@ { "query_id": 446, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror?", "answer": "SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id), T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Abyssal Horror'", "difficulty": "moderate", @@ -4025,7 +5305,10 @@ { "query_id": 447, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Give the code of sets have expansion commander type?", "answer": "SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.type = 'commander'", "difficulty": "simple", @@ -4034,7 +5317,10 @@ { "query_id": 448, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Name the foreign name of the card that has abzan watermark? List out the type of this card.", "answer": "SELECT DISTINCT T1.name, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'abzan'", "difficulty": "simple", @@ -4043,7 +5329,10 @@ { "query_id": 449, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the language of the card that has azorius watermark? List out the type of this card.", "answer": "SELECT DISTINCT T2.language, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'azorius'", "difficulty": "simple", @@ -4052,7 +5341,9 @@ { "query_id": 450, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?", "answer": "SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) FROM cards", "difficulty": "moderate", @@ -4061,7 +5352,9 @@ { "query_id": 451, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards available in paper have a positive starting maximum hand size?", "answer": "SELECT SUM(CASE WHEN availability = 'paper' AND hAND LIKE '+%' AND hAND != '+0' THEN 1 ELSE 0 END) FROM cards", "difficulty": "simple", @@ -4070,7 +5363,9 @@ { "query_id": 452, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Please list the names of the cards that have a text box.", "answer": "SELECT DISTINCT name FROM cards WHERE isTextless = 0", "difficulty": "simple", @@ -4079,7 +5374,9 @@ { "query_id": 453, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What's the unconverted mana cost of the card \"Ancestor's Chosen\"?", "answer": "SELECT DISTINCT manaCost FROM cards WHERE name = 'Ancestor''s Chosen'", "difficulty": "simple", @@ -4088,7 +5385,9 @@ { "query_id": 454, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Among the cards with a white border color, how many of them have unknown power?", "answer": "SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'", "difficulty": "simple", @@ -4097,7 +5396,9 @@ { "query_id": 455, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.", "answer": "SELECT DISTINCT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL", "difficulty": "simple", @@ -4106,7 +5407,9 @@ { "query_id": 456, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What's the list of all types for the card \"Molimo, Maro-Sorcerer\"?", "answer": "SELECT DISTINCT subtypes, supertypes FROM cards WHERE name = 'Molimo, Maro-Sorcerer'", "difficulty": "simple", @@ -4115,7 +5418,9 @@ { "query_id": 457, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Please list the websites where I can purchase the cards that have the promotional type of \"bundle\".", "answer": "SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'", "difficulty": "simple", @@ -4124,7 +5429,9 @@ { "query_id": 458, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many artists have designed a card with a black border color and is available in both \"arena\" and \"mtgo\" printing type?", "answer": "SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' THEN 1 ELSE NULL END) FROM cards", "difficulty": "simple", @@ -4133,7 +5440,9 @@ { "query_id": 459, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Which card costs more converted mana, \"Serra Angel\" or \"Shrine Keeper\"?", "answer": "SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedManaCost DESC LIMIT 1", "difficulty": "moderate", @@ -4142,7 +5451,9 @@ { "query_id": 460, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Which artist designed the card whose promotional name is \"Battra, Dark Destroyer\"?", "answer": "SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'", "difficulty": "simple", @@ -4151,7 +5462,9 @@ { "query_id": 461, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style.", "answer": "SELECT name FROM cards WHERE frameVersion = 2003 ORDER BY convertedManaCost DESC LIMIT 3", "difficulty": "simple", @@ -4160,7 +5473,10 @@ { "query_id": 462, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "What's the Italian name of the set of cards with \"Ancestor's Chosen\" is in?", "answer": "SELECT translation FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen' ) AND language = 'Italian'", "difficulty": "moderate", @@ -4169,7 +5485,10 @@ { "query_id": 463, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "How many translations are there for the set of cards with \"Angel of Mercy\" in it?", "answer": "SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL", "difficulty": "simple", @@ -4178,7 +5497,10 @@ { "query_id": 464, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "Please list the names of the cards in the set \"Hauptset Zehnte Edition\".", "answer": "SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition'", "difficulty": "simple", @@ -4187,7 +5509,10 @@ { "query_id": 465, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "For the set of cards with \"Ancestor's Chosen\" in it, is there a Korean version of it?", "answer": "SELECT IIF(SUM(CASE WHEN T2.language = 'Korean' AND T2.translation IS NOT NULL THEN 1 ELSE 0 END) > 0, 'YES', 'NO') FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'", "difficulty": "moderate", @@ -4196,7 +5521,10 @@ { "query_id": 466, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "Among the cards in the set \"Hauptset Zehnte Edition\", how many of them are designed by Adam Rex?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition' AND T1.artist = 'Adam Rex'", "difficulty": "moderate", @@ -4205,7 +5533,10 @@ { "query_id": 467, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "How many cards are there in the base set of \"Hauptset Zehnte Edition\"?", "answer": "SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'", "difficulty": "simple", @@ -4214,7 +5545,10 @@ { "query_id": 468, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the Simplified Chinese translation of the name of the set \"Eighth Edition\"?", "answer": "SELECT T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Eighth Edition' AND T2.language = 'Chinese Simplified'", "difficulty": "moderate", @@ -4223,7 +5557,10 @@ { "query_id": 469, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Did the set of cards with \"Angel of Mercy\" appear on Magic: The Gathering Online?", "answer": "SELECT IIF(T2.mtgoCode IS NOT NULL, 'YES', 'NO') FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Angel of Mercy'", "difficulty": "moderate", @@ -4232,7 +5569,10 @@ { "query_id": 470, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "When was the set of cards with \"Ancestor's Chosen\" released?", "answer": "SELECT DISTINCT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'", "difficulty": "simple", @@ -4241,7 +5581,10 @@ { "query_id": 471, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the expansion type of the set \"Hauptset Zehnte Edition\"?", "answer": "SELECT T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'", "difficulty": "simple", @@ -4250,7 +5593,10 @@ { "query_id": 472, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Among the sets in the block \"Ice Age\", how many of them have an Italian translation?", "answer": "SELECT COUNT(DISTINCT T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.block = 'Ice Age' AND T2.language = 'Italian' AND T2.translation IS NOT NULL", "difficulty": "moderate", @@ -4259,7 +5605,10 @@ { "query_id": 473, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Is the set of cards with Adarkar Valkyrie only available outside the United States?", "answer": "SELECT IIF(isForeignOnly = 1, 'YES', 'NO') FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Adarkar Valkyrie'", "difficulty": "moderate", @@ -4268,7 +5617,10 @@ { "query_id": 474, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Among the sets of cards that have an Italian translation, how many of them have a base set number of under 10?", "answer": "SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation IS NOT NULL AND T1.baseSetSize < 10 AND T2.language = 'Italian'", "difficulty": "moderate", @@ -4277,7 +5629,10 @@ { "query_id": 475, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "How many cards in the set Coldsnap have a black border color?", "answer": "SELECT SUM(CASE WHEN T1.borderColor = 'black' THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "difficulty": "simple", @@ -4286,7 +5641,10 @@ { "query_id": 476, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Please list the name of the cards in the set Coldsnap with the highest converted mana cost.", "answer": "SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' ORDER BY T1.convertedManaCost DESC LIMIT 1", "difficulty": "simple", @@ -4295,7 +5653,10 @@ { "query_id": 477, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Which of these artists have designed a card in the set Coldsnap, Jeremy Jarvis, Aaron Miller or Chippy?", "answer": "SELECT T1.artist FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE (T2.name = 'Coldsnap' AND T1.artist = 'Chippy') OR (T2.name = 'Coldsnap' AND T1.artist = 'Aaron Miller') OR (T2.name = 'Coldsnap' AND T1.artist = 'Jeremy Jarvis') GROUP BY T1.artist", "difficulty": "challenging", @@ -4304,7 +5665,10 @@ { "query_id": 478, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What is card number 4 in the set Coldsnap?", "answer": "SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.number = 4", "difficulty": "simple", @@ -4313,7 +5677,10 @@ { "query_id": 479, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?", "answer": "SELECT SUM(CASE WHEN T1.power LIKE '%*%' OR T1.power IS NULL THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5", "difficulty": "moderate", @@ -4322,7 +5689,10 @@ { "query_id": 480, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What is the Italian flavor text of the card \"Ancestor's Chosen\"?", "answer": "SELECT T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'", "difficulty": "moderate", @@ -4331,7 +5701,10 @@ { "query_id": 481, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "Please list all the foreign languages in which the card \"Ancestor's Chosen\" has a flavor text.", "answer": "SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.flavorText IS NOT NULL", "difficulty": "simple", @@ -4340,7 +5713,10 @@ { "query_id": 482, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "What's the German type of the card \"Ancestor's Chosen\"?", "answer": "SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'German'", "difficulty": "simple", @@ -4349,7 +5725,11 @@ { "query_id": 483, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "foreign_data", + "sets", + "cards" + ], "query": "Please list the Italian text ruling of all the cards in the set Coldsnap.", "answer": "SELECT DISTINCT T1.text FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian'", "difficulty": "moderate", @@ -4358,7 +5738,11 @@ { "query_id": 484, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "foreign_data", + "sets", + "cards" + ], "query": "Please list the Italian names of the cards in the set Coldsnap with the highest converted mana cost.", "answer": "SELECT T2.name FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian' ORDER BY T2.convertedManaCost DESC LIMIT 1", "difficulty": "moderate", @@ -4367,7 +5751,10 @@ { "query_id": 485, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "When was the ruling for the card 'Reminisce' created?", "answer": "SELECT T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Reminisce'", "difficulty": "simple", @@ -4376,7 +5763,10 @@ { "query_id": 486, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap?", "answer": "SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "difficulty": "moderate", @@ -4385,7 +5775,10 @@ { "query_id": 487, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What is the percentage of incredibly powerful cards in the set Coldsnap?", "answer": "SELECT CAST(SUM(CASE WHEN T1.cardKingdomFoilId IS NOT NULL AND T1.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "difficulty": "challenging", @@ -4394,7 +5787,9 @@ { "query_id": 488, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "What's the code for the set which was released on 2017/7/14?", "answer": "SELECT code FROM sets WHERE releaseDate = '2017-07-14' GROUP BY releaseDate, code", "difficulty": "simple", @@ -4403,7 +5798,9 @@ { "query_id": 489, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "List the keyrune code for the set whose code is 'PKHC'.", "answer": "SELECT keyruneCode FROM sets WHERE code = 'PKHC'", "difficulty": "simple", @@ -4412,7 +5809,9 @@ { "query_id": 490, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "For the set which had 'SS2' as the code, what is its magic card market id?", "answer": "SELECT mcmId FROM sets WHERE code = 'SS2'", "difficulty": "simple", @@ -4421,7 +5820,9 @@ { "query_id": 491, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "What's the magic card market name for the set which was released on 2017/6/9?", "answer": "SELECT mcmName FROM sets WHERE releaseDate = '2017-06-09'", "difficulty": "simple", @@ -4430,7 +5831,9 @@ { "query_id": 492, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "For the set \"From the Vault: Lore\", what is its expansion type?", "answer": "SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'", "difficulty": "simple", @@ -4439,7 +5842,9 @@ { "query_id": 493, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "For the set \"Commander 2014 Oversized\" , give its parent code.", "answer": "SELECT parentCode FROM sets WHERE name = 'Commander 2014 Oversized'", "difficulty": "simple", @@ -4448,7 +5853,10 @@ { "query_id": 494, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "For all cards illustrated by Jim Pavelec. and describe the text of the ruling of these cards. Do these cards have missing or degraded properties and values.", "answer": "SELECT T2.text , CASE WHEN T1.hasContentWarning = 1 THEN 'YES' ELSE 'NO' END FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Jim Pavelec'", "difficulty": "challenging", @@ -4457,7 +5865,10 @@ { "query_id": 495, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What was the release date for the set which card \"Evacuation\" in it?", "answer": "SELECT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Evacuation'", "difficulty": "simple", @@ -4466,7 +5877,10 @@ { "query_id": 496, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the number of cards are there in the set of \"Rinascita di Alara\"?", "answer": "SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Rinascita di Alara'", "difficulty": "simple", @@ -4475,7 +5889,10 @@ { "query_id": 497, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "List the expansion type of the set \"Huiti\u00e8me \u00e9dition\".", "answer": "SELECT type FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE translation = 'Huiti\u00e8me \u00e9dition' )", "difficulty": "simple", @@ -4484,7 +5901,10 @@ { "query_id": 498, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "What's the French name of the set of cards with \"Tendo Ice Bridge\" is in?", "answer": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Tendo Ice Bridge' AND T2.language = 'French' AND T2.translation IS NOT NULL", "difficulty": "moderate", @@ -4493,7 +5913,10 @@ { "query_id": 499, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "How many translations of the name of the set \"Salvat 2011\"?", "answer": "SELECT COUNT(DISTINCT T2.translation) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Salvat 2011' AND T2.translation IS NOT NULL", "difficulty": "moderate", @@ -4502,7 +5925,10 @@ { "query_id": 500, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "set_translations" + ], "query": "Tell the Japanese name of the set which card \"Fellwar Stone\" is in it.", "answer": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Fellwar Stone' AND T2.language = 'Japanese' AND T2.translation IS NOT NULL", "difficulty": "moderate", @@ -4511,7 +5937,10 @@ { "query_id": 501, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.", "answer": "SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Journey into Nyx Hero''s Path' ORDER BY T1.convertedManaCost DESC LIMIT 1", "difficulty": "moderate", @@ -4520,7 +5949,10 @@ { "query_id": 502, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the release date for the set \"Ola de fr\u00edo\"?", "answer": "SELECT T1.releaseDate FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Ola de fr\u00edo'", "difficulty": "simple", @@ -4529,7 +5961,10 @@ { "query_id": 503, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "What was the expansion type for the set which card \"Samite Pilgrim\" in it?", "answer": "SELECT type FROM sets WHERE code IN ( SELECT setCode FROM cards WHERE name = 'Samite Pilgrim' )", "difficulty": "simple", @@ -4538,7 +5973,10 @@ { "query_id": 504, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "sets" + ], "query": "How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.", "answer": "SELECT COUNT(id) FROM cards WHERE setCode IN ( SELECT code FROM sets WHERE name = 'World Championship Decks 2004' ) AND convertedManaCost = 3", "difficulty": "simple", @@ -4547,7 +5985,10 @@ { "query_id": 505, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Show the Simplified Chinese translation of the name of the set \"Mirrodin\"?", "answer": "SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'", "difficulty": "moderate", @@ -4556,7 +5997,10 @@ { "query_id": 506, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?", "answer": "SELECT CAST(SUM(CASE WHEN isNonFoilOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Japanese' )", "difficulty": "challenging", @@ -4565,7 +6009,10 @@ { "query_id": 507, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "For all the set of cards that has Brazil Portuguese translation, what is the percentage of them are only available online?", "answer": "SELECT CAST(SUM(CASE WHEN isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Portuguese (Brazil)' )", "difficulty": "challenging", @@ -4574,7 +6021,9 @@ { "query_id": 508, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot?", "answer": "SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND isTextless = 1", "difficulty": "moderate", @@ -4583,7 +6032,9 @@ { "query_id": 509, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "What is the unique id of the set that has the highest number of cards?", "answer": "SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1", "difficulty": "simple", @@ -4592,7 +6043,9 @@ { "query_id": 510, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Among the cards that doesn't have multiple faces on the same card, who is the illustrator of the card art that has the highest cost of converted mana?", "answer": "SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1", "difficulty": "simple", @@ -4601,7 +6054,9 @@ { "query_id": 511, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "What is the most common visual frame effects among the incredibly powerful foils?", "answer": "SELECT frameEffects FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL GROUP BY frameEffects ORDER BY COUNT(frameEffects) DESC LIMIT 1", "difficulty": "moderate", @@ -4610,7 +6065,9 @@ { "query_id": 512, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "How many cards with unknown power that can't be found in foil is in duel deck A?", "answer": "SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a'", "difficulty": "simple", @@ -4619,7 +6076,9 @@ { "query_id": 513, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets" + ], "query": "Among the sets whose expansion type is Commander, which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications? Indicate the id of the set.", "answer": "SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1", "difficulty": "challenging", @@ -4628,7 +6087,10 @@ { "query_id": 514, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "In duels, what are the top 10 cards with the highest uncoverted mana cost?", "answer": "SELECT DISTINCT name FROM cards WHERE uuid IN ( SELECT uuid FROM legalities WHERE format = 'duel' ) ORDER BY manaCost DESC LIMIT 0, 10", "difficulty": "simple", @@ -4637,7 +6099,10 @@ { "query_id": 515, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "When was the oldest mythic card released and what are its legal play formats?", "answer": "SELECT T1.originalReleaseDate, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'mythic' AND T1.originalReleaseDate IS NOT NULL AND T2.status = 'Legal' ORDER BY T1.originalReleaseDate LIMIT 1", "difficulty": "moderate", @@ -4646,7 +6111,10 @@ { "query_id": 516, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "foreign_data" + ], "query": "How many cards did Volkan Ba\u00c7\u00b5a illustrated whose foreign language is in French?", "answer": "SELECT COUNT(T3.id) FROM ( SELECT T1.id FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Volkan Ba\u01f5a' AND T2.language = 'French' GROUP BY T1.id ) AS T3", "difficulty": "moderate", @@ -4655,7 +6123,10 @@ { "query_id": 517, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "How many rare enchantment Abundance cards are there whose play format status are all legal?", "answer": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.name = 'Abundance' AND T2.status = 'Legal'", "difficulty": "moderate", @@ -4664,7 +6135,10 @@ { "query_id": 518, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "Which of the play formats has the highest number of banned status? Indicate the play format and the name of the card.", "answer": "SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T2.status = 'Banned' GROUP BY T2.format ORDER BY COUNT(T2.status) DESC LIMIT 1", "difficulty": "moderate", @@ -4673,7 +6147,10 @@ { "query_id": 519, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the language of the \"Battlebond\" set?", "answer": "SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )", "difficulty": "simple", @@ -4682,7 +6159,10 @@ { "query_id": 520, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated.", "answer": "SELECT T1.artist, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid GROUP BY T1.artist ORDER BY COUNT(T1.id) ASC LIMIT 1", "difficulty": "moderate", @@ -4691,7 +6171,10 @@ { "query_id": 521, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "Among the cards whose version of frame style is 1997, what is the status of the card illustrated by D. Alexander Gregory in legacy play format that has sensitive content or Wizards of the Coast?", "answer": "SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy'", "difficulty": "challenging", @@ -4700,7 +6183,10 @@ { "query_id": 522, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.", "answer": "SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format", "difficulty": "moderate", @@ -4709,7 +6195,10 @@ { "query_id": 523, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "What is the annual average number of sets that were released between 1/1/2012 to 12/31/2015? Indicate the common langugage of the card.", "answer": "SELECT (CAST(SUM(T1.id) AS REAL) / COUNT(T1.id)) / 4, T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.id = T2.id WHERE T1.releaseDate BETWEEN '2012-01-01' AND '2015-12-31' GROUP BY T1.releaseDate ORDER BY COUNT(T2.language) DESC LIMIT 1", "difficulty": "challenging", @@ -4718,7 +6207,9 @@ { "query_id": 524, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "List the artists who illustrated cards with black borders which are available only in arena.", "answer": "SELECT DISTINCT artist FROM cards WHERE availability = 'arena' AND BorderColor = 'black'", "difficulty": "simple", @@ -4727,7 +6218,9 @@ { "query_id": 525, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "legalities" + ], "query": "Find the uuid of cards in which the old school format is restricted or banned.", "answer": "SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')", "difficulty": "simple", @@ -4736,7 +6229,9 @@ { "query_id": 526, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards" + ], "query": "Among the card designed by Matthew D. Wilson, how many are available only in the paper?", "answer": "SELECT COUNT(id) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'", "difficulty": "simple", @@ -4745,7 +6240,10 @@ { "query_id": 527, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "rulings" + ], "query": "What are the rulings for the card named and designed by Kev Walker? List them in descending order of dates.", "answer": "SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Kev Walker' ORDER BY T2.date DESC", "difficulty": "moderate", @@ -4754,7 +6252,11 @@ { "query_id": 528, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities", + "sets" + ], "query": "List the names of all the cards in the set Hour of Devastation and find the formats in which these cards are legal.", "answer": "SELECT DISTINCT T2.name , CASE WHEN T1.status = 'Legal' THEN T1.format ELSE NULL END FROM legalities AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid WHERE T2.setCode IN ( SELECT code FROM sets WHERE name = 'Hour of Devastation' )", "difficulty": "challenging", @@ -4763,7 +6265,10 @@ { "query_id": 529, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "sets", + "set_translations" + ], "query": "Find and list the names of sets which doesn't have Japanese translation but have Korean translation.", "answer": "SELECT name FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Korean' AND language NOT LIKE '%Japanese%' )", "difficulty": "moderate", @@ -4772,7 +6277,10 @@ { "query_id": 530, "database_id": "card_games", - "table_id": "N/A", + "table_id": [ + "cards", + "legalities" + ], "query": "List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any.", "answer": "SELECT DISTINCT T1.frameVersion, T1.name , IIF(T2.status = 'Banned', T1.name, 'NO') FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Allen Williams'", "difficulty": "moderate", @@ -4781,7 +6289,9 @@ { "query_id": 531, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Which user has a higher reputation, Harlan or Jarrod Dixon?", "answer": "SELECT DisplayName FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') AND Reputation = ( SELECT MAX(Reputation) FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') )", "difficulty": "simple", @@ -4790,7 +6300,9 @@ { "query_id": 532, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Please list the display names of all the users whose accounts were created in the year 2014.", "answer": "SELECT DisplayName FROM users WHERE STRFTIME('%Y', CreationDate) = '2014'", "difficulty": "simple", @@ -4799,7 +6311,9 @@ { "query_id": 533, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How many users last accessed the website after 2014/9/1?", "answer": "SELECT COUNT(Id) FROM users WHERE date(LastAccessDate) > '2014-09-01'", "difficulty": "simple", @@ -4808,7 +6322,9 @@ { "query_id": 534, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "What is the display name of the user who has the most number of views?", "answer": "SELECT DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )", "difficulty": "simple", @@ -4817,7 +6333,9 @@ { "query_id": 535, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes?", "answer": "SELECT COUNT(Id) FROM users WHERE Upvotes > 100 AND Downvotes > 1", "difficulty": "simple", @@ -4826,7 +6344,9 @@ { "query_id": 536, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How many users with more than 10 views created their account after the year 2013?", "answer": "SELECT COUNT(id) FROM users WHERE STRFTIME('%Y', CreationDate) > '2013' AND Views > 10", "difficulty": "simple", @@ -4835,7 +6355,10 @@ { "query_id": 537, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "How many posts does the user csgillespie own?", "answer": "SELECT COUNT(T1.id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4844,7 +6367,10 @@ { "query_id": 538, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Please list the titles of the posts owned by the user csgillespie?", "answer": "SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4853,7 +6379,10 @@ { "query_id": 539, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Who is the owner of the post \"Eliciting priors from experts\"?", "answer": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'", "difficulty": "simple", @@ -4862,7 +6391,10 @@ { "query_id": 540, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the title of the post that is owned by csgillespie and has the highest popularity?", "answer": "SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' ORDER BY T1.ViewCount DESC LIMIT 1", "difficulty": "simple", @@ -4871,7 +6403,10 @@ { "query_id": 541, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the display name of the user who is the owner of the most valuable post?", "answer": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id ORDER BY T1.FavoriteCount DESC LIMIT 1", "difficulty": "simple", @@ -4880,7 +6415,10 @@ { "query_id": 542, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the total number of comments of all the posts owned by csgillespie?", "answer": "SELECT SUM(T1.CommentCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4889,7 +6427,10 @@ { "query_id": 543, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "For the post that got the most number of answers owned by csgillespie, how many answers did it get?", "answer": "SELECT MAX(T1.AnswerCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4898,7 +6439,10 @@ { "query_id": 544, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the display name of the user who last edited the post \"Examples for teaching: Correlation does not mean causation\"?", "answer": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation'", "difficulty": "moderate", @@ -4907,7 +6451,10 @@ { "query_id": 545, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Among the posts owned by csgillespie, how many of them are root posts?", "answer": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' AND T1.ParentId IS NULL", "difficulty": "simple", @@ -4916,7 +6463,10 @@ { "query_id": 546, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Please list the display names of all the users who owns a post that is well-finished.", "answer": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.ClosedDate IS NOT NULL", "difficulty": "simple", @@ -4925,7 +6475,10 @@ { "query_id": 547, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Among the posts owned by an elder user, how many of them have a score of over 19?", "answer": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score >= 20 AND T2.Age > 65", "difficulty": "simple", @@ -4934,7 +6487,10 @@ { "query_id": 548, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the location of the owner of the post \"Eliciting priors from experts\"?", "answer": "SELECT T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'", "difficulty": "simple", @@ -4943,7 +6499,10 @@ { "query_id": 549, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags", + "posts" + ], "query": "From which post is the tag \"bayesian\" excerpted from? Please give the body of the post.", "answer": "SELECT T2.Body FROM tags AS T1 INNER JOIN posts AS T2 ON T2.Id = T1.ExcerptPostId WHERE T1.TagName = 'bayesian'", "difficulty": "simple", @@ -4952,7 +6511,10 @@ { "query_id": 550, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags", + "posts" + ], "query": "From which post is the most popular tag excerpted from? Please give the body of the post.", "answer": "SELECT Body FROM posts WHERE id = ( SELECT ExcerptPostId FROM tags ORDER BY Count DESC LIMIT 1 )", "difficulty": "simple", @@ -4961,7 +6523,10 @@ { "query_id": 551, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How many badges has the user csgillespie obtained?", "answer": "SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4970,7 +6535,10 @@ { "query_id": 552, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Please list the names of the badges obtained by csgillespie.", "answer": "SELECT T1.`Name` FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4979,7 +6547,10 @@ { "query_id": 553, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Among the badges obtained by csgillespie, how many of them were obtained in the year 2011?", "answer": "SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE STRFTIME('%Y', T1.Date) = '2011' AND T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -4988,7 +6559,10 @@ { "query_id": 554, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the display name of the user who has obtained the most number of badges?", "answer": "SELECT T2.DisplayName FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id GROUP BY T2.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1", "difficulty": "simple", @@ -4997,7 +6571,10 @@ { "query_id": 555, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the average score of the posts owned by the user csgillespie?", "answer": "SELECT AVG(T1.Score) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'", "difficulty": "simple", @@ -5006,7 +6583,10 @@ { "query_id": 556, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the average number of badges obtained by a user with over 200 views?", "answer": "SELECT CAST(COUNT(T1.Id) AS REAL) / COUNT(DISTINCT T2.DisplayName) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.Views > 200", "difficulty": "simple", @@ -5015,7 +6595,10 @@ { "query_id": 557, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Among the posts with a score of over 20, what is the percentage of them being owned by an elder user?", "answer": "SELECT CAST(SUM(IIF(T2.Age > 65, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Score > 20", "difficulty": "moderate", @@ -5024,7 +6607,9 @@ { "query_id": 558, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes" + ], "query": "How many votes did the user No.58 take on 2010/7/19?", "answer": "SELECT COUNT(Id) FROM votes WHERE UserId = 58 AND CreationDate = '2010-07-19'", "difficulty": "simple", @@ -5033,7 +6618,9 @@ { "query_id": 559, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes" + ], "query": "Indicate the creation date of the maximum number of votes.", "answer": "SELECT CreationDate FROM votes GROUP BY CreationDate ORDER BY COUNT(Id) DESC LIMIT 1", "difficulty": "simple", @@ -5042,7 +6629,9 @@ { "query_id": 560, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "Give the number of \"Revival\" badges.", "answer": "SELECT COUNT(Id) FROM badges WHERE Name = 'Revival'", "difficulty": "simple", @@ -5051,7 +6640,10 @@ { "query_id": 561, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "What is the title for the post which got the highest score comment?", "answer": "SELECT Title FROM posts WHERE Id = ( SELECT PostId FROM comments ORDER BY Score DESC LIMIT 1 )", "difficulty": "simple", @@ -5060,7 +6652,10 @@ { "query_id": 562, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "For the post which got 1910 view counts, how many comments does it get?", "answer": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.ViewCount = 1910", "difficulty": "simple", @@ -5069,7 +6664,10 @@ { "query_id": 563, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "User No.3025 gave a comment at 20:29:39 on 2014/4/23 to a post, how many favorite counts did that post get?", "answer": "SELECT T1.FavoriteCount FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T2.CreationDate = '2014-04-23 20:29:39.0' AND T2.UserId = 3025", "difficulty": "moderate", @@ -5078,7 +6676,10 @@ { "query_id": 564, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Give the only one comment text of the post with parent id 107829.", "answer": "SELECT T2.Text FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.ParentId = 107829 AND T1.CommentCount = 1", "difficulty": "simple", @@ -5087,7 +6688,10 @@ { "query_id": 565, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12, was that post well-finished?", "answer": "SELECT IIF(T2.ClosedDate IS NULL, 'NOT well-finished', 'well-finished') AS resylt FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 23853 AND T1.CreationDate = '2013-07-12 09:08:18.0'", "difficulty": "moderate", @@ -5096,7 +6700,10 @@ { "query_id": 566, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "For the owner user of post No. 65041, what is his/her reputation points?", "answer": "SELECT T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Id = 65041", "difficulty": "simple", @@ -5105,7 +6712,10 @@ { "query_id": 567, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "For the user with the display name of \"Tiago Pasqualini\", how many posts did he/she own?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Tiago Pasqualini'", "difficulty": "simple", @@ -5114,7 +6724,10 @@ { "query_id": 568, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "votes" + ], "query": "Provide the display name of the user who made the vote No.6347.", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T2.Id = 6347", "difficulty": "simple", @@ -5123,7 +6736,10 @@ { "query_id": 569, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes", + "posts" + ], "query": "Give the number of votes for the post about data visualization.", "answer": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data visualization%'", "difficulty": "simple", @@ -5132,7 +6748,10 @@ { "query_id": 570, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "For the user whose display name is \"DatEpicCoderGuyWhoPrograms\", what is his/her badge's name?", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'DatEpicCoderGuyWhoPrograms'", "difficulty": "simple", @@ -5141,7 +6760,10 @@ { "query_id": 571, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes", + "posts" + ], "query": "For the user No.24, how many times is the number of his/her posts compared to his/her votes?", "answer": "SELECT CAST(COUNT(T2.Id) AS REAL) / COUNT(DISTINCT T1.Id) FROM votes AS T1 INNER JOIN posts AS T2 ON T1.UserId = T2.OwnerUserId WHERE T1.UserId = 24", "difficulty": "moderate", @@ -5150,7 +6772,9 @@ { "query_id": 572, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "How many views did the post titled 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer' get?", "answer": "SELECT ViewCount FROM posts WHERE Title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'", "difficulty": "moderate", @@ -5159,7 +6783,9 @@ { "query_id": 573, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments" + ], "query": "Write the contents of comments with a score of 17.", "answer": "SELECT Text FROM comments WHERE Score = 17", "difficulty": "simple", @@ -5168,7 +6794,9 @@ { "query_id": 574, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Which user has the website URL listed at 'http://stackoverflow.com'", "answer": "SELECT DisplayName FROM users WHERE WebsiteUrl = 'http://stackoverflow.com'", "difficulty": "simple", @@ -5177,7 +6805,10 @@ { "query_id": 575, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the badge name that user 'SilentGhost' obtained?", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'SilentGhost'", "difficulty": "simple", @@ -5186,7 +6817,10 @@ { "query_id": 576, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Name the user that commented 'thank you user93!'", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Text = 'thank you user93!'", "difficulty": "simple", @@ -5195,7 +6829,10 @@ { "query_id": 577, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Write all comments made by user 'A Lion.'", "answer": "SELECT T2.Text FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'A Lion'", "difficulty": "simple", @@ -5204,7 +6841,10 @@ { "query_id": 578, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user?", "answer": "SELECT T1.DisplayName, T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Title = 'Understanding what Dassault iSight is doing?'", "difficulty": "moderate", @@ -5213,7 +6853,10 @@ { "query_id": 579, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Write all comments made on the post titled 'How does gentle boosting differ from AdaBoost?'", "answer": "SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'How does gentle boosting differ from AdaBoost?'", "difficulty": "simple", @@ -5222,7 +6865,10 @@ { "query_id": 580, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Name 10 users with the badge name 'Necromancer.'", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Necromancer' LIMIT 10", "difficulty": "simple", @@ -5231,7 +6877,10 @@ { "query_id": 581, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'", "answer": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Open source tools for visualizing multi-dimensional data?'", "difficulty": "moderate", @@ -5240,7 +6889,10 @@ { "query_id": 582, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "List the title of posts which were edited by Vebjorn Ljosa.", "answer": "SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'Vebjorn Ljosa'", "difficulty": "simple", @@ -5249,7 +6901,10 @@ { "query_id": 583, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the total score of the posts edited by Yevgeny and include the user's website URL.", "answer": "SELECT SUM(T1.Score), T2.WebsiteUrl FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'Yevgeny' GROUP BY T2.WebsiteUrl", "difficulty": "simple", @@ -5258,7 +6913,10 @@ { "query_id": 584, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "posts" + ], "query": "Write all the comments left by users who edited the post titled 'Why square the difference instead of taking the absolute value in standard deviation?'", "answer": "SELECT T2.Comment FROM posts AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.PostId WHERE T1.Title = 'Why square the difference instead of taking the absolute value in standard deviation?'", "difficulty": "moderate", @@ -5267,7 +6925,10 @@ { "query_id": 585, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes", + "posts" + ], "query": "How much is the total bounty amount of the post titled about 'data'", "answer": "SELECT SUM(T2.BountyAmount) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data%'", "difficulty": "simple", @@ -5276,7 +6937,11 @@ { "query_id": 586, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "votes", + "posts" + ], "query": "Which user added a bounty amount of 50 to the post title mentioning variance?", "answer": "SELECT T3.DisplayName, T1.Title FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId INNER JOIN users AS T3 ON T3.Id = T2.UserId WHERE T2.BountyAmount = 50 AND T1.Title LIKE '%variance%'", "difficulty": "challenging", @@ -5285,7 +6950,10 @@ { "query_id": 587, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Calculate the average view count of posts tagged as 'humor' and write the title and the comments of the posts alongside their scores if applicable.", "answer": "SELECT AVG(T2.ViewCount), T2.Title, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.Id = T1.PostId WHERE T2.Tags = ''", "difficulty": "moderate", @@ -5294,7 +6962,9 @@ { "query_id": 588, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments" + ], "query": "Give the total number of comments posted by user ID 13.", "answer": "SELECT COUNT(Id) FROM comments WHERE UserId = 13", "difficulty": "simple", @@ -5303,7 +6973,9 @@ { "query_id": 589, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Which user ID has the highest reputation?", "answer": "SELECT Id FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )", "difficulty": "simple", @@ -5312,7 +6984,9 @@ { "query_id": 590, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Which user ID has the lowest view?", "answer": "SELECT Id FROM users WHERE Views = ( SELECT MIN(Views) FROM users )", "difficulty": "simple", @@ -5321,7 +6995,9 @@ { "query_id": 591, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "How many users are awarded with supporter badge during year 2011?", "answer": "SELECT COUNT(Id) FROM badges WHERE STRFTIME('%Y', Date) = '2011' AND Name = 'Supporter'", "difficulty": "simple", @@ -5330,7 +7006,9 @@ { "query_id": 592, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "How many users are awarded with more than 5 badges?", "answer": "SELECT UserId FROM ( SELECT UserId, COUNT(Name) AS num FROM badges GROUP BY UserId ) T WHERE T.num > 5", "difficulty": "simple", @@ -5339,7 +7017,10 @@ { "query_id": 593, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How many users from New York have a teacher and supporter badge?", "answer": "SELECT COUNT(DISTINCT T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Name IN ('Supporter', 'Teacher') AND T2.Location = 'New York'", "difficulty": "simple", @@ -5348,7 +7029,10 @@ { "query_id": 594, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Which user created post ID 1 and what is the reputation of this user?", "answer": "SELECT T2.Id, T2.Reputation FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.PostId = 1", "difficulty": "simple", @@ -5357,7 +7041,11 @@ { "query_id": 595, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "Which user have only one post history per post and having at least 1000 views?", "answer": "SELECT T2.UserId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T3.ViewCount >= 1000 GROUP BY T2.UserId HAVING COUNT(DISTINCT T2.PostHistoryTypeId) = 1", "difficulty": "moderate", @@ -5366,7 +7054,10 @@ { "query_id": 596, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "comments" + ], "query": "Which users have posted the most comments. List out the user's badge?", "answer": "SELECT Name FROM badges AS T1 INNER JOIN comments AS T2 ON T1.UserId = t2.UserId GROUP BY T2.UserId ORDER BY COUNT(T2.UserId) DESC LIMIT 1", "difficulty": "simple", @@ -5375,7 +7066,10 @@ { "query_id": 597, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How many users from India have the teacher badges?", "answer": "SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.Location = 'India' AND T1.Name = 'Teacher'", "difficulty": "simple", @@ -5384,7 +7078,9 @@ { "query_id": 598, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "What is the percentage difference of student badges given during 2010 and 2011?", "answer": "SELECT CAST(SUM(IIF(STRFTIME('%Y', Date) = '2010', 1, 0)) AS REAL) * 100 / COUNT(Id) - CAST(SUM(IIF(STRFTIME('%Y', Date) = '2011', 1, 0)) AS REAL) * 100 / COUNT(Id) FROM badges WHERE Name = 'Student'", "difficulty": "challenging", @@ -5393,7 +7089,10 @@ { "query_id": 599, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "comments" + ], "query": "What are the post history type IDs for post ID 3720 and how many unique users have commented on the post?", "answer": "SELECT T1.PostHistoryTypeId, (SELECT COUNT(DISTINCT UserId) FROM comments WHERE PostId = 3720) AS NumberOfUsers FROM postHistory AS T1 WHERE T1.PostId = 3720", "difficulty": "simple", @@ -5402,7 +7101,10 @@ { "query_id": 600, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "List out all post that are related to post ID 61217 and what is the popularity of this post?", "answer": "SELECT T1.ViewCount FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 61217", "difficulty": "simple", @@ -5411,7 +7113,10 @@ { "query_id": 601, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "What is the score and the link type ID for post ID 395?", "answer": "SELECT T1.Score, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 395", "difficulty": "simple", @@ -5420,7 +7125,10 @@ { "query_id": 602, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "posts" + ], "query": "List out all post ID with score more than 60 and list out all the user ID that created these post.", "answer": "SELECT PostId, UserId FROM postHistory WHERE PostId IN ( SELECT Id FROM posts WHERE Score > 60 )", "difficulty": "simple", @@ -5429,7 +7137,10 @@ { "query_id": 603, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "posts" + ], "query": "What is the sum of favourite count gained by user ID 686 in 2011?", "answer": "SELECT SUM(DISTINCT FavoriteCount) FROM posts WHERE Id IN ( SELECT PostId FROM postHistory WHERE UserId = 686 AND STRFTIME('%Y', CreationDate) = '2011' )", "difficulty": "simple", @@ -5438,7 +7149,10 @@ { "query_id": 604, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the average of the up votes and the average user age for users creating more than 10 posts?", "answer": "SELECT AVG(T1.UpVotes), AVG(T1.Age) FROM users AS T1 INNER JOIN ( SELECT OwnerUserId, COUNT(*) AS post_count FROM posts GROUP BY OwnerUserId HAVING post_count > 10) AS T2 ON T1.Id = T2.OwnerUserId", "difficulty": "moderate", @@ -5447,7 +7161,9 @@ { "query_id": 605, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "How many users obtained the \"Announcer\" badge?", "answer": "SELECT COUNT(id) FROM badges WHERE Name = 'Announcer'", "difficulty": "simple", @@ -5456,7 +7172,9 @@ { "query_id": 606, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "List out the name of badges that users obtained on 7/19/2010 7:39:08 PM.", "answer": "SELECT Name FROM badges WHERE Date = '2010-07-19 19:39:08.0'", "difficulty": "simple", @@ -5465,7 +7183,9 @@ { "query_id": 607, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments" + ], "query": "How many positive comments are there on the list?", "answer": "SELECT COUNT(id) FROM comments WHERE score > 60", "difficulty": "simple", @@ -5474,7 +7194,9 @@ { "query_id": 608, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments" + ], "query": "State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM.", "answer": "SELECT Text FROM comments WHERE CreationDate = '2010-07-19 19:16:14.0'", "difficulty": "simple", @@ -5483,7 +7205,9 @@ { "query_id": 609, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "How many posts have a score of 10 on the list?", "answer": "SELECT COUNT(id) FROM posts WHERE Score = 10", "difficulty": "simple", @@ -5492,7 +7216,10 @@ { "query_id": 610, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What are the names of badges that users who have the highest reputation obtained?", "answer": "SELECT T2.name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId ORDER BY T1.Reputation DESC LIMIT 1", "difficulty": "simple", @@ -5501,7 +7228,10 @@ { "query_id": 611, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Mention the reputation of users who had obtained the badge on 7/19/2010 7:39:08 PM.", "answer": "SELECT T1.Reputation FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'", "difficulty": "simple", @@ -5510,7 +7240,10 @@ { "query_id": 612, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the name of badge that the user whose display name is \"Pierre\" obtained?", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Pierre'", "difficulty": "simple", @@ -5519,7 +7252,10 @@ { "query_id": 613, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "List out the dates that users who are located in Rochester, NY obtained their badges?", "answer": "SELECT T2.Date FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Rochester, NY'", "difficulty": "simple", @@ -5528,7 +7264,10 @@ { "query_id": 614, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Among the users who obtained the \"Teacher\" badge, calculate their percentage of users", "answer": "SELECT CAST(COUNT(T1.Id) AS REAL) * 100 / (SELECT COUNT(Id) FROM users) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Teacher'", "difficulty": "simple", @@ -5537,7 +7276,10 @@ { "query_id": 615, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Among the users who obtained the \"Organizer\" badges, calculate the percentage of users who are teenagers.", "answer": "SELECT CAST(SUM(IIF(T2.Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.`Name` = 'Organizer'", "difficulty": "moderate", @@ -5546,7 +7288,10 @@ { "query_id": 616, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "What is the comment's rating score of the post which was created on 7/19/2010 7:19:56 PM", "answer": "SELECT T1.Score FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate = '2010-07-19 19:19:56.0'", "difficulty": "simple", @@ -5555,7 +7300,10 @@ { "query_id": 617, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "What is the detailed content of the comment of the post which was created on 7/19/2010 7:37:33 PM?", "answer": "SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate = '2010-07-19 19:37:33.0'", "difficulty": "simple", @@ -5564,7 +7312,10 @@ { "query_id": 618, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "List out the age of users who located in Vienna, Austria obtained the badge?", "answer": "SELECT T1.Age FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Vienna, Austria'", "difficulty": "simple", @@ -5573,7 +7324,10 @@ { "query_id": 619, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How many adults who obtained the badge Supporter?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Supporter' AND T1.Age BETWEEN 19 AND 65", "difficulty": "simple", @@ -5582,7 +7336,10 @@ { "query_id": 620, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM.", "answer": "SELECT T1.Views FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'", "difficulty": "simple", @@ -5591,7 +7348,10 @@ { "query_id": 621, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What are the name of badges that users who have the lowest reputation obtained?", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Reputation = (SELECT MIN(Reputation) FROM users)", "difficulty": "simple", @@ -5600,7 +7360,10 @@ { "query_id": 622, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "State the name of badge that the user whose display name is \"Sharpie\" obtained.", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Sharpie'", "difficulty": "simple", @@ -5609,7 +7372,10 @@ { "query_id": 623, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How many elders obtained the \"Supporter\" badge?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Age > 65 AND T2.Name = 'Supporter'", "difficulty": "simple", @@ -5618,7 +7384,9 @@ { "query_id": 624, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "What is the name of user with the ID of 30?", "answer": "SELECT DisplayName FROM users WHERE Id = 30", "difficulty": "simple", @@ -5627,7 +7395,9 @@ { "query_id": 625, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How many users were from New York?", "answer": "SELECT COUNT(Id) FROM users WHERE Location = 'New York'", "difficulty": "simple", @@ -5636,7 +7406,9 @@ { "query_id": 626, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes" + ], "query": "How many votes were made in 2010?", "answer": "SELECT COUNT(id) FROM votes WHERE STRFTIME('%Y', CreationDate) = '2010'", "difficulty": "simple", @@ -5645,7 +7417,9 @@ { "query_id": 627, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How many users were adult?", "answer": "SELECT COUNT(id) FROM users WHERE Age BETWEEN 19 AND 65", "difficulty": "simple", @@ -5654,7 +7428,9 @@ { "query_id": 628, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Which users have the highest number of views?", "answer": "SELECT Id, DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )", "difficulty": "simple", @@ -5663,7 +7439,9 @@ { "query_id": 629, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes" + ], "query": "Calculate the ratio of votes in 2010 and 2011.", "answer": "SELECT CAST(SUM(IIF(STRFTIME('%Y', CreationDate) = '2010', 1, 0)) AS REAL) / SUM(IIF(STRFTIME('%Y', CreationDate) = '2011', 1, 0)) FROM votes", "difficulty": "simple", @@ -5672,7 +7450,11 @@ { "query_id": 630, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "What is the name of tags used by John Stauffer's?", "answer": "SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'John Salvatier'", "difficulty": "simple", @@ -5681,7 +7463,10 @@ { "query_id": 631, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users" + ], "query": "How many posts were created by Daniel Vassallo?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Daniel Vassallo'", "difficulty": "simple", @@ -5690,7 +7475,11 @@ { "query_id": 632, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "votes" + ], "query": "How many votes were made by Harlan?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN votes AS T3 ON T3.PostId = T2.PostId WHERE T1.DisplayName = 'Harlan'", "difficulty": "simple", @@ -5699,7 +7488,11 @@ { "query_id": 633, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "Which post by slashnick has the most answers count? State the post ID.", "answer": "SELECT T2.PostId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'slashnick' ORDER BY T3.AnswerCount DESC LIMIT 1", "difficulty": "moderate", @@ -5708,7 +7501,11 @@ { "query_id": 634, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "Among posts by Harvey Motulsky and Noah Snyder, which one has higher popularity?", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'Harvey Motulsky' OR T1.DisplayName = 'Noah Snyder' GROUP BY T1.DisplayName ORDER BY SUM(T3.ViewCount) DESC LIMIT 1", "difficulty": "challenging", @@ -5717,7 +7514,12 @@ { "query_id": 635, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "votes", + "posts" + ], "query": "How many posts by Matt Parker have more than 4 votes?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id INNER JOIN votes AS T4 ON T4.PostId = T3.Id WHERE T1.DisplayName = 'Matt Parker' GROUP BY T2.PostId, T4.Id HAVING COUNT(T4.Id) > 4", "difficulty": "moderate", @@ -5726,7 +7528,11 @@ { "query_id": 636, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments", + "posts" + ], "query": "How many negative comments did Neil McGuigan get in his posts?", "answer": "SELECT COUNT(T3.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T1.DisplayName = 'Neil McGuigan' AND T3.Score < 60", "difficulty": "simple", @@ -5735,7 +7541,11 @@ { "query_id": 637, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "State all the tags used by Mark Meckes in his posts that doesn't have comments.", "answer": "SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId WHERE T1.DisplayName = 'Mark Meckes' AND T3.CommentCount = 0", "difficulty": "moderate", @@ -5744,7 +7554,10 @@ { "query_id": 638, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "List all the name of users that obtained the Organizer Badges.", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Organizer'", "difficulty": "simple", @@ -5753,7 +7566,11 @@ { "query_id": 639, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "tags" + ], "query": "Based on posts posted by Community, calculate the percentage of posts that use the R language.", "answer": "SELECT CAST(SUM(IIF(T3.TagName = 'r', 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN tags AS T3 ON T3.ExcerptPostId = T2.PostId WHERE T1.DisplayName = 'Community'", "difficulty": "challenging", @@ -5762,7 +7579,11 @@ { "query_id": 640, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "Calculate the difference in view count from post posted by mornington and view count from posts posted by Amos.", "answer": "SELECT SUM(IIF(T1.DisplayName = 'Mornington', T3.ViewCount, 0)) - SUM(IIF(T1.DisplayName = 'Amos', T3.ViewCount, 0)) AS diff FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId", "difficulty": "moderate", @@ -5771,7 +7592,9 @@ { "query_id": 641, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "How many users received commentator badges in 2014?", "answer": "SELECT COUNT(Id) FROM badges WHERE Name = 'Commentator' AND STRFTIME('%Y', Date) = '2014'", "difficulty": "simple", @@ -5780,7 +7603,9 @@ { "query_id": 642, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory" + ], "query": "How many posts were created on 21st July, 2010?", "answer": "SELECT COUNT(id) FROM postHistory WHERE date(CreationDate) = '2010-07-21'", "difficulty": "simple", @@ -5789,7 +7614,9 @@ { "query_id": 643, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "What are the display names and ages of user who got the highest in views?", "answer": "SELECT DisplayName, Age FROM users WHERE Views = ( SELECT MAX(Views) FROM users )", "difficulty": "simple", @@ -5798,7 +7625,9 @@ { "query_id": 644, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "Provide the last edit date and last edit user ID for the post \"Detecting a given face in a database of facial images\".", "answer": "SELECT LastEditDate, LastEditorUserId FROM posts WHERE Title = 'Detecting a given face in a database of facial images'", "difficulty": "simple", @@ -5807,7 +7636,9 @@ { "query_id": 645, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments" + ], "query": "How many negative comments were given by user ID 13?", "answer": "SELECT COUNT(Id) FROM comments WHERE UserId = 13 AND Score < 60", "difficulty": "simple", @@ -5816,7 +7647,10 @@ { "query_id": 646, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Describe the post title which got positive comments and display names of the users who posted those comments.", "answer": "SELECT T1.Title, T2.UserDisplayName FROM posts AS T1 INNER JOIN comments AS T2 ON T2.PostId = T2.Id WHERE T1.Score > 60", "difficulty": "simple", @@ -5825,7 +7659,10 @@ { "query_id": 647, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Provide the badge names received in 2011 for the user whose location is in the North Pole.", "answer": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE STRFTIME('%Y', T2.Date) = '2011' AND T1.Location = 'North Pole'", "difficulty": "simple", @@ -5834,7 +7671,10 @@ { "query_id": 648, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Provide the users' display names and available website URLs of the post with favorite count of more than 150.", "answer": "SELECT T1.DisplayName, T1.WebsiteUrl FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.FavoriteCount > 150", "difficulty": "simple", @@ -5843,7 +7683,10 @@ { "query_id": 649, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "posts" + ], "query": "Describe the post history counts and last edit date of the post title \"What is the best introductory Bayesian statistics textbook?\"", "answer": "SELECT T1.Id, T2.LastEditDate FROM postHistory AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'What is the best introductory Bayesian statistics textbook?'", "difficulty": "simple", @@ -5852,7 +7695,10 @@ { "query_id": 650, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Describe the last accessed date and location of the users who received the outliers badge.", "answer": "SELECT T1.LastAccessDate, T1.Location FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'outliers'", "difficulty": "simple", @@ -5861,7 +7707,10 @@ { "query_id": 651, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "Provide the related post title of \"How to tell if something happened in a data set which monitors a value over time\".", "answer": "SELECT T3.Title FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN posts AS T3 ON T1.RelatedPostId = T3.Id WHERE T2.Title = 'How to tell if something happened in a data set which monitors a value over time'", "difficulty": "simple", @@ -5870,7 +7719,10 @@ { "query_id": 652, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "postHistory" + ], "query": "List the post IDs and badge names of the user Samuel in 2013.", "answer": "SELECT T1.PostId, T2.Name FROM postHistory AS T1 INNER JOIN badges AS T2 ON T1.UserId = T2.UserId WHERE T1.UserDisplayName = 'Samuel' AND STRFTIME('%Y', T1.CreationDate) = '2013' AND STRFTIME('%Y', T2.Date) = '2013'", "difficulty": "moderate", @@ -5879,7 +7731,10 @@ { "query_id": 653, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the owner's display name of the most popular post?", "answer": "SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts ORDER BY ViewCount DESC LIMIT 1 )", "difficulty": "simple", @@ -5888,7 +7743,11 @@ { "query_id": 654, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "tags", + "posts" + ], "query": "Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.", "answer": "SELECT T3.DisplayName, T3.Location FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id INNER JOIN users AS T3 ON T3.Id = T2.OwnerUserId WHERE T1.TagName = 'hypothesis-testing'", "difficulty": "moderate", @@ -5897,7 +7756,10 @@ { "query_id": 655, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "Write down the related posts titles and link type IDs of the post \"What are principal component scores?\".", "answer": "SELECT T3.Title, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId INNER JOIN posts AS T3 ON T2.RelatedPostId = T3.Id WHERE T1.Title = 'What are principal component scores?'", "difficulty": "simple", @@ -5906,7 +7768,10 @@ { "query_id": 656, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Describe the display name of the parent ID for child post with the highest score.", "answer": "SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts WHERE ParentId IS NOT NULL ORDER BY Score DESC LIMIT 1 )", "difficulty": "simple", @@ -5915,7 +7780,10 @@ { "query_id": 657, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "votes" + ], "query": "Under the vote type of 8, provide the display names and websites URLs of the user who got the highest bounty amount.", "answer": "SELECT DisplayName, WebsiteUrl FROM users WHERE Id = ( SELECT UserId FROM votes WHERE VoteTypeId = 8 ORDER BY BountyAmount DESC LIMIT 1 )", "difficulty": "moderate", @@ -5924,7 +7792,9 @@ { "query_id": 658, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "What are the titles of the top 5 posts with the highest popularity?", "answer": "SELECT Title FROM posts ORDER BY ViewCount DESC LIMIT 5", "difficulty": "simple", @@ -5933,7 +7803,9 @@ { "query_id": 659, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags" + ], "query": "How many tags have post count between 5,000 to 7,000?", "answer": "SELECT COUNT(Id) FROM tags WHERE Count BETWEEN 5000 AND 7000", "difficulty": "simple", @@ -5942,7 +7814,9 @@ { "query_id": 660, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "What is the owner user id of the most valuable post?", "answer": "SELECT OwnerUserId FROM posts WHERE FavoriteCount = ( SELECT MAX(FavoriteCount) FROM posts )", "difficulty": "simple", @@ -5951,7 +7825,9 @@ { "query_id": 661, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How old is the most influential user?", "answer": "SELECT Age FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )", "difficulty": "simple", @@ -5960,7 +7836,10 @@ { "query_id": 662, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes", + "posts" + ], "query": "How many posts with votes that were created in 2011 have a bounty of 50?", "answer": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T2.BountyAmount = 50 AND STRFTIME('%Y', T2.CreationDate) = '2011'", "difficulty": "simple", @@ -5969,7 +7848,9 @@ { "query_id": 663, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "What is the id of the youngest user?", "answer": "SELECT Id FROM users WHERE Age = ( SELECT MIN(Age) FROM users )", "difficulty": "simple", @@ -5978,7 +7859,10 @@ { "query_id": 664, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags", + "posts" + ], "query": "What is the score of the post with the most popular tag?", "answer": "SELECT Score FROM posts WHERE Id = ( SELECT ExcerptPostId FROM tags ORDER BY Count DESC LIMIT 1 )", "difficulty": "simple", @@ -5987,7 +7871,10 @@ { "query_id": 665, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "What is the average monthly number of links created in 2010 for posts that have no more than 2 answers?", "answer": "SELECT CAST(COUNT(T1.Id) AS REAL) / 12 FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.AnswerCount <= 2 AND STRFTIME('%Y', T1.CreationDate) = '2010'", "difficulty": "moderate", @@ -5996,7 +7883,10 @@ { "query_id": 666, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes", + "posts" + ], "query": "Among the posts that were voted by user 1465, what is the id of the most valuable post?", "answer": "SELECT T2.Id FROM votes AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 1465 ORDER BY T2.FavoriteCount DESC LIMIT 1", "difficulty": "simple", @@ -6005,7 +7895,10 @@ { "query_id": 667, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postLinks", + "posts" + ], "query": "What is the title of the post with the oldest post link?", "answer": "SELECT T1.Title FROM posts AS T1 INNER JOIN postLinks AS T2 ON T2.PostId = T1.Id ORDER BY T1.CreaionDate LIMIT 1", "difficulty": "simple", @@ -6014,7 +7907,10 @@ { "query_id": 668, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the display name of the user who acquired the highest amount of badges?", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId GROUP BY T1.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1", "difficulty": "simple", @@ -6023,7 +7919,10 @@ { "query_id": 669, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "votes" + ], "query": "When did \"chl\" cast its first vote in a post?", "answer": "SELECT T2.CreationDate FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'chl' ORDER BY T2.CreationDate LIMIT 1", "difficulty": "simple", @@ -6032,7 +7931,10 @@ { "query_id": 670, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the date when the youngest user made his or her first post?", "answer": "SELECT T2.CreaionDate FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Age IS NOT NULL ORDER BY T1.Age, T2.CreaionDate LIMIT 1", "difficulty": "simple", @@ -6041,7 +7943,10 @@ { "query_id": 671, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "What is the display name of the user who acquired the first Autobiographer badge?", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Autobiographer' ORDER BY T2.Date LIMIT 1", "difficulty": "simple", @@ -6050,7 +7955,10 @@ { "query_id": 672, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Among the users located in United Kingdom, how many users whose post have a total favorite amount of 4 or more?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Location = 'United Kingdom' AND T2.FavoriteCount >= 4", "difficulty": "moderate", @@ -6059,7 +7967,10 @@ { "query_id": 673, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "votes" + ], "query": "What is the average number of posts voted by the oldest users?", "answer": "SELECT AVG(PostId) FROM votes WHERE UserId IN ( SELECT Id FROM users WHERE Age = ( SELECT MAX(Age) FROM users ) )", "difficulty": "simple", @@ -6068,7 +7979,9 @@ { "query_id": 674, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Who has the highest reputation? Please give the display name.", "answer": "SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )", "difficulty": "simple", @@ -6077,7 +7990,9 @@ { "query_id": 675, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "How many users whose reputations are higher than 2000 and the number of views is higher than 1000?", "answer": "SELECT COUNT(id) FROM users WHERE Reputation > 2000 AND Views > 1000", "difficulty": "simple", @@ -6086,7 +8001,9 @@ { "query_id": 676, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Please list all display names of users who are adults.", "answer": "SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65", "difficulty": "simple", @@ -6095,7 +8012,10 @@ { "query_id": 677, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "How many posts did Jay Stevens have in 2010?", "answer": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2010' AND T1.DisplayName = 'Jay Stevens'", "difficulty": "simple", @@ -6104,7 +8024,10 @@ { "query_id": 678, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Which post by Harvey Motulsky has the most views? Please give the id and title of this post.", "answer": "SELECT T2.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Harvey Motulsky' ORDER BY T2.ViewCount DESC LIMIT 1", "difficulty": "simple", @@ -6113,7 +8036,10 @@ { "query_id": 679, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Which post has the highest score? Please give its id and title's name.", "answer": "SELECT T1.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId ORDER BY T2.Score DESC LIMIT 1", "difficulty": "simple", @@ -6122,7 +8048,10 @@ { "query_id": 680, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the average score of Stephen Turner's posts?", "answer": "SELECT AVG(T2.Score) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Stephen Turner'", "difficulty": "simple", @@ -6131,7 +8060,10 @@ { "query_id": 681, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Please list the users' display names whose posts had over 20000 views in 2011.", "answer": "SELECT T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2011' AND T2.ViewCount > 20000", "difficulty": "simple", @@ -6140,7 +8072,10 @@ { "query_id": 682, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Which is the most valuable post in 2010? Please give its id and the owner's display name.", "answer": "SELECT T2.OwnerUserId, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T1.CreationDate) = '2010' ORDER BY T2.FavoriteCount DESC LIMIT 1", "difficulty": "moderate", @@ -6149,7 +8084,10 @@ { "query_id": 683, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "What is the percentage of posts whose owners had a reputation of over 1000 in 2011?", "answer": "SELECT CAST(SUM(IIF(STRFTIME('%Y', T2.CreaionDate) = '2011' AND T1.Reputation > 1000, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId", "difficulty": "moderate", @@ -6158,7 +8096,9 @@ { "query_id": 684, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Identify the percentage of teenage users.", "answer": "SELECT CAST(SUM(IIF(Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(Id) FROM users", "difficulty": "simple", @@ -6167,7 +8107,11 @@ { "query_id": 685, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "postHistory", + "users", + "posts" + ], "query": "Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time.", "answer": "SELECT T2.ViewCount, T3.DisplayName FROM postHistory AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id INNER JOIN users AS T3 ON T2.LastEditorUserId = T3.Id WHERE T1.Text = 'Computer Game Datasets'", "difficulty": "moderate", @@ -6176,7 +8120,9 @@ { "query_id": 686, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "Identify the total number of posts with views above average.", "answer": "SELECT Id FROM posts WHERE ViewCount > ( SELECT AVG(ViewCount) FROM posts )", "difficulty": "simple", @@ -6185,7 +8131,10 @@ { "query_id": 687, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "How many comments were added to the post with the highest score?", "answer": "SELECT COUNT(T2.Id) FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId GROUP BY T1.Id ORDER BY SUM(T1.Score) DESC LIMIT 1", "difficulty": "simple", @@ -6194,7 +8143,9 @@ { "query_id": 688, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "Identify the number of posts that have been viewed over 35000 times but have received no comments from other users.", "answer": "SELECT COUNT(Id) FROM posts WHERE ViewCount > 35000 AND CommentCount = 0", "difficulty": "simple", @@ -6203,7 +8154,10 @@ { "query_id": 689, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Identify the display name and location of the user, who was the last to edit the post with ID 183.", "answer": "SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1", "difficulty": "simple", @@ -6212,7 +8166,10 @@ { "query_id": 690, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "Identify the latest badge awarded to the user with the display name Emmett.", "answer": "SELECT T1.Name FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Emmett' ORDER BY T1.Date DESC LIMIT 1", "difficulty": "simple", @@ -6221,7 +8178,9 @@ { "query_id": 691, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "Identify the number of adult users who have cast over 5000 upvotes.", "answer": "SELECT COUNT(Id) FROM users WHERE Age BETWEEN 19 AND 65 AND UpVotes > 5000", "difficulty": "simple", @@ -6230,7 +8189,10 @@ { "query_id": 692, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges", + "users" + ], "query": "How long did it take the user, known by his or her display name 'Zolomon' to get the badge? Count from the date the user's account was created.", "answer": "SELECT T1.Date - T2.CreationDate FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Zolomon'", "difficulty": "moderate", @@ -6239,7 +8201,11 @@ { "query_id": 693, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments", + "posts" + ], "query": "Identify the number of posts and comments left by the user, who has the latest created user account.", "answer": "SELECT COUNT(T2.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T3.PostId = T2.Id ORDER BY T1.CreationDate DESC LIMIT 1", "difficulty": "simple", @@ -6248,7 +8214,11 @@ { "query_id": 694, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments", + "posts" + ], "query": "Provide the text of the latest comment to the post with the title 'Analysing wind data with R' and the display name of the user who left it.", "answer": "SELECT T3.Text, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T2.Title = 'Analysing wind data with R' ORDER BY T1.CreationDate DESC LIMIT 1", "difficulty": "moderate", @@ -6257,7 +8227,9 @@ { "query_id": 695, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "badges" + ], "query": "How many users were awarded with 'Citizen Patrol' badge?", "answer": "SELECT COUNT(id) FROM badges WHERE `Name` = 'Citizen Patrol'", "difficulty": "simple", @@ -6266,7 +8238,9 @@ { "query_id": 696, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags" + ], "query": "Count the number of posts with a tag specified as 'careers'.", "answer": "SELECT COUNT(Id) FROM tags WHERE TagName = 'careers'", "difficulty": "simple", @@ -6275,7 +8249,9 @@ { "query_id": 697, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'?", "answer": "SELECT Reputation, Views FROM users WHERE DisplayName = 'Jarrod Dixon'", "difficulty": "simple", @@ -6284,7 +8260,9 @@ { "query_id": 698, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "How many comments and answers were left by the users on the post with the title 'Clustering 1D data'?", "answer": "SELECT CommentCount, AnswerCount FROM posts WHERE Title = 'Clustering 1D data'", "difficulty": "simple", @@ -6293,7 +8271,9 @@ { "query_id": 699, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users" + ], "query": "When did the user known as 'IrishStat' create his or her account?", "answer": "SELECT CreationDate FROM users WHERE DisplayName = 'IrishStat'", "difficulty": "simple", @@ -6302,7 +8282,9 @@ { "query_id": 700, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "votes" + ], "query": "Identify the number of posts that offer a bounty amount over 30.", "answer": "SELECT COUNT(id) FROM votes WHERE BountyAmount >= 30", "difficulty": "simple", @@ -6311,7 +8293,10 @@ { "query_id": 701, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "posts" + ], "query": "Among all the posts posted by the most influential user, identify the percentage with a score above 50.", "answer": "SELECT CAST(SUM(CASE WHEN T2.Score >= 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Id) FROM users T1 INNER JOIN posts T2 ON T1.Id = T2.OwnerUserId INNER JOIN ( SELECT MAX(Reputation) AS max_reputation FROM users ) T3 ON T1.Reputation = T3.max_reputation", "difficulty": "challenging", @@ -6320,7 +8305,9 @@ { "query_id": 702, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "posts" + ], "query": "How many posts have a score less than 20?", "answer": "SELECT COUNT(id) FROM posts WHERE Score < 20", "difficulty": "simple", @@ -6329,7 +8316,9 @@ { "query_id": 703, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags" + ], "query": "Among the tags with tag ID below 15, how many of them have 20 count of posts and below?", "answer": "SELECT COUNT(id) FROM tags WHERE Count <= 20 AND Id < 15", "difficulty": "simple", @@ -6338,7 +8327,9 @@ { "query_id": 704, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "tags" + ], "query": "What is the excerpt post ID and wiki post ID of the tag named sample?", "answer": "SELECT ExcerptPostId, WikiPostId FROM tags WHERE TagName = 'sample'", "difficulty": "simple", @@ -6347,7 +8338,10 @@ { "query_id": 705, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Give the user's reputation and up vote number of the user that commented \"fine, you win :)\".", "answer": "SELECT T2.Reputation, T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'fine, you win :)'", "difficulty": "simple", @@ -6356,7 +8350,10 @@ { "query_id": 706, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Give the texts commented on the post about linear regression.", "answer": "SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title LIKE '%linear regression%'", "difficulty": "simple", @@ -6365,7 +8362,10 @@ { "query_id": 707, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "Among the posts with views ranging from 100 to 150, what is the comment with the highest score?", "answer": "SELECT Text FROM comments WHERE PostId IN ( SELECT Id FROM posts WHERE ViewCount BETWEEN 100 AND 150 ) ORDER BY Score DESC LIMIT 1", "difficulty": "moderate", @@ -6374,7 +8374,10 @@ { "query_id": 708, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "List the creation date and age of the user that commented with webiste.", "answer": "SELECT T2.CreationDate, T2.Age FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.text LIKE '%http://%'", "difficulty": "moderate", @@ -6383,7 +8386,10 @@ { "query_id": 709, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "In comments with 0 score, how many of the posts have view count lower than 5?", "answer": "SELECT COUNT(T1.Id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.ViewCount < 5 AND T2.Score = 0", "difficulty": "simple", @@ -6392,7 +8398,10 @@ { "query_id": 710, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "In posts with 1 comment, how many of the comments have 0 score?", "answer": "SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.CommentCount = 1 AND T2.Score = 0", "difficulty": "simple", @@ -6401,7 +8410,10 @@ { "query_id": 711, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Among products comments with 0 score, what is the total number of users ages 40 years old?", "answer": "SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40", "difficulty": "simple", @@ -6410,7 +8422,10 @@ { "query_id": 712, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "comments", + "posts" + ], "query": "What is the post ID and the comments commented in the post titled by \"Group differences on a five point Likert item\"?", "answer": "SELECT T2.Id, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'Group differences on a five point Likert item'", "difficulty": "simple", @@ -6419,7 +8434,10 @@ { "query_id": 713, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "What is the up vote number of the user that commented \"R is also lazy evaluated.\"?", "answer": "SELECT T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'R is also lazy evaluated.'", "difficulty": "simple", @@ -6428,7 +8446,10 @@ { "query_id": 714, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "List the comments commented by the user with a username of Harvey Motulsky.", "answer": "SELECT T1.Text FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Harvey Motulsky'", "difficulty": "simple", @@ -6437,7 +8458,10 @@ { "query_id": 715, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "In comments with score between 1 to 5, list down the display names of the users with 0 down votes.", "answer": "SELECT T2.DisplayName FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score BETWEEN 1 AND 5 AND T2.DownVotes = 0", "difficulty": "simple", @@ -6446,7 +8470,10 @@ { "query_id": 716, "database_id": "codebase_community", - "table_id": "N/A", + "table_id": [ + "users", + "comments" + ], "query": "Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes?", "answer": "SELECT CAST(SUM(IIF(T1.UpVotes = 0, 1, 0)) AS REAL) / COUNT(T1.Id) AS per FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Score BETWEEN 5 AND 10", "difficulty": "moderate", @@ -6455,7 +8482,11 @@ { "query_id": 717, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Please list all the superpowers of 3-D Man.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = '3-D Man'", "difficulty": "simple", @@ -6464,7 +8495,10 @@ { "query_id": 718, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "How many superheroes have the super power of \"Super Strength\"?", "answer": "SELECT COUNT(T1.hero_id) FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Super Strength'", "difficulty": "simple", @@ -6473,7 +8507,11 @@ { "query_id": 719, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Among the superheroes with the super power of \"Super Strength\", how many of them have a height of over 200cm?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Super Strength' AND T1.height_cm > 200", "difficulty": "moderate", @@ -6482,7 +8520,10 @@ { "query_id": 720, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_power" + ], "query": "Please list the full names of all the superheroes with over 15 super powers.", "answer": "SELECT DISTINCT T1.full_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.full_name HAVING COUNT(T2.power_id) > 15", "difficulty": "simple", @@ -6491,7 +8532,10 @@ { "query_id": 721, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "How many superheroes have blue eyes?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue'", "difficulty": "simple", @@ -6500,7 +8544,10 @@ { "query_id": 722, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is the colour of Apocalypse's skin?", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse'", "difficulty": "simple", @@ -6509,7 +8556,12 @@ { "query_id": 723, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour", + "superpower", + "hero_power" + ], "query": "Among the superheroes with blue eyes, how many of them have the super power of \"Agility\"?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id INNER JOIN colour AS T4 ON T1.eye_colour_id = T4.id WHERE T3.power_name = 'Agility' AND T4.colour = 'Blue'", "difficulty": "moderate", @@ -6518,7 +8570,10 @@ { "query_id": 724, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Please list the superhero names of all the superheroes that have blue eyes and blond hair.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Blond'", "difficulty": "challenging", @@ -6527,7 +8582,10 @@ { "query_id": 725, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "How many superheroes are published by Marvel Comics?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics'", "difficulty": "simple", @@ -6536,7 +8594,10 @@ { "query_id": 726, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Please give the full name of the tallest hero published by Marvel Comics.", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics' ORDER BY T1.height_cm DESC LIMIT 1", "difficulty": "moderate", @@ -6545,7 +8606,10 @@ { "query_id": 727, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Who is the publisher of Sauron?", "answer": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Sauron'", "difficulty": "simple", @@ -6554,7 +8618,11 @@ { "query_id": 728, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "colour" + ], "query": "Among the superheroes from Marvel Comics, how many of them have blue eyes?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.colour = 'Blue'", "difficulty": "moderate", @@ -6563,7 +8631,10 @@ { "query_id": 729, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "What is the average height of the superheroes from Marvel Comics?", "answer": "SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics'", "difficulty": "simple", @@ -6572,7 +8643,12 @@ { "query_id": 730, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "superpower", + "hero_power" + ], "query": "Among the superheroes from Marvel Comics, what is the percentage of those who have the super power of \"Super Strength\"?", "answer": "SELECT CAST(COUNT(CASE WHEN T3.power_name = 'Super Strength' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id INNER JOIN publisher AS T4 ON T1.publisher_id = T4.id WHERE T4.publisher_name = 'Marvel Comics'", "difficulty": "challenging", @@ -6581,7 +8657,10 @@ { "query_id": 731, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "How many superheroes did DC Comics publish?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics'", "difficulty": "simple", @@ -6590,7 +8669,12 @@ { "query_id": 732, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "hero_attribute", + "attribute" + ], "query": "Which publisher published the slowest superhero?", "answer": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id INNER JOIN attribute AS T4 ON T3.attribute_id = T4.id WHERE T4.attribute_name = 'Speed' ORDER BY T3.attribute_value LIMIT 1", "difficulty": "moderate", @@ -6599,7 +8683,11 @@ { "query_id": 733, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "colour" + ], "query": "How many gold-eyed superheroes did Marvel Comics publish?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.colour = 'Gold'", "difficulty": "moderate", @@ -6608,7 +8696,10 @@ { "query_id": 734, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "What is the publisher's name of Blue Beetle II?", "answer": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Blue Beetle II'", "difficulty": "simple", @@ -6617,7 +8708,10 @@ { "query_id": 735, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "How many superheroes with blonde hair are there?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id WHERE T2.colour = 'Blond'", "difficulty": "simple", @@ -6626,7 +8720,11 @@ { "query_id": 736, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "Who is the dumbest superhero?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Intelligence' ORDER BY T2.attribute_value LIMIT 1", "difficulty": "moderate", @@ -6635,7 +8733,10 @@ { "query_id": 737, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "What is Copycat's race?", "answer": "SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'Copycat'", "difficulty": "simple", @@ -6644,7 +8745,10 @@ { "query_id": 738, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "hero_attribute" + ], "query": "How many superheroes have durability of less than 50?", "answer": "SELECT COUNT(T1.hero_id) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id WHERE T2.attribute_name = 'Durability' AND T1.attribute_value < 50", "difficulty": "simple", @@ -6653,7 +8757,11 @@ { "query_id": 739, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "What are the names of the superheroes with the power of death touch?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Death Touch'", "difficulty": "moderate", @@ -6662,7 +8770,12 @@ { "query_id": 740, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute", + "gender" + ], "query": "How many female superheroes have a strength value of 100?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.attribute_name = 'Strength' AND T2.attribute_value = 100 AND T4.gender = 'Female'", "difficulty": "moderate", @@ -6671,7 +8784,10 @@ { "query_id": 741, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_power" + ], "query": "What is the name of the superhero that has the most powers?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.superhero_name ORDER BY COUNT(T2.hero_id) DESC LIMIT 1", "difficulty": "simple", @@ -6680,7 +8796,10 @@ { "query_id": 742, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "How many vampire superheroes are there?", "answer": "SELECT COUNT(T1.superhero_name) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'", "difficulty": "simple", @@ -6689,7 +8808,11 @@ { "query_id": 743, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "alignment" + ], "query": "What is the percentage of superheroes who act in their own self-interest or make decisions based on their own moral code? Indicate how many of the said superheroes were published by Marvel Comics.", "answer": "SELECT (CAST(COUNT(*) AS REAL) * 100 / (SELECT COUNT(*) FROM superhero)), CAST(SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T3.id = T1.alignment_id WHERE T3.alignment = 'Bad'", "difficulty": "challenging", @@ -6698,7 +8821,10 @@ { "query_id": 744, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.", "answer": "SELECT SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id", "difficulty": "challenging", @@ -6707,7 +8833,9 @@ { "query_id": 745, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher" + ], "query": "Give the publisher ID of Star Trek.", "answer": "SELECT id FROM publisher WHERE publisher_name = 'Star Trek'", "difficulty": "simple", @@ -6716,7 +8844,9 @@ { "query_id": 746, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "hero_attribute" + ], "query": "Calculate the average attribute value of all superheroes.", "answer": "SELECT AVG(attribute_value) FROM hero_attribute", "difficulty": "simple", @@ -6725,7 +8855,9 @@ { "query_id": 747, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "What is the total number of superheroes without full name?", "answer": "SELECT COUNT(id) FROM superhero WHERE full_name IS NULL", "difficulty": "simple", @@ -6734,7 +8866,10 @@ { "query_id": 748, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is the eye colour of superhero with superhero ID 75?", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.id = 75", "difficulty": "simple", @@ -6743,7 +8878,11 @@ { "query_id": 749, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Provide the superpowers of the superhero called Deathlok.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Deathlok'", "difficulty": "simple", @@ -6752,7 +8891,10 @@ { "query_id": 750, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender" + ], "query": "What is the average weight of all female superheroes?", "answer": "SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'", "difficulty": "simple", @@ -6761,7 +8903,12 @@ { "query_id": 751, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "gender", + "hero_power" + ], "query": "List down at least five superpowers of male superheroes.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T3.id = T2.power_id INNER JOIN gender AS T4 ON T4.id = T1.gender_id WHERE T4.gender = 'Male' LIMIT 5", "difficulty": "moderate", @@ -6770,7 +8917,10 @@ { "query_id": 752, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Give the name of the alien superheroes.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'", "difficulty": "simple", @@ -6779,7 +8929,10 @@ { "query_id": 753, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.", "answer": "SELECT DISTINCT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.height_cm BETWEEN 170 AND 190 AND T2.colour LIKE 'No Colour'", "difficulty": "moderate", @@ -6788,7 +8941,10 @@ { "query_id": 754, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "What is the superpower of hero ID 56?", "answer": "SELECT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T1.hero_id = 56", "difficulty": "simple", @@ -6797,7 +8953,10 @@ { "query_id": 755, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "List down at least five full name of Demi-God superheroes.", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Demi-God'", "difficulty": "simple", @@ -6806,7 +8965,10 @@ { "query_id": 756, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment" + ], "query": "How many bad superheroes are there?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Bad'", "difficulty": "simple", @@ -6815,7 +8977,10 @@ { "query_id": 757, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Identify the race of the superhero who weighed 169 kg.", "answer": "SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 169", "difficulty": "simple", @@ -6824,7 +8989,11 @@ { "query_id": 758, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race", + "colour" + ], "query": "Provide the hair colour of the human superhero who is 185 cm tall.", "answer": "SELECT DISTINCT T3.colour FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T1.height_cm = 185 AND T2.race = 'Human'", "difficulty": "moderate", @@ -6833,7 +9002,10 @@ { "query_id": 759, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is the eye clolour of the heaviest superhero?", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id ORDER BY T1.weight_kg DESC LIMIT 1", "difficulty": "simple", @@ -6842,7 +9014,10 @@ { "query_id": 760, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?", "answer": "SELECT CAST(COUNT(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.height_cm BETWEEN 150 AND 180", "difficulty": "challenging", @@ -6851,7 +9026,10 @@ { "query_id": 761, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender" + ], "query": "Among the male superheroes, list the full names of superheroes with weight greater than the 79% average weight of all superheroes.", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Male' AND T1.weight_kg * 100 > ( SELECT AVG(weight_kg) FROM superhero ) * 79", "difficulty": "moderate", @@ -6860,7 +9038,10 @@ { "query_id": 762, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "Which power do superheroes have the most of?", "answer": "SELECT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id GROUP BY T2.power_name ORDER BY COUNT(T1.hero_id) DESC LIMIT 1", "difficulty": "simple", @@ -6869,7 +9050,10 @@ { "query_id": 763, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_attribute" + ], "query": "Indicate the attribute value of superhero Abomination.", "answer": "SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T1.superhero_name = 'Abomination'", "difficulty": "simple", @@ -6878,7 +9062,10 @@ { "query_id": 764, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "What are the superpowers of heroes with ID 1?", "answer": "SELECT DISTINCT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T1.hero_id = 1", "difficulty": "simple", @@ -6887,7 +9074,10 @@ { "query_id": 765, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "How many heroes have stealth power?", "answer": "SELECT COUNT(T1.hero_id) FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Stealth'", "difficulty": "simple", @@ -6896,7 +9086,11 @@ { "query_id": 766, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "What is the hero's full name with the highest attribute in strength?", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Strength' ORDER BY T2.attribute_value DESC LIMIT 1", "difficulty": "moderate", @@ -6905,7 +9099,10 @@ { "query_id": 767, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is the average of superheroes with no skin colour?", "answer": "SELECT CAST(COUNT(*) AS REAL) / SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id", "difficulty": "simple", @@ -6914,7 +9111,10 @@ { "query_id": 768, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "How many superheroes were published by Dark Horse Comics?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Dark Horse Comics'", "difficulty": "simple", @@ -6923,7 +9123,12 @@ { "query_id": 769, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute", + "publisher" + ], "query": "Which superhero has the most durability published by Dark Horse Comics?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T3.id = T2.attribute_id INNER JOIN publisher AS T4 ON T4.id = T1.publisher_id WHERE T4.publisher_name = 'Dark Horse Comics' AND T3.attribute_name = 'Durability' ORDER BY T2.attribute_value DESC LIMIT 1", "difficulty": "challenging", @@ -6932,7 +9137,10 @@ { "query_id": 770, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is the eyes colour of Abraham Sapien?", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Abraham Sapien'", "difficulty": "simple", @@ -6941,7 +9149,11 @@ { "query_id": 771, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "List the name of superheroes with flight power.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Flight'", "difficulty": "simple", @@ -6950,7 +9162,11 @@ { "query_id": 772, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "gender" + ], "query": "List the eyes, hair and skin colour of all female superheroes published by Dark Horse Comics.", "answer": "SELECT T1.eye_colour_id, T1.hair_colour_id, T1.skin_colour_id FROM superhero AS T1 INNER JOIN publisher AS T2 ON T2.id = T1.publisher_id INNER JOIN gender AS T3 ON T3.id = T1.gender_id WHERE T2.publisher_name = 'Dark Horse Comics' AND T3.gender = 'Female'", "difficulty": "challenging", @@ -6959,7 +9175,10 @@ { "query_id": 773, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.", "answer": "SELECT T1.superhero_name, T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.eye_colour_id = T1.hair_colour_id AND T1.eye_colour_id = T1.skin_colour_id", "difficulty": "challenging", @@ -6968,7 +9187,10 @@ { "query_id": 774, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Which group does superhero A-Bomb belong to?", "answer": "SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'A-Bomb'", "difficulty": "simple", @@ -6977,7 +9199,11 @@ { "query_id": 775, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender", + "colour" + ], "query": "What is the percentage of blue female superheroes among all female superheroes?", "answer": "SELECT CAST(COUNT(CASE WHEN T3.colour = 'Blue' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.gender = 'Female'", "difficulty": "challenging", @@ -6986,7 +9212,10 @@ { "query_id": 776, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Provide the hero name and race of Charles Chandler.", "answer": "SELECT T1.superhero_name, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.full_name = 'Charles Chandler'", "difficulty": "simple", @@ -6995,7 +9224,10 @@ { "query_id": 777, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender" + ], "query": "What is the gender of Agent 13 hero?", "answer": "SELECT T2.gender FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T1.superhero_name = 'Agent 13'", "difficulty": "simple", @@ -7004,7 +9236,11 @@ { "query_id": 778, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Provide superheroes' names who have the adaptation power.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Adaptation'", "difficulty": "simple", @@ -7013,7 +9249,10 @@ { "query_id": 779, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_power" + ], "query": "How many powers does Amazo hero have?", "answer": "SELECT COUNT(T1.power_id) FROM hero_power AS T1 INNER JOIN superhero AS T2 ON T1.hero_id = T2.id WHERE T2.superhero_name = 'Amazo'", "difficulty": "simple", @@ -7022,7 +9261,11 @@ { "query_id": 780, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "List the powers of Hunter Zolomon.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Hunter Zolomon'", "difficulty": "simple", @@ -7031,7 +9274,10 @@ { "query_id": 781, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Provide the heights of the heroes whose eye colours are amber.", "answer": "SELECT T1.height_cm FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Amber'", "difficulty": "simple", @@ -7040,7 +9286,10 @@ { "query_id": 782, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "List the heroes' names whose eyes and hair colours are both black.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id AND T1.hair_colour_id = T2.id WHERE T2.colour = 'Black'", "difficulty": "moderate", @@ -7049,7 +9298,10 @@ { "query_id": 783, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Provide the eye colours of the heroes whose skin colours are gold.", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T3.colour = 'Gold'", "difficulty": "simple", @@ -7058,7 +9310,10 @@ { "query_id": 784, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Provide the full names of vampire heroes.", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'", "difficulty": "simple", @@ -7067,7 +9322,10 @@ { "query_id": 785, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment" + ], "query": "Describe the names of neutral alignment superheroes.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'", "difficulty": "simple", @@ -7076,7 +9334,10 @@ { "query_id": 786, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "hero_attribute" + ], "query": "How many heroes have the highest attribute value in strength?", "answer": "SELECT COUNT(T1.hero_id) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id WHERE T2.attribute_name = 'Strength' AND T1.attribute_value = ( SELECT MAX(attribute_value) FROM hero_attribute )", "difficulty": "moderate", @@ -7085,7 +9346,11 @@ { "query_id": 787, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment", + "race" + ], "query": "What are the race and alignment of Cameron Hicks?", "answer": "SELECT T2.race, T3.alignment FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T1.superhero_name = 'Cameron Hicks'", "difficulty": "simple", @@ -7094,7 +9359,11 @@ { "query_id": 788, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "gender" + ], "query": "How many percent of female heroes were published by Marvel Comics?", "answer": "SELECT CAST(COUNT(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T3.gender = 'Female'", "difficulty": "challenging", @@ -7103,7 +9372,10 @@ { "query_id": 789, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Find the average weight of the heroes who are aliens.", "answer": "SELECT CAST(SUM(T1.weight_kg) AS REAL) / COUNT(T1.id) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'", "difficulty": "simple", @@ -7112,7 +9384,9 @@ { "query_id": 790, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.", "answer": "SELECT ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Emil Blonsky' ) - ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Charles Chandler' ) AS CALCULATE", "difficulty": "moderate", @@ -7121,7 +9395,9 @@ { "query_id": 791, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Calculate the average height for each superhero.", "answer": "SELECT CAST(SUM(height_cm) AS REAL) / COUNT(id) FROM superhero", "difficulty": "simple", @@ -7130,7 +9406,11 @@ { "query_id": 792, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "What is Abomination's superpower?", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Abomination'", "difficulty": "simple", @@ -7139,7 +9419,11 @@ { "query_id": 793, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender", + "race" + ], "query": "Among the superheroes with the race of god/eternal, how many of them are male", "answer": "SELECT COUNT(*) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN gender AS T3 ON T3.id = T1.gender_id WHERE T1.race_id = 21 AND T1.gender_id = 1", "difficulty": "simple", @@ -7148,7 +9432,11 @@ { "query_id": 794, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "Which hero was the fastest?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Speed' ORDER BY T2.attribute_value DESC LIMIT 1", "difficulty": "moderate", @@ -7157,7 +9445,10 @@ { "query_id": 795, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment" + ], "query": "How many superheroes have a neutral alignment?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'", "difficulty": "simple", @@ -7166,7 +9457,11 @@ { "query_id": 796, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "State all of 3-D Man's attributes along with their values.", "answer": "SELECT T3.attribute_name, T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = '3-D Man'", "difficulty": "moderate", @@ -7175,7 +9470,10 @@ { "query_id": 797, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Which superheroes have blue eyes with brown hair?", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Brown'", "difficulty": "moderate", @@ -7184,7 +9482,10 @@ { "query_id": 798, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "What is the publisher for Hawkman, Karate Kid and Speedy?", "answer": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name IN ('Hawkman', 'Karate Kid', 'Speedy')", "difficulty": "moderate", @@ -7193,7 +9494,10 @@ { "query_id": 799, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "How many superheroes didn't have any publisher?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.id = 1", "difficulty": "simple", @@ -7202,7 +9506,10 @@ { "query_id": 800, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Calculate the percentage of superheroes with blue eyes.", "answer": "SELECT CAST(COUNT(CASE WHEN T2.colour = 'Blue' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id", "difficulty": "moderate", @@ -7211,7 +9518,10 @@ { "query_id": 801, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender" + ], "query": "Find the ratio between male superheroes and female superheroes.", "answer": "SELECT CAST(COUNT(CASE WHEN T2.gender = 'Male' THEN T1.id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Female' THEN T1.id ELSE NULL END) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id", "difficulty": "moderate", @@ -7220,7 +9530,9 @@ { "query_id": 802, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Who is the tallest superhero?", "answer": "SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1", "difficulty": "simple", @@ -7229,7 +9541,9 @@ { "query_id": 803, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower" + ], "query": "What is the power ID of cryokinesis?", "answer": "SELECT id FROM superpower WHERE power_name = 'Cryokinesis'", "difficulty": "simple", @@ -7238,7 +9552,9 @@ { "query_id": 804, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Provide the name of superhero with superhero ID 294.", "answer": "SELECT superhero_name FROM superhero WHERE id = 294", "difficulty": "simple", @@ -7247,7 +9563,9 @@ { "query_id": 805, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "List the full names of superheroes with missing weight.", "answer": "SELECT DISTINCT full_name FROM superhero WHERE full_name IS NOT NULL AND (weight_kg IS NULL OR weight_kg = 0)", "difficulty": "simple", @@ -7256,7 +9574,10 @@ { "query_id": 806, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name.", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Karen Beecher-Duncan'", "difficulty": "simple", @@ -7265,7 +9586,11 @@ { "query_id": 807, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "What is the superpowers of the superhero has Helen Parr as their full name?", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Helen Parr'", "difficulty": "simple", @@ -7274,7 +9599,10 @@ { "query_id": 808, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Find the race of the superhero who weighs 108kg and is 188cm tall.", "answer": "SELECT DISTINCT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 108 AND T1.height_cm = 188", "difficulty": "simple", @@ -7283,7 +9611,10 @@ { "query_id": 809, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "What is the publisher name of the superhero ID 38?", "answer": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.id = 38", "difficulty": "simple", @@ -7292,7 +9623,11 @@ { "query_id": 810, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_attribute", + "race" + ], "query": "What is the race of the superhero with maximum attribute value?", "answer": "SELECT T3.race FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN race AS T3 ON T1.race_id = T3.id ORDER BY T2.attribute_value DESC LIMIT 1", "difficulty": "simple", @@ -7301,7 +9636,11 @@ { "query_id": 811, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Give the alignment and superpowers of the superhero named Atom IV.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T3.id = T2.power_id WHERE T1.superhero_name = 'Atom IV'", "difficulty": "simple", @@ -7310,7 +9649,10 @@ { "query_id": 812, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "List down at least five full names of superheroes with blue eyes.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue' LIMIT 5", "difficulty": "simple", @@ -7319,7 +9661,11 @@ { "query_id": 813, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment", + "hero_attribute" + ], "query": "Calculate the average attribute value of all neutral superheroes.", "answer": "SELECT AVG(T1.attribute_value) FROM hero_attribute AS T1 INNER JOIN superhero AS T2 ON T1.hero_id = T2.id INNER JOIN alignment AS T3 ON T2.alignment_id = T3.id WHERE T3.alignment = 'Neutral'", "difficulty": "simple", @@ -7328,7 +9674,11 @@ { "query_id": 814, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_attribute", + "colour" + ], "query": "List the skin colour of the superheroes with 100 attribute value.", "answer": "SELECT DISTINCT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id WHERE T3.attribute_value = 100", "difficulty": "moderate", @@ -7337,7 +9687,11 @@ { "query_id": 815, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment", + "gender" + ], "query": "Count the good female superheroes.", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Good' AND T3.gender = 'Female'", "difficulty": "simple", @@ -7346,7 +9700,10 @@ { "query_id": 816, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_attribute" + ], "query": "Provide the names of superheroes with attribute value between 75 to 80.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T2.attribute_value BETWEEN 75 AND 80", "difficulty": "simple", @@ -7355,7 +9712,12 @@ { "query_id": 817, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "gender", + "race", + "colour" + ], "query": "Give the race of the blue-haired male superhero.", "answer": "SELECT T3.race FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T2.colour = 'Blue' AND T4.gender = 'Male'", "difficulty": "moderate", @@ -7364,7 +9726,11 @@ { "query_id": 818, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment", + "gender" + ], "query": "Among the bad superheroes, what is the percentage of female superheroes?", "answer": "SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Bad'", "difficulty": "challenging", @@ -7373,7 +9739,10 @@ { "query_id": 819, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.", "answer": "SELECT SUM(CASE WHEN T2.id = 7 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg = 0 OR T1.weight_kg is NULL", "difficulty": "challenging", @@ -7382,7 +9751,11 @@ { "query_id": 820, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "How strong is the Hulk?", "answer": "SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = 'Hulk' AND T3.attribute_name = 'Strength'", "difficulty": "moderate", @@ -7391,7 +9764,11 @@ { "query_id": 821, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "List down Ajax's superpowers.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Ajax'", "difficulty": "simple", @@ -7400,7 +9777,11 @@ { "query_id": 822, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment", + "colour" + ], "query": "How many green-skinned villains are there in the superhero universe?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.alignment = 'Bad' AND T3.colour = 'Green'", "difficulty": "moderate", @@ -7409,7 +9790,11 @@ { "query_id": 823, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "gender" + ], "query": "How many female superheroes are in Marvel Comics?", "answer": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.gender = 'Female'", "difficulty": "moderate", @@ -7418,7 +9803,11 @@ { "query_id": 824, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "Identify superheroes who can control wind and list their names in alphabetical order.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Wind Control' ORDER BY T1.superhero_name", "difficulty": "moderate", @@ -7427,7 +9816,12 @@ { "query_id": 825, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "gender", + "hero_power" + ], "query": "Identify the gender of the superhero who has the ability of Phoenix Force.", "answer": "SELECT T4.gender FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.power_name = 'Phoenix Force'", "difficulty": "moderate", @@ -7436,7 +9830,10 @@ { "query_id": 826, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Identify the heaviest superhero in DC Comics.", "answer": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' ORDER BY T1.weight_kg DESC LIMIT 1", "difficulty": "simple", @@ -7445,7 +9842,11 @@ { "query_id": 827, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "race" + ], "query": "What is the average height of a non-human superhero in Dark Horse Comics?", "answer": "SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id WHERE T2.publisher_name = 'Dark Horse Comics' AND T3.race != 'Human'", "difficulty": "moderate", @@ -7454,7 +9855,11 @@ { "query_id": 828, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "Count the fastest superheroes.", "answer": "SELECT COUNT(T3.superhero_name) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id INNER JOIN superhero AS T3 ON T1.hero_id = T3.id WHERE T2.attribute_name = 'Speed' ORDER BY T1.attribute_value DESC LIMIT 1", "difficulty": "simple", @@ -7463,7 +9868,10 @@ { "query_id": 829, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero" + ], "query": "Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.", "answer": "SELECT SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id", "difficulty": "challenging", @@ -7472,7 +9880,11 @@ { "query_id": 830, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "attribute", + "superhero", + "hero_attribute" + ], "query": "Identify the weakest attribute of the Black Panther.", "answer": "SELECT T3.attribute_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = 'Black Panther' ORDER BY T2.attribute_value ASC LIMIT 1", "difficulty": "moderate", @@ -7481,7 +9893,10 @@ { "query_id": 831, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "What is Abomination's eye colour?", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Abomination'", "difficulty": "simple", @@ -7490,7 +9905,9 @@ { "query_id": 832, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Name the tallest superhero.", "answer": "SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1", "difficulty": "simple", @@ -7499,7 +9916,9 @@ { "query_id": 833, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Name the superhero, otherwise known as Charles Chandler.", "answer": "SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler'", "difficulty": "simple", @@ -7508,7 +9927,11 @@ { "query_id": 834, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "gender" + ], "query": "Among all superheroes created by George Lucas, identify the percentage of female superheroes.", "answer": "SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'George Lucas'", "difficulty": "challenging", @@ -7517,7 +9940,11 @@ { "query_id": 835, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "publisher", + "superhero", + "alignment" + ], "query": "Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes.", "answer": "SELECT CAST(COUNT(CASE WHEN T3.alignment = 'Good' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T2.publisher_name = 'Marvel Comics'", "difficulty": "challenging", @@ -7526,7 +9953,9 @@ { "query_id": 836, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "What is the total number of superheroes that have John as their first name?", "answer": "SELECT COUNT(id) FROM superhero WHERE full_name LIKE 'John%'", "difficulty": "simple", @@ -7535,7 +9964,9 @@ { "query_id": 837, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "hero_attribute" + ], "query": "Give the hero ID of superhero with the lowest attribute value.", "answer": "SELECT hero_id FROM hero_attribute WHERE attribute_value = ( SELECT MIN(attribute_value) FROM hero_attribute )", "difficulty": "simple", @@ -7544,7 +9975,9 @@ { "query_id": 838, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero" + ], "query": "Provide the full name of the superhero named Alien.", "answer": "SELECT full_name FROM superhero WHERE superhero_name = 'Alien'", "difficulty": "simple", @@ -7553,7 +9986,10 @@ { "query_id": 839, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.", "answer": "SELECT T1.full_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg < 100 AND T2.colour = 'Brown'", "difficulty": "simple", @@ -7562,7 +9998,10 @@ { "query_id": 840, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "hero_attribute" + ], "query": "List the attribute value of the superhero named Aquababy.", "answer": "SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T1.superhero_name = 'Aquababy'", "difficulty": "simple", @@ -7571,7 +10010,10 @@ { "query_id": 841, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "race" + ], "query": "Provide the weight and race of the superhero with superhero ID 40.", "answer": "SELECT T1.weight_kg, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.id = 40", "difficulty": "simple", @@ -7580,7 +10022,10 @@ { "query_id": 842, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "alignment" + ], "query": "Calculate the average height of all neutral superheroes.", "answer": "SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'", "difficulty": "simple", @@ -7589,7 +10034,10 @@ { "query_id": 843, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superpower", + "hero_power" + ], "query": "List the hero ID of superheroes have intellegence as their power.", "answer": "SELECT T1.hero_id FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Intelligence'", "difficulty": "simple", @@ -7598,7 +10046,10 @@ { "query_id": 844, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "colour" + ], "query": "Give the eye colour of Blackwulf.", "answer": "SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Blackwulf'", "difficulty": "simple", @@ -7607,7 +10058,11 @@ { "query_id": 845, "database_id": "superhero", - "table_id": "N/A", + "table_id": [ + "superhero", + "superpower", + "hero_power" + ], "query": "List the power of superheroes with height greater than 80% of the average height of all superheroes.", "answer": "SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.height_cm * 100 > ( SELECT AVG(height_cm) FROM superhero ) * 80", "difficulty": "moderate", @@ -7616,7 +10071,10 @@ { "query_id": 846, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "Please list the reference names of the drivers who are eliminated in the first period in race number 18.", "answer": "SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 18 ORDER BY T1.q1 DESC LIMIT 5", "difficulty": "moderate", @@ -7625,7 +10083,10 @@ { "query_id": 847, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "What is the surname of the driver with the best lap time in race number 19 in the second period?", "answer": "SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 AND T1.q2 IS NOT NULL ORDER BY T1.q2 ASC LIMIT 1", "difficulty": "simple", @@ -7634,7 +10095,10 @@ { "query_id": 848, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please list the year during which the race is held on circuits in Shanghai.", "answer": "SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.location = 'Shanghai'", "difficulty": "simple", @@ -7643,7 +10107,10 @@ { "query_id": 849, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found?", "answer": "SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'", "difficulty": "simple", @@ -7652,7 +10119,10 @@ { "query_id": 850, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please give the name of the race held on the circuits in Germany.", "answer": "SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Germany'", "difficulty": "simple", @@ -7661,7 +10131,10 @@ { "query_id": 851, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "Please list the positions of the circuits built by the constructor Renault.", "answer": "SELECT DISTINCT T1.position FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T2.name = 'Renault'", "difficulty": "simple", @@ -7670,7 +10143,10 @@ { "query_id": 852, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "How many races in the year 2010 are held on grand prixs outside Asia and Europe?", "answer": "SELECT COUNT(T3.raceId) FROM circuits AS T1 INNER JOIN races AS T3 ON T3.circuitID = T1.circuitId WHERE T1.country NOT IN ( 'Bahrain', 'China', 'Singapore', 'Japan', 'Korea', 'Turkey', 'UAE', 'Malaysia', 'Spain', 'Monaco', 'Azerbaijan', 'Austria', 'Belgium', 'France', 'Germany', 'Hungary', 'Italy', 'UK' ) AND T3.year = 2010", "difficulty": "moderate", @@ -7679,7 +10155,10 @@ { "query_id": 853, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please give the names of the races held on the circuits in Spain.", "answer": "SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Spain'", "difficulty": "simple", @@ -7688,7 +10167,10 @@ { "query_id": 854, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "What is the location coordinates of the circuits for Australian grand prix?", "answer": "SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Australian Grand Prix'", "difficulty": "simple", @@ -7697,7 +10179,10 @@ { "query_id": 855, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Where can I find the information about the races held on Sepang International Circuit?", "answer": "SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'", "difficulty": "simple", @@ -7706,7 +10191,10 @@ { "query_id": 856, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please list the time of the races held on Sepang International Circuit.", "answer": "SELECT DISTINCT T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'", "difficulty": "simple", @@ -7715,7 +10203,10 @@ { "query_id": 857, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Give the coordinate position for Abu Dhabi Grand Prix.", "answer": "SELECT DISTINCT T1.lat, T1.lng, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix'", "difficulty": "simple", @@ -7724,7 +10215,10 @@ { "query_id": 858, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructorResults", + "constructors" + ], "query": "Which country is the constructor which got 1 point in the race No. 24 from?", "answer": "SELECT T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 24 AND T1.points = 1", "difficulty": "simple", @@ -7733,7 +10227,10 @@ { "query_id": 859, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "What's Bruno Senna's Q1 result in the qualifying race No. 354?", "answer": "SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 354 AND T2.forename = 'Bruno' AND T2.surname = 'Senna'", "difficulty": "simple", @@ -7742,7 +10239,10 @@ { "query_id": 860, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?", "answer": "SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 355 AND T1.q2 LIKE '1:40%'", "difficulty": "simple", @@ -7751,7 +10251,10 @@ { "query_id": 861, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "What is his number of the driver who finished 0:01:54 in the Q3 of qualifying race No.903?", "answer": "SELECT T2.number FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 903 AND T1.q3 LIKE '1:54%'", "difficulty": "simple", @@ -7760,7 +10263,11 @@ { "query_id": 862, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "For the Bahrain Grand Prix in 2007, how many drivers not finished the game?", "answer": "SELECT COUNT(T3.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.year = 2007 AND T1.name = 'Bahrain Grand Prix' AND T2.time IS NULL", "difficulty": "simple", @@ -7769,7 +10276,10 @@ { "query_id": 863, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "seasons", + "races" + ], "query": "Show me the season page of year when the race No. 901 took place.", "answer": "SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901", "difficulty": "simple", @@ -7778,7 +10288,10 @@ { "query_id": 864, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "For the race happened on 2015/11/29, how many drivers finished the game?", "answer": "SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NOT NULL", "difficulty": "simple", @@ -7787,7 +10300,10 @@ { "query_id": 865, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "For all the drivers who finished the game in race No. 592, who is the oldest?", "answer": "SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 592 AND T2.time IS NOT NULL AND T1.dob IS NOT NULL ORDER BY T1.dob ASC LIMIT 1", "difficulty": "moderate", @@ -7796,7 +10312,10 @@ { "query_id": 866, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes" + ], "query": "Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.", "answer": "SELECT DISTINCT T2.forename, T2.surname, T2.url FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 161 AND T1.time LIKE '1:27%'", "difficulty": "moderate", @@ -7805,7 +10324,10 @@ { "query_id": 867, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "For the driver who set the fastest lap speed in race No.933, where does he come from?", "answer": "SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 933 AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1", "difficulty": "simple", @@ -7814,7 +10336,10 @@ { "query_id": 868, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Where is Malaysian Grand Prix held? Give the location coordinates.", "answer": "SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Malaysian Grand Prix'", "difficulty": "simple", @@ -7823,7 +10348,10 @@ { "query_id": 869, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructorResults", + "constructors" + ], "query": "For the constructor which got the highest point in the race No. 9 , what is its introduction website?", "answer": "SELECT T2.url FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 9 ORDER BY T1.points DESC LIMIT 1", "difficulty": "moderate", @@ -7832,7 +10360,10 @@ { "query_id": 870, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "What's Lucas di Grassi's Q1 result in the race No. 345?", "answer": "SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 345 AND T2.forename = 'Lucas' AND T2.surname = 'di Grassi'", "difficulty": "simple", @@ -7841,7 +10372,10 @@ { "query_id": 871, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from?", "answer": "SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 347 AND T1.q2 LIKE '1:15%'", "difficulty": "simple", @@ -7850,7 +10384,10 @@ { "query_id": 872, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code?", "answer": "SELECT T2.code FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 45 AND T1.q3 LIKE '1:33%'", "difficulty": "simple", @@ -7859,7 +10396,10 @@ { "query_id": 873, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "What is the actual finish time for Bruce McLaren in the race No.743?", "answer": "SELECT T2.time FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 743 AND T1.forename = 'Bruce' AND T1.surname = 'McLaren'", "difficulty": "simple", @@ -7868,7 +10408,11 @@ { "query_id": 874, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Who finished second in the San Marino Grand Prix in 2006?", "answer": "SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.year = 2006 AND T1.name = 'San Marino Grand Prix' AND T2.position = 2", "difficulty": "simple", @@ -7877,7 +10421,10 @@ { "query_id": 875, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "seasons", + "races" + ], "query": "Show me the season page of year when the race No. 901 took place.", "answer": "SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901", "difficulty": "simple", @@ -7886,7 +10433,10 @@ { "query_id": 876, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "For the race happened in 2015/11/29, how many drivers finished the game?", "answer": "SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NOT NULL", "difficulty": "simple", @@ -7895,7 +10445,10 @@ { "query_id": 877, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "For all the drivers who finished the game in race No. 872, who is the youngest?", "answer": "SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 872 AND T2.time IS NOT NULL ORDER BY T1.dob DESC LIMIT 1", "difficulty": "moderate", @@ -7904,7 +10457,10 @@ { "query_id": 878, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes" + ], "query": "Who was the driver that got the best lap time in the race No. 348? Give his full name.", "answer": "SELECT T2.forename, T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 348 ORDER BY T1.time ASC LIMIT 1", "difficulty": "simple", @@ -7913,7 +10469,10 @@ { "query_id": 879, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "For the driver who set the fastest lap speed, what is his nationality?", "answer": "SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1", "difficulty": "moderate", @@ -7922,7 +10481,10 @@ { "query_id": 880, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "Paul di Resta was in the No. 853 race, what percent faster did he finish in the 853rd race than the next race for the fastest lap speed?", "answer": "SELECT (SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) - SUM(IIF(T2.raceId = 854, T2.fastestLapSpeed, 0))) * 100 / SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Paul' AND T1.surname = 'di Resta'", "difficulty": "challenging", @@ -7931,7 +10493,10 @@ { "query_id": 881, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "For the drivers who took part in the race in 1983/7/16, what's their race completion rate?", "answer": "SELECT CAST(COUNT(CASE WHEN T2.time IS NOT NULL THEN T2.driverId END) AS REAL) * 100 / COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '1983-07-16'", "difficulty": "moderate", @@ -7940,7 +10505,9 @@ { "query_id": 882, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "Which year was the first Singapore Grand Prix?", "answer": "SELECT year FROM races WHERE name = 'Singapore Grand Prix' ORDER BY year ASC LIMIT 1", "difficulty": "simple", @@ -7949,7 +10516,9 @@ { "query_id": 883, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "How many races were there in 2005? Name all the races in descending order.", "answer": "SELECT name FROM races WHERE year = 2005 ORDER BY name DESC", "difficulty": "simple", @@ -7958,7 +10527,9 @@ { "query_id": 884, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "Name the first race recorded. What are the other races that happened within the same month and year of that race.", "answer": "SELECT name FROM races WHERE STRFTIME('%Y', date) = ( SELECT STRFTIME('%Y', date) FROM races ORDER BY date ASC LIMIT 1 ) AND STRFTIME('%m', date) = ( SELECT STRFTIME('%m', date) FROM races ORDER BY date ASC LIMIT 1 )", "difficulty": "moderate", @@ -7967,7 +10538,9 @@ { "query_id": 885, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "State the name and date of the last round of race in year 1999.", "answer": "SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1", "difficulty": "simple", @@ -7976,7 +10549,9 @@ { "query_id": 886, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "Which year has the most number of races?", "answer": "SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1", "difficulty": "simple", @@ -7985,7 +10560,9 @@ { "query_id": 887, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "Name the races in year 2017 that are not hosted in year 2000.", "answer": "SELECT name FROM races WHERE year = 2017 AND name NOT IN ( SELECT name FROM races WHERE year = 2000 )", "difficulty": "simple", @@ -7994,7 +10571,10 @@ { "query_id": 888, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "In which country was the first European Grand Prix hosted? Name the circuit and location.", "answer": "SELECT T1.country, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix' ORDER BY T2.year ASC LIMIT 1", "difficulty": "simple", @@ -8003,7 +10583,10 @@ { "query_id": 889, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "When was the last f1 season whereby Brands Hatch hosted the British Grand Prix?", "answer": "SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Brands Hatch' AND T2.name = 'British Grand Prix' ORDER BY T2.year DESC LIMIT 1", "difficulty": "simple", @@ -8012,7 +10595,10 @@ { "query_id": 890, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "How many seasons has Silverstone Circuit hosted the United Kindom grand prix?", "answer": "SELECT COUNT(T2.circuitid) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit' AND T2.name = 'British Grand Prix'", "difficulty": "simple", @@ -8021,7 +10607,11 @@ { "query_id": 891, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "Name all drivers in the 2010 Singapore Grand Prix order by their position stands.", "answer": "SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.name = 'Singapore Grand Prix' AND T1.year = 2010 ORDER BY T2.position ASC", "difficulty": "simple", @@ -8030,7 +10620,11 @@ { "query_id": 892, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "State the driver with the most points scored. Find his full name with that points.", "answer": "SELECT T3.forename, T3.surname, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId ORDER BY T2.points DESC LIMIT 1", "difficulty": "moderate", @@ -8039,7 +10633,11 @@ { "query_id": 893, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix.", "answer": "SELECT T3.forename, T3.surname, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.name = 'Chinese Grand Prix' AND T1.year = 2017 ORDER BY T2.points DESC LIMIT 3", "difficulty": "simple", @@ -8048,7 +10646,11 @@ { "query_id": 894, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes", + "drivers", + "races" + ], "query": "What is the best lap time recorded? List the driver and race with such recorded lap time.", "answer": "SELECT T2.milliseconds, T1.forename, T1.surname, T3.name FROM drivers AS T1 INNER JOIN lapTimes AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T2.raceId = T3.raceId ORDER BY T2.milliseconds ASC LIMIT 1", "difficulty": "moderate", @@ -8057,7 +10659,11 @@ { "query_id": 895, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes", + "races" + ], "query": "What is the average lap time for Sebastian Vettel in the 2009 Chinese Grand Prix?", "answer": "SELECT AVG(T2.milliseconds) FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Sebastian' AND T3.surname = 'Vettel' AND T1.year = 2009 AND T1.name = 'Chinese GrAND Prix'", "difficulty": "moderate", @@ -8066,7 +10672,11 @@ { "query_id": 896, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010.", "answer": "SELECT CAST(COUNT(CASE WHEN T2.position <> 1 THEN T2.position END) AS REAL) * 100 / COUNT(T2.driverStandingsId) FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.surname = 'Hamilton' AND T1.year >= 2010", "difficulty": "challenging", @@ -8075,7 +10685,10 @@ { "query_id": 897, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers" + ], "query": "Name the driver with the most winning. Mention his nationality and what is his average point scores.", "answer": "SELECT T1.forename, T1.surname, T1.nationality, AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId WHERE T2.wins = 1 GROUP BY T1.forename, T1.surname, T1.nationality ORDER BY COUNT(T2.wins) DESC LIMIT 1", "difficulty": "moderate", @@ -8084,7 +10697,9 @@ { "query_id": 898, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "How old is the youngest Japanese driver? What is his name?", "answer": "SELECT STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', dob), forename , surname FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1", "difficulty": "simple", @@ -8093,7 +10708,10 @@ { "query_id": 899, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "List circuits which host 4 f1 races from year 1990 to 2000.", "answer": "SELECT DISTINCT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE STRFTIME('%Y', T2.date) BETWEEN '1990' AND '2000' GROUP BY T1.name HAVING COUNT(T2.raceId) = 4", "difficulty": "moderate", @@ -8102,7 +10720,10 @@ { "query_id": 900, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "List circuits in USA which hosted f1 races in 2006. State the name and location of circuit and the name of the race it hosted.", "answer": "SELECT T1.name, T1.location, T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'USA' AND T2.year = 2006", "difficulty": "simple", @@ -8111,7 +10732,10 @@ { "query_id": 901, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Name the races along with its circuit name and location for f1 races hosted in September 2005.", "answer": "SELECT DISTINCT T2.name, T1.name, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2005 AND STRFTIME('%m', T2.date) = '09'", "difficulty": "simple", @@ -8120,7 +10744,11 @@ { "query_id": 902, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "Which race was Alex Yoong in when he was in track number less than 10?", "answer": "SELECT T1.name FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Alex' AND T3.surname = 'Yoong' AND T2.position < 10", "difficulty": "simple", @@ -8129,7 +10757,12 @@ { "query_id": 903, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits", + "driverStandings", + "drivers", + "races" + ], "query": "How many times did Michael Schumacher won from races hosted in Sepang International Circuit?", "answer": "SELECT SUM(T2.wins) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId INNER JOIN circuits AS T4 ON T4.circuitId = T3.circuitId WHERE T1.forename = 'Michael' AND T1.surname = 'Schumacher' AND T4.name = 'Sepang International Circuit'", "difficulty": "moderate", @@ -8138,7 +10771,11 @@ { "query_id": 904, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes", + "races" + ], "query": "State the race and year of race in which Michael Schumacher had his fastest lap.", "answer": "SELECT T1.name, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Michael' AND T3.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1", "difficulty": "moderate", @@ -8147,7 +10784,11 @@ { "query_id": 905, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "What is Eddie Irvine's average points scored in year 2000?", "answer": "SELECT AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T1.forename = 'Eddie' AND T1.surname = 'Irvine' AND T3.year = 2000", "difficulty": "simple", @@ -8156,7 +10797,11 @@ { "query_id": 906, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "Which was Lewis Hamilton first race? What was his points recorded for his first race event?", "answer": "SELECT T1.name, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' ORDER BY T1.year ASC LIMIT 1", "difficulty": "moderate", @@ -8165,7 +10810,10 @@ { "query_id": 907, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "List all races in 2017 and the hosting country order by date of the event.", "answer": "SELECT DISTINCT T2.name, T1.country FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2017 ORDER BY T2.date ASC", "difficulty": "simple", @@ -8174,7 +10822,11 @@ { "query_id": 908, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "lapTimes", + "circuits" + ], "query": "What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted.", "answer": "SELECT T3.lap, T2.name, T2.year, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId INNER JOIN lapTimes AS T3 ON T3.raceId = T2.raceId ORDER BY T3.lap DESC LIMIT 1", "difficulty": "simple", @@ -8183,7 +10835,10 @@ { "query_id": 909, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Among all European Grand Prix races, what is the percentage of the races were hosted in Germany?", "answer": "SELECT CAST(COUNT(CASE WHEN T1.country = 'Germany' THEN T2.circuitID END) AS REAL) * 100 / COUNT(T2.circuitId) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix'", "difficulty": "moderate", @@ -8192,7 +10847,9 @@ { "query_id": 910, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "What's the location coordinates of Silverstone Circuit?", "answer": "SELECT lat, lng FROM circuits WHERE name = 'Silverstone Circuit'", "difficulty": "simple", @@ -8201,7 +10858,9 @@ { "query_id": 911, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring?", "answer": "SELECT name FROM circuits WHERE name IN ('Silverstone Circuit', 'Hockenheimring', 'Hungaroring') ORDER BY lat DESC LIMIT 1", "difficulty": "simple", @@ -8210,7 +10869,9 @@ { "query_id": 912, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "What's the reference name of Marina Bay Street Circuit?", "answer": "SELECT circuitRef FROM circuits WHERE name = 'Marina Bay Street Circuit'", "difficulty": "simple", @@ -8219,7 +10880,9 @@ { "query_id": 913, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "In which country can I find the circuit with the highest altitude?", "answer": "SELECT country FROM circuits ORDER BY alt DESC LIMIT 1", "difficulty": "simple", @@ -8228,7 +10891,9 @@ { "query_id": 914, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "How many drivers don't have a code?", "answer": "SELECT COUNT(driverId) - COUNT(CASE WHEN code IS NOT NULL THEN code END) FROM drivers", "difficulty": "simple", @@ -8237,7 +10902,9 @@ { "query_id": 915, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Which country is the oldest driver from?", "answer": "SELECT nationality FROM drivers WHERE dob IS NOT NULL ORDER BY dob ASC LIMIT 1", "difficulty": "simple", @@ -8246,7 +10913,9 @@ { "query_id": 916, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Please list the surnames of all the Italian drivers.", "answer": "SELECT surname FROM drivers WHERE nationality = 'Italian'", "difficulty": "simple", @@ -8255,7 +10924,9 @@ { "query_id": 917, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Which website should I go to if I want to know more about Anthony Davidson?", "answer": "SELECT url FROM drivers WHERE forename = 'Anthony' AND surname = 'Davidson'", "difficulty": "simple", @@ -8264,7 +10935,9 @@ { "query_id": 918, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "What's Lewis Hamilton's reference name?", "answer": "SELECT driverRef FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton'", "difficulty": "simple", @@ -8273,7 +10946,10 @@ { "query_id": 919, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Which circuit did the 2009 Spanish Grand Prix use?", "answer": "SELECT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'", "difficulty": "simple", @@ -8282,7 +10958,10 @@ { "query_id": 920, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please list all the years that Silverstone Circuit was used in a Formula_1 race.", "answer": "SELECT DISTINCT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit'", "difficulty": "simple", @@ -8291,7 +10970,10 @@ { "query_id": 921, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please give more information about the Formula_1 races that used the Silverstone Circuit.", "answer": "SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit'", "difficulty": "simple", @@ -8300,7 +10982,10 @@ { "query_id": 922, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit?", "answer": "SELECT T2.date, T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2010 AND T2.name = 'Abu Dhabi Grand Prix'", "difficulty": "simple", @@ -8309,7 +10994,10 @@ { "query_id": 923, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "How many Formula_1 races took place on the circuits in Italy?", "answer": "SELECT COUNT(T2.circuitId) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Italy'", "difficulty": "simple", @@ -8318,7 +11006,10 @@ { "query_id": 924, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit.", "answer": "SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'", "difficulty": "simple", @@ -8327,7 +11018,10 @@ { "query_id": 925, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Please give the link of the website that shows more information about the circuits the Spanish Grand Prix used in 2009.", "answer": "SELECT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'", "difficulty": "simple", @@ -8336,7 +11030,10 @@ { "query_id": 926, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "What's the fastest lap time ever in a race for Lewis Hamilton?", "answer": "SELECT T2.fastestLapTime FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1", "difficulty": "simple", @@ -8345,7 +11042,10 @@ { "query_id": 927, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "Which driver created the fastest lap speed in a Formula_1 race? Please give both his forename and surname.", "answer": "SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1", "difficulty": "simple", @@ -8354,7 +11054,11 @@ { "query_id": 928, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Which driver ranked the first in the Australian Grand Prix in 2008? Please give his reference name.", "answer": "SELECT T3.forename, T3.surname, T3.driverRef FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.name = 'Australian Grand Prix' AND T2.rank = 1 AND T1.year = 2008", "difficulty": "moderate", @@ -8363,7 +11067,11 @@ { "query_id": 929, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Please list the Formula_1 races that Lewis Hamilton participated.", "answer": "SELECT T1.name FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton'", "difficulty": "simple", @@ -8372,7 +11080,11 @@ { "query_id": 930, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "In which Formula_1 race did Lewis Hamilton rank the highest?", "answer": "SELECT name FROM races WHERE raceId IN ( SELECT raceId FROM results WHERE rank = 1 AND driverId = ( SELECT driverId FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton' ) )", "difficulty": "simple", @@ -8381,7 +11093,10 @@ { "query_id": 931, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What was the fastest lap speed among all drivers in the 2009 Spanish Grand Prix?", "answer": "SELECT T2.fastestLapSpeed FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Spanish Grand Prix' AND T1.year = 2009 AND T2.fastestLapSpeed IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1", "difficulty": "moderate", @@ -8390,7 +11105,11 @@ { "query_id": 932, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "In which years did Lewis Hamilton participate in a Formula_1 race?", "answer": "SELECT DISTINCT T1.year FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton'", "difficulty": "simple", @@ -8399,7 +11118,11 @@ { "query_id": 933, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "What was Lewis Hamilton's final rank in the 2008 Australian Grand Prix?", "answer": "SELECT T2.positionOrder FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' AND T1.name = 'Australian Grand Prix' AND T1.year = 2008", "difficulty": "moderate", @@ -8408,7 +11131,11 @@ { "query_id": 934, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Which driver was in the no. 4 grid formation when starting the race in 2008's Australian Grand Prix? Please give his forename and surname.", "answer": "SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T2.grid = 4 AND T1.name = 'Australian Grand Prix' AND T1.year = 2008", "difficulty": "moderate", @@ -8417,7 +11144,10 @@ { "query_id": 935, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "How many drivers managed to finish the race in the 2008 Australian Grand Prix?", "answer": "SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.time IS NOT NULL", "difficulty": "simple", @@ -8426,7 +11156,11 @@ { "query_id": 936, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix?", "answer": "SELECT T1.fastestLap FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008 AND T3.forename = 'Lewis' AND T3.surname = 'Hamilton'", "difficulty": "simple", @@ -8435,7 +11169,10 @@ { "query_id": 937, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What's the finish time for the driver who ranked second in 2008's Australian Grand Prix?", "answer": "SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank = 2 AND T2.name = 'Australian Grand Prix' AND T2.year = 2008", "difficulty": "simple", @@ -8444,7 +11181,11 @@ { "query_id": 938, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Who was the champion of 2008's Australian Grand Prix and where can I know more about him?", "answer": "SELECT T1.forename, T1.surname, T1.url FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T2.time LIKE '_:%:__.___' AND T3.year = 2008", "difficulty": "moderate", @@ -8453,7 +11194,11 @@ { "query_id": 939, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "How many drivers from the USA participated in the 2008 Australian Grand Prix?", "answer": "SELECT COUNT(*) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian GrAND Prix' AND T1.nationality = 'American' AND T3.year = 2008", "difficulty": "moderate", @@ -8462,7 +11207,10 @@ { "query_id": 940, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "Among the drivers that finished the race in the 2008 Australian Grand Prix, how many of them have participated in Formula_1 races?", "answer": "SELECT COUNT(*) FROM ( SELECT T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008 AND T1.time IS NOT NULL GROUP BY T1.driverId HAVING COUNT(T2.raceId) > 0 )", "difficulty": "moderate", @@ -8471,7 +11219,10 @@ { "query_id": 941, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "How many points did Lewis Hamilton get in total in all the Formula_1 races he participated?", "answer": "SELECT SUM(T2.points) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'", "difficulty": "simple", @@ -8480,7 +11231,10 @@ { "query_id": 942, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?", "answer": "SELECT AVG(CAST(SUBSTR(T2.fastestLapTime, 1, INSTR(T2.fastestLapTime, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTR(T2.fastestLapTime, INSTR(T2.fastestLapTime, ':') + 1) AS REAL)) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.surname = 'Hamilton' AND T1.forename = 'Lewis'", "difficulty": "moderate", @@ -8489,7 +11243,10 @@ { "query_id": 943, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix?", "answer": "SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.resultId) FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian GrAND Prix' AND T2.year = 2008", "difficulty": "moderate", @@ -8498,7 +11255,10 @@ { "query_id": 944, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?", "answer": "WITH time_in_seconds AS ( SELECT T1.positionOrder, CASE WHEN T1.positionOrder = 1 THEN (CAST(SUBSTR(T1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTR(T1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTR(T1.time, 6) AS REAL) ELSE CAST(SUBSTR(T1.time, 2) AS REAL) END AS time_seconds FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T1.time IS NOT NULL AND T2.year = 2008 ), champion_time AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = 1), last_driver_incremental AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = (SELECT MAX(positionOrder) FROM time_in_seconds) ) SELECT (CAST((SELECT time_seconds FROM last_driver_incremental) AS REAL) * 100) / (SELECT time_seconds + (SELECT time_seconds FROM last_driver_incremental) FROM champion_time)", "difficulty": "challenging", @@ -8507,7 +11267,9 @@ { "query_id": 945, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "How many circuits are there in Melbourne, Australia?", "answer": "SELECT COUNT(circuitId) FROM circuits WHERE location = 'Melbourne' AND country = 'Australia'", "difficulty": "simple", @@ -8516,7 +11278,9 @@ { "query_id": 946, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "Please list the location coordinates of the US circuits.", "answer": "SELECT lat, lng FROM circuits WHERE country = 'USA'", "difficulty": "simple", @@ -8525,7 +11289,9 @@ { "query_id": 947, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "How many British drivers were born after 1980?", "answer": "SELECT COUNT(driverId) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) > '1980'", "difficulty": "simple", @@ -8534,7 +11300,10 @@ { "query_id": 948, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "What are the average points of British constructors?", "answer": "SELECT AVG(T1.points) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T2.nationality = 'British'", "difficulty": "simple", @@ -8543,7 +11312,10 @@ { "query_id": 949, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "Which constructor has the highest point?", "answer": "SELECT T2.name FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId ORDER BY T1.points DESC LIMIT 1", "difficulty": "simple", @@ -8552,7 +11324,10 @@ { "query_id": 950, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "Please list the constructor names with 0 points at race 291.", "answer": "SELECT T2.name FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T1.raceId = 291", "difficulty": "simple", @@ -8561,7 +11336,10 @@ { "query_id": 951, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "How many Japanese constructors have 0 points in 2 races?", "answer": "SELECT COUNT(T1.raceId) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T2.nationality = 'Japanese' GROUP BY T1.constructorId HAVING COUNT(raceId) = 2", "difficulty": "simple", @@ -8570,7 +11348,10 @@ { "query_id": 952, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "constructors" + ], "query": "Which constructors have been ranked 1?", "answer": "SELECT DISTINCT T2.name FROM results AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.rank = 1", "difficulty": "simple", @@ -8579,7 +11360,10 @@ { "query_id": 953, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "constructors" + ], "query": "How many French constructors have a lap number of over 50?", "answer": "SELECT COUNT(DISTINCT T2.constructorId) FROM results AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.laps > 50 AND T2.nationality = 'French'", "difficulty": "simple", @@ -8588,7 +11372,11 @@ { "query_id": 954, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.", "answer": "SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.raceId) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T3.nationality = 'Japanese' AND T2.year BETWEEN 2007 AND 2009", "difficulty": "challenging", @@ -8597,7 +11385,10 @@ { "query_id": 955, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What is the average time in seconds of champion for each year?", "answer": "WITH time_in_seconds AS ( SELECT T2.year, T2.raceId, T1.positionOrder, CASE WHEN T1.positionOrder = 1 THEN (CAST(SUBSTR(T1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTR(T1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTR(T1.time, 6) AS REAL) ELSE CAST(SUBSTR(T1.time, 2) AS REAL) END AS time_seconds FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T1.time IS NOT NULL ), champion_time AS ( SELECT year, raceId, time_seconds FROM time_in_seconds WHERE positionOrder = 1 ) SELECT year, AVG(time_seconds) FROM champion_time GROUP BY year HAVING AVG(time_seconds) IS NOT NULL", "difficulty": "challenging", @@ -8606,7 +11397,10 @@ { "query_id": 956, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames.", "answer": "SELECT T2.forename, T2.surname FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE STRFTIME('%Y', T2.dob) > '1975' AND T1.rank = 2", "difficulty": "simple", @@ -8615,7 +11409,10 @@ { "query_id": 957, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "How many Italian drivers haven't finished the race?", "answer": "SELECT COUNT(T1.driverId) FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'Italian' AND T1.time IS NULL", "difficulty": "simple", @@ -8624,7 +11421,10 @@ { "query_id": 958, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "Which driver has the fastest lap time? Please give their forenames and surnames.", "answer": "SELECT T2.forename, T2.surname, T1.fastestLapTime FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T1.fastestLapTime IS NOT NULL ORDER BY T1.fastestLapTime ASC LIMIT 1", "difficulty": "moderate", @@ -8633,7 +11433,10 @@ { "query_id": 959, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What is the fastest lap number of the champion in 2009?", "answer": "SELECT T1.fastestLap FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2009 AND T1.time LIKE '_:%:__.___'", "difficulty": "simple", @@ -8642,7 +11445,10 @@ { "query_id": 960, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What is the average of fastest lap speed in the 2009 Spanish Grand Prix race?", "answer": "SELECT AVG(T1.fastestLapSpeed) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'", "difficulty": "moderate", @@ -8651,7 +11457,10 @@ { "query_id": 961, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "Which race has the shortest actual finishing time? Please give the name and year.", "answer": "SELECT T1.name, T1.year FROM races AS T1 INNER JOIN results AS T2 on T1.raceId = T2.raceId WHERE T2.milliseconds IS NOT NULL ORDER BY T2.milliseconds LIMIT 1", "difficulty": "simple", @@ -8660,7 +11469,11 @@ { "query_id": 962, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers", + "races" + ], "query": "From 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50?", "answer": "SELECT CAST(SUM(IIF(STRFTIME('%Y', T3.dob) < '1985' AND T1.laps > 50, 1, 0)) AS REAL) * 100 / COUNT(*) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T2.year BETWEEN 2000 AND 2005", "difficulty": "challenging", @@ -8669,7 +11482,10 @@ { "query_id": 963, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes", + "drivers" + ], "query": "How many French drivers who obtain the laptime less than 02:00.00?", "answer": "SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN lapTimes AS T2 on T1.driverId = T2.driverId WHERE T1.nationality = 'French' AND (CAST(SUBSTR(T2.time, 1, 2) AS INTEGER) * 60 + CAST(SUBSTR(T2.time, 4, 2) AS INTEGER) + CAST(SUBSTR(T2.time, 7, 2) AS REAL) / 1000) < 120", "difficulty": "moderate", @@ -8678,7 +11494,9 @@ { "query_id": 964, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "List out the code for drivers who have nationality in America.", "answer": "SELECT code FROM drivers WHERE Nationality = 'American'", "difficulty": "simple", @@ -8687,7 +11505,9 @@ { "query_id": 965, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "List out the Id number of races which were hold in 2009.", "answer": "SELECT raceId FROM races WHERE year = 2009", "difficulty": "simple", @@ -8696,7 +11516,9 @@ { "query_id": 966, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings" + ], "query": "How many driver participated in race ID number 18?", "answer": "SELECT COUNT(driverId) FROM driverStandings WHERE raceId = 18", "difficulty": "simple", @@ -8705,7 +11527,9 @@ { "query_id": 967, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them?", "answer": "SELECT COUNT(*) FROM ( SELECT T1.nationality FROM drivers AS T1 ORDER BY JULIANDAY(T1.dob) DESC LIMIT 3) AS T3 WHERE T3.nationality = 'Dutch'", "difficulty": "simple", @@ -8714,7 +11538,9 @@ { "query_id": 968, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "What is reference name of Robert Kubica?", "answer": "SELECT driverRef FROM drivers WHERE forename = 'Robert' AND surname = 'Kubica'", "difficulty": "simple", @@ -8723,7 +11549,9 @@ { "query_id": 969, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "How many Australian drivers who were born in 1980?", "answer": "SELECT COUNT(driverId) FROM drivers WHERE nationality = 'Australian' AND STRFTIME('%Y', dob) = '1980'", "difficulty": "simple", @@ -8732,7 +11560,10 @@ { "query_id": 970, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers" + ], "query": "List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time.", "answer": "SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'German' AND STRFTIME('%Y', T2.dob) BETWEEN '1980' AND '1990' ORDER BY T1.time LIMIT 3", "difficulty": "moderate", @@ -8741,7 +11572,9 @@ { "query_id": 971, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Please state the reference name of the oldest German driver.", "answer": "SELECT driverRef FROM drivers WHERE nationality = 'German' ORDER BY JULIANDAY(dob) ASC LIMIT 1", "difficulty": "simple", @@ -8750,7 +11583,10 @@ { "query_id": 972, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "drivers" + ], "query": "Which drivers who were born in 1971 and has the fastest lap time on the race? Give id and code of these drivers.", "answer": "SELECT T2.driverId, T2.code FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE STRFTIME('%Y', T2.dob) = '1971' AND T1.fastestLapTime IS NOT NULL", "difficulty": "moderate", @@ -8759,7 +11595,10 @@ { "query_id": 973, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers" + ], "query": "List out top 10 Spanish drivers who were born before 1982 and have the latest lap time.", "answer": "SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'Spanish' AND STRFTIME('%Y', T2.dob) < '1982' ORDER BY T1.time DESC LIMIT 10", "difficulty": "moderate", @@ -8768,7 +11607,10 @@ { "query_id": 974, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "State the racing year which has the fastest lap time?", "answer": "SELECT T2.year FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.fastestLapTime IS NOT NULL", "difficulty": "simple", @@ -8777,7 +11619,10 @@ { "query_id": 975, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes", + "races" + ], "query": "Which year has the lowest speed of lap time?", "answer": "SELECT T2.year FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId ORDER BY T1.time DESC LIMIT 1", "difficulty": "simple", @@ -8786,7 +11631,9 @@ { "query_id": 976, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes" + ], "query": "List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race.", "answer": "SELECT driverId FROM lapTimes WHERE lap = 1 ORDER BY time LIMIT 5", "difficulty": "simple", @@ -8795,7 +11642,9 @@ { "query_id": 977, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results" + ], "query": "From race no. 50 to 100, how many finishers have been disqualified?", "answer": "SELECT SUM(IIF(time IS NOT NULL, 1, 0)) FROM results WHERE statusId = 2 AND raceID < 100 AND raceId > 50", "difficulty": "simple", @@ -8804,7 +11653,9 @@ { "query_id": 978, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "How many times the circuits were held in Austria? Please give their location and coordinates.", "answer": "SELECT DISTINCT location, lat, lng FROM circuits WHERE country = 'Austria'", "difficulty": "simple", @@ -8813,7 +11664,9 @@ { "query_id": 979, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results" + ], "query": "What race number has the most finishers?", "answer": "SELECT raceId FROM results GROUP BY raceId ORDER BY COUNT(time IS NOT NULL) DESC LIMIT 1", "difficulty": "simple", @@ -8822,7 +11675,10 @@ { "query_id": 980, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers" + ], "query": "List the reference name of the drivers who passed the second qualifying lap during race no. 23. Indicate their nationality and birthday.", "answer": "SELECT T2.driverRef, T2.nationality, T2.dob FROM qualifying AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T1.raceId = 23 AND T1.q2 IS NOT NULL", "difficulty": "moderate", @@ -8831,7 +11687,11 @@ { "query_id": 981, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "drivers", + "races" + ], "query": "On what year did the youngest driver had his first qualifying race? State the name, date and time of the race.", "answer": "SELECT T3.year, T3.name, T3.date, T3.time FROM qualifying AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T1.raceId = T3.raceId WHERE T1.driverId = ( SELECT driverId FROM drivers ORDER BY dob DESC LIMIT 1 ) ORDER BY T3.date ASC LIMIT 1", "difficulty": "moderate", @@ -8840,7 +11700,11 @@ { "query_id": 982, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "status", + "drivers" + ], "query": "How many American drivers have been disqualified from the race.", "answer": "SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN results AS T2 on T1.driverId = T2.driverId INNER JOIN status AS T3 on T2.statusId = T3.statusId WHERE T3.status = 2 AND T1.nationality = 'American'", "difficulty": "simple", @@ -8849,7 +11713,10 @@ { "query_id": 983, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "Which of the Italian constructor got the highest point to date? Give its introduction website?", "answer": "SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId WHERE T1.nationality = 'Italian' ORDER BY T2.points DESC LIMIT 1", "difficulty": "simple", @@ -8858,7 +11725,10 @@ { "query_id": 984, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructors", + "constructorStandings" + ], "query": "What is the website of the constructor who tallied the most total wins.", "answer": "SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId ORDER BY T2.wins DESC LIMIT 1", "difficulty": "simple", @@ -8867,7 +11737,10 @@ { "query_id": 985, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes", + "races" + ], "query": "Among the drivers who participated in the French Grand Prix, who has the slowest time in the 3rd lap.", "answer": "SELECT T1.driverId FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'French Grand Prix' AND T1.lap = 3 ORDER BY T1.time DESC LIMIT 1", "difficulty": "simple", @@ -8876,7 +11749,10 @@ { "query_id": 986, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes", + "races" + ], "query": "In which race did the fastest 1st lap time was recorded? Please indicate the time in milliseconds.", "answer": "SELECT T1.milliseconds FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.lap = 1 ORDER BY T1.time LIMIT 1", "difficulty": "simple", @@ -8885,7 +11761,10 @@ { "query_id": 987, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "What is the average fastest lap time of the top 10 drivers in the 2006 United States Grand Prix?", "answer": "SELECT AVG(T1.fastestLapTime) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank < 11 AND T2.year = 2006 AND T2.name = 'United States GrAND Prix'", "difficulty": "simple", @@ -8894,7 +11773,10 @@ { "query_id": 988, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers" + ], "query": "List down top 5 German drivers who has the shortest average pit stop duration and were born between 1980-1985.", "answer": "SELECT T2.forename, T2.surname FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'German' AND STRFTIME('%Y', T2.dob) BETWEEN '1980' AND '1985' GROUP BY T2.forename, T2.surname ORDER BY AVG(T1.duration) LIMIT 5", "difficulty": "challenging", @@ -8903,7 +11785,10 @@ { "query_id": 989, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time.", "answer": "SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Canadian Grand Prix' AND T2.year = 2008 AND T1.time LIKE '_:%:__.___'", "difficulty": "moderate", @@ -8912,7 +11797,11 @@ { "query_id": 990, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "constructors", + "races" + ], "query": "What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website.", "answer": "SELECT T3.constructorRef, T3.url FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN constructors AS T3 on T1.constructorId = T3.constructorId WHERE T2.name = 'Singapore Grand Prix' AND T2.year = 2009 AND T1.time LIKE '_:%:__.___'", "difficulty": "challenging", @@ -8921,7 +11810,9 @@ { "query_id": 991, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "What is the full name and date of birth of Austrian drivers born between 1981 and 1991?", "answer": "SELECT forename, surname, dob FROM drivers WHERE nationality = 'Austrian' AND STRFTIME('%Y', dob) BETWEEN '1981' AND '1991'", "difficulty": "simple", @@ -8930,7 +11821,9 @@ { "query_id": 992, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Find the full name, Wiki Pedia page link, and date of birth of German drivers born between 1971 and 1985. List it in descending order of date of birth.", "answer": "SELECT forename, surname, url, dob FROM drivers WHERE nationality = 'German' AND STRFTIME('%Y', dob) BETWEEN '1971' AND '1985' ORDER BY dob DESC", "difficulty": "moderate", @@ -8939,7 +11832,9 @@ { "query_id": 993, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits" + ], "query": "In which location does the Hungaroring circuit located? Also, find the country and coordinates of this circuit?", "answer": "SELECT country, lat, lng FROM circuits WHERE name = 'Hungaroring'", "difficulty": "simple", @@ -8948,7 +11843,11 @@ { "query_id": 994, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "constructorResults", + "constructors", + "races" + ], "query": "Which constructor scored most points from Monaco Grand Prix between 1980 and 2010? List the score, name and nationality of this team.", "answer": "SELECT SUM(T1.points), T2.name, T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T1.constructorId = T2.constructorId INNER JOIN races AS T3 ON T3.raceid = T1.raceid WHERE T3.name = 'Monaco Grand Prix' AND T3.year BETWEEN 1980 AND 2010 GROUP BY T2.name ORDER BY SUM(T1.points) DESC LIMIT 1", "difficulty": "challenging", @@ -8957,7 +11856,11 @@ { "query_id": 995, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "What is the average score of Lewis Hamilton among all the Turkish Grand Prix?", "answer": "SELECT AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T3.name = 'Turkish Grand Prix'", "difficulty": "moderate", @@ -8966,7 +11869,9 @@ { "query_id": 996, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races" + ], "query": "What is the annual average number of races held during the first 10 years of the 21st century?", "answer": "SELECT CAST(SUM(CASE WHEN year BETWEEN 2000 AND 2010 THEN 1 ELSE 0 END) AS REAL) / 10 FROM races WHERE date BETWEEN '2000-01-01' AND '2010-12-31'", "difficulty": "simple", @@ -8975,7 +11880,9 @@ { "query_id": 997, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers" + ], "query": "Which citizenship do the vast majority of the drivers hold?", "answer": "SELECT nationality FROM drivers GROUP BY nationality ORDER BY COUNT(driverId) DESC LIMIT 1", "difficulty": "simple", @@ -8984,7 +11891,9 @@ { "query_id": 998, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings" + ], "query": "In terms of number of points acquired, how many victories did the driver who ranked 91st acquired?", "answer": "SELECT SUM(CASE WHEN points = 91 THEN wins ELSE 0 END) FROM driverStandings", "difficulty": "simple", @@ -8993,7 +11902,10 @@ { "query_id": 999, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "races" + ], "query": "In terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer?", "answer": "SELECT T1.name FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1", "difficulty": "simple", @@ -9002,7 +11914,10 @@ { "query_id": 1000, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "races", + "circuits" + ], "query": "Which racetrack hosted the most recent race? Indicate the full location.", "answer": "SELECT T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId ORDER BY T2.date DESC LIMIT 1", "difficulty": "simple", @@ -9011,7 +11926,12 @@ { "query_id": 1001, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "qualifying", + "races", + "drivers", + "circuits" + ], "query": "What is full name of the racer who ranked 1st in the 3rd qualifying race held in the Marina Bay Street Circuit in 2008?", "answer": "SELECT T2.forename, T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 ON T1.raceid = T3.raceid WHERE q3 IS NOT NULL AND T3.year = 2008 AND T3.circuitId IN ( SELECT circuitId FROM circuits WHERE name = 'Marina Bay Street Circuit' ) ORDER BY CAST(SUBSTR(q3, 1, INSTR(q3, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTR(q3, INSTR(q3, ':') + 1, INSTR(q3, '.') - INSTR(q3, ':') - 1) AS REAL) + CAST(SUBSTR(q3, INSTR(q3, '.') + 1) AS REAL) / 1000 ASC LIMIT 1", "difficulty": "challenging", @@ -9020,7 +11940,11 @@ { "query_id": 1002, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers", + "races" + ], "query": "As of the present, what is the full name of the youngest racer? Indicate her nationality and the name of the race to which he/she first joined.", "answer": "SELECT T1.forename, T1.surname, T1.nationality, T3.name FROM drivers AS T1 INNER JOIN driverStandings AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T2.raceId = T3.raceId ORDER BY JULIANDAY(T1.dob) DESC LIMIT 1", "difficulty": "moderate", @@ -9029,7 +11953,11 @@ { "query_id": 1003, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "status", + "races" + ], "query": "How many accidents did the driver who had the highest number accidents in the Canadian Grand Prix have?", "answer": "SELECT COUNT(T1.driverId) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN status AS T3 on T1.statusId = T3.statusId WHERE T3.statusId = 3 AND T2.name = 'Canadian Grand Prix' GROUP BY T1.driverId ORDER BY COUNT(T1.driverId) DESC LIMIT 1", "difficulty": "moderate", @@ -9038,7 +11966,10 @@ { "query_id": 1004, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "driverStandings", + "drivers" + ], "query": "How many wins was achieved by the oldest racer? Indicate his/her full name.", "answer": "SELECT SUM(T1.wins) FROM driverStandings AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId GROUP BY T2.forename, T2.surname ORDER BY T2.dob ASC LIMIT 1", "difficulty": "simple", @@ -9047,7 +11978,9 @@ { "query_id": 1005, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops" + ], "query": "What was the longest time a driver had ever spent at a pit stop?", "answer": "SELECT duration FROM pitStops ORDER BY duration DESC LIMIT 1", "difficulty": "simple", @@ -9056,7 +11989,9 @@ { "query_id": 1006, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "lapTimes" + ], "query": "Among all the lap records set on various circuits, what is the time for the fastest one?", "answer": "SELECT time FROM lapTimes ORDER BY (CASE WHEN INSTR(time, ':') <> INSTR(SUBSTR(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':') THEN CAST(SUBSTR(time, 1, INSTR(time, ':') - 1) AS REAL) * 3600 ELSE 0 END) + (CAST(SUBSTR(time, INSTR(time, ':') - 2 * (INSTR(time, ':') = INSTR(SUBSTR(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':')), INSTR(time, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(time, INSTR(time, ':') + 1, INSTR(time, '.') - INSTR(time, ':') - 1) AS REAL)) + (CAST(SUBSTR(time, INSTR(time, '.') + 1) AS REAL) / 1000) ASC LIMIT 1", "difficulty": "challenging", @@ -9065,7 +12000,10 @@ { "query_id": 1007, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers" + ], "query": "What was the longest time that Lewis Hamilton had spent at a pit stop?", "answer": "SELECT T1.duration FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton' ORDER BY T1.duration DESC LIMIT 1", "difficulty": "simple", @@ -9074,7 +12012,11 @@ { "query_id": 1008, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers", + "races" + ], "query": "During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?", "answer": "SELECT T1.lap FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T1.raceId = T3.raceId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton' AND T3.year = 2011 AND T3.name = 'Australian Grand Prix'", "difficulty": "simple", @@ -9083,7 +12025,10 @@ { "query_id": 1009, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "races" + ], "query": "Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix.", "answer": "SELECT T1.duration FROM pitStops AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2011 AND T2.name = 'Australian Grand Prix'", "difficulty": "simple", @@ -9092,7 +12037,10 @@ { "query_id": 1010, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes" + ], "query": "What is the lap record set by Lewis Hamilton in a Formula_1 race?", "answer": "SELECT T1.time FROM lapTimes AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton'", "difficulty": "simple", @@ -9101,7 +12049,10 @@ { "query_id": 1011, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes" + ], "query": "Which driver created the shortest lap time ever record in a Formula_1 race? Please give his full name.", "answer": "WITH lap_times_in_seconds AS ( SELECT driverId, (CASE WHEN INSTR(time, ':') <> INSTR(SUBSTR(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':') THEN CAST(SUBSTR(time, 1, INSTR(time, ':') - 1) AS REAL) * 3600 ELSE 0 END) + (CAST(SUBSTR(time, INSTR(time, ':') - 2 * (INSTR(time, ':') = INSTR(SUBSTR(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':')), INSTR(time, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(time, INSTR(time, ':') + 1, INSTR(time, '.') - INSTR(time, ':') - 1) AS REAL)) + (CAST(SUBSTR(time, INSTR(time, '.') + 1) AS REAL) / 1000) as time_in_seconds FROM lapTimes) SELECT T2.forename, T2.surname FROM ( SELECT driverId, MIN(time_in_seconds) as min_time_in_seconds FROM lap_times_in_seconds GROUP BY driverId) AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId ORDER BY T1.min_time_in_seconds ASC LIMIT 1", "difficulty": "challenging", @@ -9110,7 +12061,10 @@ { "query_id": 1012, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "drivers", + "lapTimes" + ], "query": "What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race?", "answer": "SELECT T1.position FROM lapTimes AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton' ORDER BY T1.time ASC LIMIT 1", "difficulty": "simple", @@ -9119,7 +12073,11 @@ { "query_id": 1013, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "circuits", + "races" + ], "query": "What is the lap record for the Austrian Grand Prix Circuit?", "answer": "WITH fastest_lap_times AS ( SELECT T1.raceId, T1.fastestLapTime FROM results AS T1 WHERE T1.FastestLapTime IS NOT NULL) SELECT MIN(fastest_lap_times.fastestLapTime) as lap_record FROM fastest_lap_times INNER JOIN races AS T2 on fastest_lap_times.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T2.name = 'Austrian Grand Prix'", "difficulty": "simple", @@ -9128,7 +12086,11 @@ { "query_id": 1014, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "circuits", + "races" + ], "query": "Please list the lap records for the circuits in Italy.", "answer": "WITH fastest_lap_times AS (SELECT T1.raceId, T1.FastestLapTime, (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) as time_in_seconds FROM results AS T1 WHERE T1.FastestLapTime IS NOT NULL ) SELECT T1.FastestLapTime as lap_record FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId INNER JOIN (SELECT MIN(fastest_lap_times.time_in_seconds) as min_time_in_seconds FROM fastest_lap_times INNER JOIN races AS T2 on fastest_lap_times.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T3.country = 'Italy' ) AS T4 ON (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) = T4.min_time_in_seconds LIMIT 1", "difficulty": "challenging", @@ -9137,7 +12099,11 @@ { "query_id": 1015, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "circuits", + "races" + ], "query": "In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set?", "answer": "WITH fastest_lap_times AS ( SELECT T1.raceId, T1.FastestLapTime, (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) as time_in_seconds FROM results AS T1 WHERE T1.FastestLapTime IS NOT NULL ) SELECT T2.name FROM races AS T2 INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId INNER JOIN results AS T1 on T2.raceId = T1.raceId INNER JOIN ( SELECT MIN(fastest_lap_times.time_in_seconds) as min_time_in_seconds FROM fastest_lap_times INNER JOIN races AS T2 on fastest_lap_times.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T2.name = 'Austrian Grand Prix') AS T4 ON (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) = T4.min_time_in_seconds WHERE T2.name = 'Austrian Grand Prix'", "difficulty": "moderate", @@ -9146,7 +12112,12 @@ { "query_id": 1016, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "results", + "pitStops", + "circuits", + "races" + ], "query": "In the race a driver set the lap record for the Austrian Grand Prix Circuit, how long did he spent at the pit stop at that same race?", "answer": "WITH fastest_lap_times AS ( SELECT T1.raceId, T1.driverId, T1.FastestLapTime, (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) as time_in_seconds FROM results AS T1 WHERE T1.FastestLapTime IS NOT NULL), lap_record_race AS ( SELECT T1.raceId, T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId INNER JOIN ( SELECT MIN(fastest_lap_times.time_in_seconds) as min_time_in_seconds FROM fastest_lap_times INNER JOIN races AS T2 on fastest_lap_times.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T2.name = 'Austrian Grand Prix') AS T4 ON (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) = T4.min_time_in_seconds WHERE T2.name = 'Austrian Grand Prix') SELECT T4.duration FROM lap_record_race INNER JOIN pitStops AS T4 on lap_record_race.raceId = T4.raceId AND lap_record_race.driverId = T4.driverId", "difficulty": "challenging", @@ -9155,7 +12126,11 @@ { "query_id": 1017, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits", + "lapTimes", + "races" + ], "query": "Please list the location coordinates of the circuits whose lap record is 1:29.488.", "answer": "SELECT T3.lat, T3.lng FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T1.time = '1:29.488'", "difficulty": "moderate", @@ -9164,7 +12139,10 @@ { "query_id": 1018, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "pitStops", + "drivers" + ], "query": "What was the average time in milliseconds Lewis Hamilton spent at a pit stop during Formula_1 races?", "answer": "SELECT AVG(milliseconds) FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton'", "difficulty": "simple", @@ -9173,7 +12151,11 @@ { "query_id": 1019, "database_id": "formula_1", - "table_id": "N/A", + "table_id": [ + "circuits", + "lapTimes", + "races" + ], "query": "What is the average lap time in milliseconds of all the lap records set on the various circuits in Italy?", "answer": "SELECT CAST(SUM(T1.milliseconds) AS REAL) / COUNT(T1.lap) FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T3.country = 'Italy'", "difficulty": "moderate", @@ -9182,7 +12164,9 @@ { "query_id": 1020, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "Which player has the highest overall rating? Indicate the player's api id.", "answer": "SELECT player_api_id FROM Player_Attributes ORDER BY overall_rating DESC LIMIT 1", "difficulty": "simple", @@ -9191,7 +12175,9 @@ { "query_id": 1021, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "What is the height of the tallest player? Indicate his name.", "answer": "SELECT player_name FROM Player ORDER BY height DESC LIMIT 1", "difficulty": "simple", @@ -9200,7 +12186,9 @@ { "query_id": 1022, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "What is the preferred foot when attacking of the player with the lowest potential?", "answer": "SELECT preferred_foot FROM Player_Attributes WHERE potential IS NOT NULL ORDER BY potential ASC LIMIT 1", "difficulty": "simple", @@ -9209,7 +12197,9 @@ { "query_id": 1023, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "Among the players with an overall rating between 60 to 65, how many players whose going to be in all of your attack moves instead of defensing?", "answer": "SELECT COUNT(id) FROM Player_Attributes WHERE overall_rating BETWEEN 60 AND 65 AND defensive_work_rate = 'low'", "difficulty": "moderate", @@ -9218,7 +12208,9 @@ { "query_id": 1024, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "Who are the top 5 players who perform better in crossing actions? Indicate their player id.", "answer": "SELECT id FROM Player_Attributes ORDER BY crossing DESC LIMIT 5", "difficulty": "simple", @@ -9227,7 +12219,10 @@ { "query_id": 1025, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "Which league had the most goals in the 2016 season?", "answer": "SELECT t2.name FROM Match AS t1 INNER JOIN League AS t2 ON t1.league_id = t2.id WHERE t1.season = '2015/2016' GROUP BY t2.name ORDER BY SUM(t1.home_team_goal + t1.away_team_goal) DESC LIMIT 1", "difficulty": "moderate", @@ -9236,7 +12231,10 @@ { "query_id": 1026, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Match", + "Team" + ], "query": "Which home team had lost the fewest matches in the 2016 season?", "answer": "SELECT teamDetails.team_long_name FROM Match AS matchData INNER JOIN Team AS teamDetails ON matchData.home_team_api_id = teamDetails.team_api_id WHERE matchData.season = '2015/2016' AND matchData.home_team_goal - matchData.away_team_goal < 0 GROUP BY matchData.home_team_api_id ORDER BY COUNT(*) ASC LIMIT 1", "difficulty": "moderate", @@ -9245,7 +12243,10 @@ { "query_id": 1027, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Indicate the full names of the top 10 players with the highest number of penalties.", "answer": "SELECT t2.player_name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.id = t2.id ORDER BY t1.penalties DESC LIMIT 10", "difficulty": "simple", @@ -9254,7 +12255,11 @@ { "query_id": 1028, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match", + "Team" + ], "query": "In Scotland Premier League, which away team won the most during the 2010 season?", "answer": "SELECT teamInfo.team_long_name FROM League AS leagueData INNER JOIN Match AS matchData ON leagueData.id = matchData.league_id INNER JOIN Team AS teamInfo ON matchData.away_team_api_id = teamInfo.team_api_id WHERE leagueData.name = 'Scotland Premier League' AND matchData.season = '2009/2010' AND matchData.away_team_goal - matchData.home_team_goal > 0 GROUP BY matchData.away_team_api_id ORDER BY COUNT(*) DESC LIMIT 1", "difficulty": "challenging", @@ -9263,7 +12268,10 @@ { "query_id": 1029, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What are the speed in which attacks are put together of the top 4 teams with the highest build Up Play Speed?", "answer": "SELECT t1.buildUpPlaySpeed FROM Team_Attributes AS t1 INNER JOIN Team AS t2 ON t1.team_api_id = t2.team_api_id ORDER BY t1.buildUpPlayDribbling ASC LIMIT 4", "difficulty": "moderate", @@ -9272,7 +12280,10 @@ { "query_id": 1030, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "Which League had the most matches end as draw in the 2016 season?", "answer": "SELECT t2.name FROM Match AS t1 INNER JOIN League AS t2 ON t1.league_id = t2.id WHERE t1.season = '2015/2016' AND t1.home_team_goal = t1.away_team_goal GROUP BY t2.name ORDER BY COUNT(t1.id) DESC LIMIT 1", "difficulty": "moderate", @@ -9281,7 +12292,10 @@ { "query_id": 1031, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "At present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015.", "answer": "SELECT DATETIME() - T2.birthday age FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.`date`, 1, 10) BETWEEN '2013-01-01' AND '2015-12-31' AND t1.sprint_speed >= 97", "difficulty": "challenging", @@ -9290,7 +12304,10 @@ { "query_id": 1032, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "Give the name of the league with the highest matches of all time and how many matches were played in the said league.", "answer": "SELECT t2.name, COUNT(t1.id) FROM Match AS t1 INNER JOIN League AS t2 ON t1.league_id = t2.id GROUP BY t2.name ORDER BY COUNT(t1.id) DESC LIMIT 1", "difficulty": "moderate", @@ -9299,7 +12316,9 @@ { "query_id": 1033, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "What is the average height of players born between 1990 and 1995?", "answer": "SELECT SUM(height) / COUNT(id) FROM Player WHERE SUBSTR(birthday, 1, 4) BETWEEN '1990' AND '1995'", "difficulty": "simple", @@ -9308,7 +12327,9 @@ { "query_id": 1034, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "List the players' api id who had the highest above average overall ratings in 2010.", "answer": "SELECT player_api_id FROM Player_Attributes WHERE SUBSTR(`date`, 1, 4) = '2010' ORDER BY overall_rating DESC LIMIT 1", "difficulty": "simple", @@ -9317,7 +12338,9 @@ { "query_id": 1035, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes" + ], "query": "Give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed.", "answer": "SELECT DISTINCT team_fifa_api_id FROM Team_Attributes WHERE buildUpPlaySpeed > 50 AND buildUpPlaySpeed < 60", "difficulty": "simple", @@ -9326,7 +12349,10 @@ { "query_id": 1036, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "List the long name of teams with above-average build-up play passing in 2012.", "answer": "SELECT DISTINCT t4.team_long_name FROM Team_Attributes AS t3 INNER JOIN Team AS t4 ON t3.team_api_id = t4.team_api_id WHERE SUBSTR(t3.`date`, 1, 4) = '2012' AND t3.buildUpPlayPassing > ( SELECT CAST(SUM(t2.buildUpPlayPassing) AS REAL) / COUNT(t1.id) FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE SUBSTR(t2.`date`, 1, 4) = '2012' )", "difficulty": "challenging", @@ -9335,7 +12361,10 @@ { "query_id": 1037, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Calculate the percentage of players who prefer left foot, who were born between 1987 and 1992.", "answer": "SELECT CAST(COUNT(CASE WHEN t2.preferred_foot = 'left' THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) BETWEEN '1987' AND '1992'", "difficulty": "challenging", @@ -9344,7 +12373,10 @@ { "query_id": 1038, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "List the top 5 leagues in ascending order of the number of goals made in all seasons combined.", "answer": "SELECT t1.name, SUM(t2.home_team_goal) + SUM(t2.away_team_goal) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id GROUP BY t1.name ORDER BY SUM(t2.home_team_goal) + SUM(t2.away_team_goal) ASC LIMIT 5", "difficulty": "moderate", @@ -9353,7 +12385,10 @@ { "query_id": 1039, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Find the average number of long-shot done by Ahmed Samir Farag.", "answer": "SELECT CAST(SUM(t2.long_shots) AS REAL) / COUNT(t2.`date`) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Ahmed Samir Farag'", "difficulty": "simple", @@ -9362,7 +12397,10 @@ { "query_id": 1040, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy.", "answer": "SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 180 GROUP BY t1.id ORDER BY CAST(SUM(t2.heading_accuracy) AS REAL) / COUNT(t2.`player_fifa_api_id`) DESC LIMIT 10", "difficulty": "moderate", @@ -9371,7 +12409,10 @@ { "query_id": 1041, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "For the teams with normal build-up play dribbling class in 2014, List the names of the teams with less than average chance creation passing, in descending order of chance creation passing.", "answer": "SELECT t3.team_long_name FROM Team AS t3 INNER JOIN Team_Attributes AS t4 ON t3.team_api_id = t4.team_api_id WHERE t4.buildUpPlayDribblingClass = 'Normal' AND t4.chanceCreationPassing < ( SELECT CAST(SUM(t2.chanceCreationPassing) AS REAL) / COUNT(t1.id) FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlayDribblingClass = 'Normal' AND SUBSTR(t2.`date`, 1, 4) = '2014') ORDER BY t4.chanceCreationPassing DESC", "difficulty": "challenging", @@ -9380,7 +12421,10 @@ { "query_id": 1042, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "List the name of leagues in which the average goals by the home team is higher than the away team in the 2009/2010 season.", "answer": "SELECT t1.name FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2009/2010' GROUP BY t1.name HAVING (CAST(SUM(t2.home_team_goal) AS REAL) / COUNT(DISTINCT t2.id)) - (CAST(SUM(t2.away_team_goal) AS REAL) / COUNT(DISTINCT t2.id)) > 0", "difficulty": "challenging", @@ -9389,7 +12433,9 @@ { "query_id": 1043, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team" + ], "query": "What is the short name of the football team Queens Park Rangers?", "answer": "SELECT team_short_name FROM Team WHERE team_long_name = 'Queens Park Rangers'", "difficulty": "simple", @@ -9398,7 +12444,9 @@ { "query_id": 1044, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "List the football players with a birthyear of 1970 and a birthmonth of October.", "answer": "SELECT player_name FROM Player WHERE SUBSTR(birthday, 1, 7) = '1970-10'", "difficulty": "simple", @@ -9407,7 +12455,10 @@ { "query_id": 1045, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the attacking work rate of the football playerr Franco Zennaro?", "answer": "SELECT DISTINCT t2.attacking_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Franco Zennaro'", "difficulty": "simple", @@ -9416,7 +12467,10 @@ { "query_id": 1046, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_attributes", + "Team" + ], "query": "What is the ADO Den Haag team freedom of movement in the 1st two thirds of the pitch?", "answer": "SELECT DISTINCT t2.buildUpPlayPositioningClass FROM Team AS t1 INNER JOIN Team_attributes AS t2 ON t1.team_fifa_api_id = t2.team_fifa_api_id WHERE t1.team_long_name = 'ADO Den Haag'", "difficulty": "moderate", @@ -9425,7 +12479,10 @@ { "query_id": 1047, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the football player Francois Affolter header's finishing rate on 18/09/2014?", "answer": "SELECT t2.heading_accuracy FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Francois Affolter' AND SUBSTR(t2.`date`, 1, 10) = '2014-09-18'", "difficulty": "moderate", @@ -9434,7 +12491,10 @@ { "query_id": 1048, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the overall rating of the football player Gabriel Tamas in year 2011?", "answer": "SELECT t2.overall_rating FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Gabriel Tamas' AND SUBSTR(t2.`date`, 1, 4) = '2011'", "difficulty": "simple", @@ -9443,7 +12503,10 @@ { "query_id": 1049, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "How many matches in the 2015/2016 season were held in Scotland Premier League\n?", "answer": "SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' AND t1.name = 'Scotland Premier League'", "difficulty": "simple", @@ -9452,7 +12515,10 @@ { "query_id": 1050, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the preferred foot when attacking of the youngest football player?", "answer": "SELECT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t1.birthday DESC LIMIT 1", "difficulty": "simple", @@ -9461,7 +12527,10 @@ { "query_id": 1051, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "List all the football player with the highest potential score.", "answer": "SELECT DISTINCT(t1.player_name) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.potential = (SELECT MAX(potential) FROM Player_Attributes) ", "difficulty": "simple", @@ -9470,7 +12539,10 @@ { "query_id": 1052, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Among all the players whose weight is under 130, how many of them preferred foot in attacking is left?", "answer": "SELECT COUNT(DISTINCT t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.weight < 130 AND t2.preferred_foot = 'left'", "difficulty": "moderate", @@ -9479,7 +12551,10 @@ { "query_id": 1053, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_attributes", + "Team" + ], "query": "List the football teams that has a chance creation passing class of Risky. Inidcate its short name only.", "answer": "SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.chanceCreationPassingClass = 'Risky'", "difficulty": "moderate", @@ -9488,7 +12563,10 @@ { "query_id": 1054, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the defensive work rate of the football player David Wilson\n?", "answer": "SELECT DISTINCT t2.defensive_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'David Wilson'", "difficulty": "simple", @@ -9497,7 +12575,10 @@ { "query_id": 1055, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "When is the birthday of the football player who has the highest overall rating?", "answer": "SELECT t1.birthday FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 1", "difficulty": "simple", @@ -9506,7 +12587,10 @@ { "query_id": 1056, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "League" + ], "query": "What is the name of the football league in the country of Netherlands?", "answer": "SELECT t2.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Netherlands'", "difficulty": "simple", @@ -9515,7 +12599,10 @@ { "query_id": 1057, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "Match" + ], "query": "Calculate the average home team goal in the 2010/2011 season in the country of Poland.", "answer": "SELECT CAST(SUM(t2.home_team_goal) AS REAL) / COUNT(t2.id) FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Poland' AND t2.season = '2010/2011'", "difficulty": "moderate", @@ -9524,7 +12611,10 @@ { "query_id": 1058, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Who has the highest average finishing rate between the highest and shortest football player?", "answer": "SELECT A FROM ( SELECT AVG(finishing) result, 'Max' A FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.height = ( SELECT MAX(height) FROM Player ) UNION SELECT AVG(finishing) result, 'Min' A FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.height = ( SELECT MIN(height) FROM Player ) ) ORDER BY result DESC LIMIT 1", "difficulty": "challenging", @@ -9533,7 +12623,9 @@ { "query_id": 1059, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "Please list player names which are higher than 180.", "answer": "SELECT player_name FROM Player WHERE height > 180", "difficulty": "simple", @@ -9542,7 +12634,9 @@ { "query_id": 1060, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "How many players were born after 1990?", "answer": "SELECT COUNT(id) FROM Player WHERE STRFTIME('%Y', birthday) > '1990'", "difficulty": "simple", @@ -9551,7 +12645,9 @@ { "query_id": 1061, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "How many players whose first names are Adam and weigh more than 170?", "answer": "SELECT COUNT(id) FROM Player WHERE weight > 170 AND player_name LIKE 'Adam%'", "difficulty": "simple", @@ -9560,7 +12656,10 @@ { "query_id": 1062, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Which players had an overall rating of over 80 from 2008 to 2010? Please list player names.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.overall_rating > 80 AND SUBSTR(t2.`date`, 1, 4) BETWEEN '2008' AND '2010'", "difficulty": "moderate", @@ -9569,7 +12668,10 @@ { "query_id": 1063, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is Aaron Doran's potential score?", "answer": "SELECT t2.potential FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Aaron Doran'", "difficulty": "simple", @@ -9578,7 +12680,10 @@ { "query_id": 1064, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "List out of players whose preferred foot is left.", "answer": "SELECT DISTINCT t1.id, t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.preferred_foot = 'left'", "difficulty": "simple", @@ -9587,7 +12692,10 @@ { "query_id": 1065, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "Please list all team names which the speed class is fast.", "answer": "SELECT DISTINCT t1.team_long_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlaySpeedClass = 'Fast'", "difficulty": "simple", @@ -9596,7 +12704,10 @@ { "query_id": 1066, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What is the passing class of CLB team?", "answer": "SELECT DISTINCT t2.buildUpPlayPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_short_name = 'CLB'", "difficulty": "simple", @@ -9605,7 +12716,10 @@ { "query_id": 1067, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "Which teams have build up play passing more than 70? Please list their short names.", "answer": "SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlayPassing > 70", "difficulty": "moderate", @@ -9614,7 +12728,10 @@ { "query_id": 1068, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "From 2010 to 2015, what was the average overall rating of players who are higher than 170?", "answer": "SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 170 AND SUBSTR(t2.`date`, 1, 4) BETWEEN '2010' AND '2015'", "difficulty": "moderate", @@ -9623,7 +12740,9 @@ { "query_id": 1069, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "player" + ], "query": "Which football player has the shortest height?", "answer": "SELECT player_name FROM player ORDER BY height ASC LIMIT 1", "difficulty": "simple", @@ -9632,7 +12751,10 @@ { "query_id": 1070, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "League" + ], "query": "Which country is the league Italy Serie A from?", "answer": "SELECT t1.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t2.name = 'Italy Serie A'", "difficulty": "simple", @@ -9641,7 +12763,10 @@ { "query_id": 1071, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "List the football team that has a build up play speed of 31, build up plan dribbling of 53, and build up play passing of 32. Only indicate the short name of the team.", "answer": "SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlaySpeed = 31 AND t2.buildUpPlayDribbling = 53 AND t2.buildUpPlayPassing = 32", "difficulty": "challenging", @@ -9650,7 +12775,10 @@ { "query_id": 1072, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the average overall rating of the football player Aaron Doran?", "answer": "SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Aaron Doran'", "difficulty": "simple", @@ -9659,7 +12787,10 @@ { "query_id": 1073, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "How many matches were held in the league Germany 1. Bundesliga\nfrom August to October 2008?", "answer": "SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Germany 1. Bundesliga' AND SUBSTR(t2.`date`, 1, 7) BETWEEN '2008-08' AND '2008-10'", "difficulty": "moderate", @@ -9668,7 +12799,10 @@ { "query_id": 1074, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Match", + "Team" + ], "query": "List all the short name of the football team that had a home team goal of 10?", "answer": "SELECT t1.team_short_name FROM Team AS t1 INNER JOIN Match AS t2 ON t1.team_api_id = t2.home_team_api_id WHERE t2.home_team_goal = 10", "difficulty": "simple", @@ -9677,7 +12811,10 @@ { "query_id": 1075, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "List all the football player with the highest balance score and potential score of 61.", "answer": "SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.potential = '61' ORDER BY t2.balance DESC LIMIT 1", "difficulty": "moderate", @@ -9686,7 +12823,10 @@ { "query_id": 1076, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the difference of the average ball control score between Abdou Diallo and Aaron Appindangoye\n?", "answer": "SELECT CAST(SUM(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.id ELSE NULL END) - CAST(SUM(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.id ELSE NULL END) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id", "difficulty": "challenging", @@ -9695,7 +12835,9 @@ { "query_id": 1077, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team" + ], "query": "What's the long name for the team GEN?", "answer": "SELECT team_long_name FROM Team WHERE team_short_name = 'GEN'", "difficulty": "simple", @@ -9704,7 +12846,9 @@ { "query_id": 1078, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "Which player is older, Aaron Lennon or Abdelaziz Barrada?", "answer": "SELECT player_name FROM Player WHERE player_name IN ('Aaron Lennon', 'Abdelaziz Barrada') ORDER BY birthday ASC LIMIT 1", "difficulty": "simple", @@ -9713,7 +12857,9 @@ { "query_id": 1079, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "Which player is the tallest?", "answer": "SELECT player_name FROM Player ORDER BY height DESC LIMIT 1", "difficulty": "simple", @@ -9722,7 +12868,9 @@ { "query_id": 1080, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "Among the players whose preferred foot was the left foot when attacking, how many of them would remain in his position when the team attacked?", "answer": "SELECT COUNT(player_api_id) FROM Player_Attributes WHERE preferred_foot = 'left' AND attacking_work_rate = 'low'", "difficulty": "moderate", @@ -9731,7 +12879,10 @@ { "query_id": 1081, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "League" + ], "query": "Which country is the Belgium Jupiler League from?", "answer": "SELECT t1.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t2.name = 'Belgium Jupiler League'", "difficulty": "simple", @@ -9740,7 +12891,10 @@ { "query_id": 1082, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "League" + ], "query": "Please list the leagues from Germany.", "answer": "SELECT t2.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Germany'", "difficulty": "simple", @@ -9749,7 +12903,10 @@ { "query_id": 1083, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Which player has the strongest overall strength?", "answer": "SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 1", "difficulty": "simple", @@ -9758,7 +12915,10 @@ { "query_id": 1084, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Among the players born before the year 1986, how many of them would remain in his position and defense while the team attacked?", "answer": "SELECT COUNT(DISTINCT t1.player_name) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) < '1986' AND t2.defensive_work_rate = 'high'", "difficulty": "challenging", @@ -9767,7 +12927,10 @@ { "query_id": 1085, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Which of these players performs the best in crossing actions, Alexis, Ariel Borysiuk or Arouna Kone?", "answer": "SELECT t1.player_name, t2.crossing FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name IN ('Alexis', 'Ariel Borysiuk', 'Arouna Kone') ORDER BY t2.crossing DESC LIMIT 1", "difficulty": "moderate", @@ -9776,7 +12939,10 @@ { "query_id": 1086, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What's the heading accuracy of Ariel Borysiuk?", "answer": "SELECT t2.heading_accuracy FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Ariel Borysiuk'", "difficulty": "simple", @@ -9785,7 +12951,10 @@ { "query_id": 1087, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Among the players whose height is over 180, how many of them have a volley score of over 70?", "answer": "SELECT COUNT(DISTINCT t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 180 AND t2.volleys > 70", "difficulty": "simple", @@ -9794,7 +12963,10 @@ { "query_id": 1088, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Please list the names of the players whose volley score and dribbling score are over 70.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.volleys > 70 AND t2.dribbling > 70", "difficulty": "moderate", @@ -9803,7 +12975,10 @@ { "query_id": 1089, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "Match" + ], "query": "How many matches in the 2008/2009 season were held in Belgium?", "answer": "SELECT COUNT(t2.id) FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Belgium' AND t2.season = '2008/2009'", "difficulty": "simple", @@ -9812,7 +12987,10 @@ { "query_id": 1090, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the long passing score of the oldest player?", "answer": "SELECT t2.long_passing FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t1.birthday ASC LIMIT 1", "difficulty": "simple", @@ -9821,7 +12999,10 @@ { "query_id": 1091, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "How many matches were held in the Belgium Jupiler League in April, 2009?", "answer": "SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Belgium Jupiler League' AND SUBSTR(t2.`date`, 1, 4) = '2009'", "difficulty": "moderate", @@ -9830,7 +13011,10 @@ { "query_id": 1092, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "Which league had the most matches in the 2008/2009 season?", "answer": "SELECT t1.name FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2008/2009' GROUP BY t1.name ORDER BY COUNT(t2.id) DESC LIMIT 1", "difficulty": "simple", @@ -9839,7 +13023,10 @@ { "query_id": 1093, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the average overall rating of the players born before the year 1986?", "answer": "SELECT SUM(t2.overall_rating) / COUNT(t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) < '1986'", "difficulty": "moderate", @@ -9848,7 +13035,10 @@ { "query_id": 1094, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "How much higher in percentage is Ariel Borysiuk's overall rating than that of Paulin Puel?", "answer": "SELECT (SUM(CASE WHEN t1.player_name = 'Ariel Borysiuk' THEN t2.overall_rating ELSE 0 END) * 1.0 - SUM(CASE WHEN t1.player_name = 'Paulin Puel' THEN t2.overall_rating ELSE 0 END)) * 100 / SUM(CASE WHEN t1.player_name = 'Paulin Puel' THEN t2.overall_rating ELSE 0 END) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id", "difficulty": "challenging", @@ -9857,7 +13047,10 @@ { "query_id": 1095, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "How much is the average build up play speed of the Heart of Midlothian team?", "answer": "SELECT CAST(SUM(t2.buildUpPlaySpeed) AS REAL) / COUNT(t2.id) FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Heart of Midlothian'", "difficulty": "moderate", @@ -9866,7 +13059,10 @@ { "query_id": 1096, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Calculate the average overall rating of Pietro Marino.", "answer": "SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Pietro Marino'", "difficulty": "moderate", @@ -9875,7 +13071,10 @@ { "query_id": 1097, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is Aaron Lennox's total crossing score?", "answer": "SELECT SUM(t2.crossing) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Aaron Lennox'", "difficulty": "simple", @@ -9884,7 +13083,10 @@ { "query_id": 1098, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What is Ajax's highest chance creation passing score and what is it classified as?", "answer": "SELECT t2.chanceCreationPassing, t2.chanceCreationPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Ajax' ORDER BY t2.chanceCreationPassing DESC LIMIT 1", "difficulty": "moderate", @@ -9893,7 +13095,10 @@ { "query_id": 1099, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Which foot is preferred by Abdou Diallo?", "answer": "SELECT DISTINCT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Abdou Diallo'", "difficulty": "simple", @@ -9902,7 +13107,10 @@ { "query_id": 1100, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the highest overall rating received by Dorlan Pabon?", "answer": "SELECT MAX(t2.overall_rating) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Dorlan Pabon'", "difficulty": "simple", @@ -9911,7 +13119,11 @@ { "query_id": 1101, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "Match", + "TEAM" + ], "query": "What is the average number of goals made by Parma as the away team while playing in Italy?", "answer": "SELECT CAST(SUM(T1.away_team_goal) AS REAL) / COUNT(T1.id) FROM \"Match\" AS T1 INNER JOIN TEAM AS T2 ON T1.away_team_api_id = T2.team_api_id INNER JOIN Country AS T3 ON T1.country_id = T3.id WHERE T2.team_long_name = 'Parma' AND T3.name = 'Italy'", "difficulty": "moderate", @@ -9920,7 +13132,10 @@ { "query_id": 1102, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "For the players who had a 77 points overall rating on 2016/6/23, who was the oldest? Give the name of the player.", "answer": "SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2016-06-23' AND t2.overall_rating = 77 ORDER BY t1.birthday ASC LIMIT 1", "difficulty": "moderate", @@ -9929,7 +13144,10 @@ { "query_id": 1103, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What was the overall rating for Aaron Mooy on 2016/2/4?", "answer": "SELECT t2.overall_rating FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2016-02-04' AND t1.player_name = 'Aaron Mooy'", "difficulty": "moderate", @@ -9938,7 +13156,10 @@ { "query_id": 1104, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What was the potiential for Francesco Parravicini on 2010/8/30?", "answer": "SELECT t2.potential FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2010-08-30' AND t1.player_name = 'Francesco Parravicini'", "difficulty": "moderate", @@ -9947,7 +13168,10 @@ { "query_id": 1105, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "How was Francesco Migliore's attacking work rate on 2015/5/1?", "answer": "SELECT t2.attacking_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2015-05-01' AND t1.player_name = 'Francesco Migliore'", "difficulty": "moderate", @@ -9956,7 +13180,10 @@ { "query_id": 1106, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Tell the defensive work rate for Kevin Berigaud on 2013/2/22.", "answer": "SELECT t2.defensive_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2013-02-22' AND t1.player_name = 'Kevin Berigaud'", "difficulty": "moderate", @@ -9965,7 +13192,10 @@ { "query_id": 1107, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "When was the first time did Kevin Constant have his highest crossing score? Give the date.", "answer": "SELECT `date` FROM ( SELECT t2.crossing, t2.`date` FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t1.player_name = 'Kevin Constant' ORDER BY t2.crossing DESC) ORDER BY date DESC LIMIT 1", "difficulty": "moderate", @@ -9974,7 +13204,10 @@ { "query_id": 1108, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What was the build up play speed class for \"Willem II\" on 2011/2/22?", "answer": "SELECT t2.buildUpPlaySpeedClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Willem II' AND SUBSTR(t2.`date`, 1, 10) = '2011-02-22'", "difficulty": "moderate", @@ -9983,7 +13216,10 @@ { "query_id": 1109, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "How was the build up play dribbling class for \"LEI\" on 2015/9/10?", "answer": "SELECT t2.buildUpPlayDribblingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_short_name = 'LEI' AND SUBSTR(t2.`date`, 1, 10) = '2015-09-10'", "difficulty": "moderate", @@ -9992,7 +13228,10 @@ { "query_id": 1110, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "Tell the build Up play passing class for \"FC Lorient\" on 2010/2/22.", "answer": "SELECT t2.buildUpPlayPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'FC Lorient' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22'", "difficulty": "moderate", @@ -10001,7 +13240,10 @@ { "query_id": 1111, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "State the chance creation passing class for \"PEC Zwolle\" on 2013/9/20.", "answer": "SELECT t2.chanceCreationPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'PEC Zwolle' AND SUBSTR(t2.`date`, 1, 10) = '2013-09-20'", "difficulty": "moderate", @@ -10010,7 +13252,10 @@ { "query_id": 1112, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What was the chance creation crossing class for \"Hull City\" on 2010/2/22?", "answer": "SELECT t2.chanceCreationCrossingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hull City' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22'", "difficulty": "moderate", @@ -10019,7 +13264,10 @@ { "query_id": 1113, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "For the team \"Hannover 96\", what was its defence aggression class on 2015/9/10?", "answer": "SELECT t2.chanceCreationShootingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hannover 96' AND SUBSTR(t2.`date`, 1, 10) = '2015-09-10'", "difficulty": "moderate", @@ -10028,7 +13276,10 @@ { "query_id": 1114, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What was the average overall rating for Marko Arnautovic from 2007/2/22 to 2016/4/21?", "answer": "SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t1.player_name = 'Marko Arnautovic' AND SUBSTR(t2.`date`, 1, 10) BETWEEN '2007-02-22' AND '2016-04-21'", "difficulty": "challenging", @@ -10037,7 +13288,10 @@ { "query_id": 1115, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?", "answer": "SELECT (SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) * 1.0 - SUM(CASE WHEN t1.player_name = 'Jordan Bowery' THEN t2.overall_rating ELSE 0 END)) * 100 / SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) LvsJ_percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2013-07-12'", "difficulty": "challenging", @@ -10046,7 +13300,9 @@ { "query_id": 1116, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "List down 5 tallest players' name.", "answer": "SELECT player_name FROM Player ORDER BY height DESC LIMIT 5", "difficulty": "simple", @@ -10055,7 +13311,9 @@ { "query_id": 1117, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "What are the player api id of 10 heaviest players?", "answer": "SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 10", "difficulty": "simple", @@ -10064,7 +13322,9 @@ { "query_id": 1118, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "List down the name of players who are 35 years old and above.", "answer": "SELECT player_name FROM Player WHERE CAST((JULIANDAY('now') - JULIANDAY(birthday)) AS REAL) / 365 >= 35", "difficulty": "simple", @@ -10073,7 +13333,10 @@ { "query_id": 1119, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player", + "match" + ], "query": "How many home team goal have been scored by Aaron Lennon?", "answer": "SELECT SUM(t2.home_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_9 WHERE t1.player_name = 'Aaron Lennon'", "difficulty": "simple", @@ -10082,7 +13345,10 @@ { "query_id": 1120, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player", + "match" + ], "query": "Sum up the away team goal scored by both Daan Smith and Filipe Ferreira.", "answer": "SELECT SUM(t2.away_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_5 WHERE t1.player_name IN ('Daan Smith', 'Filipe Ferreira')", "difficulty": "moderate", @@ -10091,7 +13357,10 @@ { "query_id": 1121, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player", + "match" + ], "query": "Calculate the total home team goal scored by players whose age are 30 years old and below.", "answer": "SELECT SUM(t2.home_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_1 WHERE datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(T1.birthday) < 31", "difficulty": "moderate", @@ -10100,7 +13369,10 @@ { "query_id": 1122, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "State 10 names of the strongest players.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 10", "difficulty": "simple", @@ -10109,7 +13381,10 @@ { "query_id": 1123, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the name of players with the highest potential?", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.potential DESC LIMIT 1", "difficulty": "simple", @@ -10118,7 +13393,10 @@ { "query_id": 1124, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Who are the players that tend to be attacking when their mates were doing attack moves? List down their name.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.attacking_work_rate = 'high'", "difficulty": "moderate", @@ -10127,7 +13405,10 @@ { "query_id": 1125, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Among the players with finishing rate of 1, pick the eldest player and state the player's name.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.finishing = 1 ORDER BY t1.birthday ASC LIMIT 1", "difficulty": "moderate", @@ -10136,7 +13417,11 @@ { "query_id": 1126, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "Match", + "Player" + ], "query": "State the name of players who came from Belgium.", "answer": "SELECT t3.player_name FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id INNER JOIN Player AS t3 ON t2.home_player_1 = t3.player_api_id WHERE t1.name = 'Belgium'", "difficulty": "simple", @@ -10145,7 +13430,12 @@ { "query_id": 1127, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player", + "Country", + "Match" + ], "query": "Locate players with vision scores of 90 and above, state the country of these players.", "answer": "SELECT DISTINCT t4.name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.player_api_id = t2.player_api_id INNER JOIN Match AS t3 ON t2.player_api_id = t3.home_player_8 INNER JOIN Country AS t4 ON t3.country_id = t4.id WHERE t1.vision > 89", "difficulty": "moderate", @@ -10154,7 +13444,11 @@ { "query_id": 1128, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "Match", + "Player" + ], "query": "Which country's players have the heaviest average weights?", "answer": "SELECT t1.name FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id INNER JOIN Player AS t3 ON t2.home_player_1 = t3.player_api_id GROUP BY t1.name ORDER BY AVG(t3.weight) DESC LIMIT 1", "difficulty": "simple", @@ -10163,7 +13457,10 @@ { "query_id": 1129, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "List down the long name for slow speed class team.", "answer": "SELECT DISTINCT t1.team_long_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlaySpeedClass = 'Slow'", "difficulty": "simple", @@ -10172,7 +13469,10 @@ { "query_id": 1130, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "What are the short name of team who played safe while creating chance of passing?", "answer": "SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.chanceCreationPassingClass = 'Safe'", "difficulty": "moderate", @@ -10181,7 +13481,11 @@ { "query_id": 1131, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player", + "Country", + "Match" + ], "query": "What is the average heights of Italy players?", "answer": "SELECT CAST(SUM(T1.height) AS REAL) / COUNT(T1.id) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.id = T2.id INNER JOIN Country AS T3 ON T2.country_id = T3.ID WHERE T3.NAME = 'Italy'", "difficulty": "simple", @@ -10190,7 +13494,9 @@ { "query_id": 1132, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "Please provide the names of top three football players who are over 180 cm tall in alphabetical order.", "answer": "SELECT player_name FROM Player WHERE height > 180 ORDER BY player_name LIMIT 3", "difficulty": "simple", @@ -10199,7 +13505,9 @@ { "query_id": 1133, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player" + ], "query": "How many football players born after the 1990s have the first name \"Aaron\"?", "answer": "SELECT COUNT(id) FROM Player WHERE birthday > '1990' AND player_name LIKE 'Aaron%'", "difficulty": "simple", @@ -10208,7 +13516,9 @@ { "query_id": 1134, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "What is the difference between players 6 and 23's jumping scores?", "answer": "SELECT SUM(CASE WHEN t1.id = 6 THEN t1.jumping ELSE 0 END) - SUM(CASE WHEN t1.id = 23 THEN t1.jumping ELSE 0 END) FROM Player_Attributes AS t1", "difficulty": "simple", @@ -10217,7 +13527,9 @@ { "query_id": 1135, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "Please provide top three football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.", "answer": "SELECT id FROM Player_Attributes WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 3", "difficulty": "moderate", @@ -10226,7 +13538,9 @@ { "query_id": 1136, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "How many players had the highest potential score for crossing that preferred to use their left foots while attacking?", "answer": "SELECT COUNT(t1.id) FROM Player_Attributes AS t1 WHERE t1.preferred_foot = 'left' AND t1.crossing = ( SELECT MAX(crossing) FROM Player_Attributes)", "difficulty": "moderate", @@ -10235,7 +13549,9 @@ { "query_id": 1137, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes" + ], "query": "What percentage of players have a strength and stamina score of more than 80?", "answer": "SELECT CAST(COUNT(CASE WHEN strength > 80 AND stamina > 80 THEN id ELSE NULL END) AS REAL) * 100 / COUNT(id) FROM Player_Attributes t", "difficulty": "simple", @@ -10244,7 +13560,10 @@ { "query_id": 1138, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Country", + "League" + ], "query": "In what country did the Poland Ekstraklasa take place?", "answer": "SELECT name FROM Country WHERE id IN ( SELECT country_id FROM League WHERE name = 'Poland Ekstraklasa' )", "difficulty": "simple", @@ -10253,7 +13572,10 @@ { "query_id": 1139, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "What was the final score for the match on September 24, 2008, in the Belgian Jupiler League between the home team and the away team?", "answer": "SELECT t2.home_team_goal, t2.away_team_goal FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Belgium Jupiler League' AND SUBSTR(t2.`date`, 1, 10) = '2008-09-24'", "difficulty": "challenging", @@ -10262,7 +13584,10 @@ { "query_id": 1140, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What are Alexis Blin's sprint speed, agility, and acceleration scores?", "answer": "SELECT sprint_speed, agility, acceleration FROM Player_Attributes WHERE player_api_id IN ( SELECT player_api_id FROM Player WHERE player_name = 'Alexis Blin' )", "difficulty": "simple", @@ -10271,7 +13596,10 @@ { "query_id": 1141, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Team_Attributes", + "Team" + ], "query": "Does the KSV Cercle Brugge team have a slow, balanced or fast speed class?", "answer": "SELECT DISTINCT t1.buildUpPlaySpeedClass FROM Team_Attributes AS t1 INNER JOIN Team AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.team_long_name = 'KSV Cercle Brugge'", "difficulty": "moderate", @@ -10280,7 +13608,10 @@ { "query_id": 1142, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "In the 2015\u20132016 season, how many games were played in the Italian Serie A league?", "answer": "SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Italy Serie A' AND t2.season = '2015/2016'", "difficulty": "simple", @@ -10289,7 +13620,10 @@ { "query_id": 1143, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "What was the highest score of the home team in the Netherlands Eredivisie league?", "answer": "SELECT MAX(t2.home_team_goal) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Netherlands Eredivisie'", "difficulty": "simple", @@ -10298,7 +13632,10 @@ { "query_id": 1144, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Please state the finishing rate and curve score of the player who has the heaviest weight.", "answer": "SELECT id, finishing, curve FROM Player_Attributes WHERE player_api_id = ( SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 1 ) LIMIT 1", "difficulty": "simple", @@ -10307,7 +13644,10 @@ { "query_id": 1145, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "League", + "Match" + ], "query": "Which league had the most games in the 2015\u20132016 season?", "answer": "SELECT t1.name FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' GROUP BY t1.name ORDER BY COUNT(t2.id) DESC LIMIT 1", "difficulty": "simple", @@ -10316,7 +13656,10 @@ { "query_id": 1146, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Match", + "Team" + ], "query": "Please provide the full name of the away team that scored the most goals.", "answer": "SELECT t2.team_long_name FROM Match AS t1 INNER JOIN Team AS t2 ON t1.away_team_api_id = t2.team_api_id ORDER BY t1.away_team_goal DESC LIMIT 1", "difficulty": "moderate", @@ -10325,7 +13668,10 @@ { "query_id": 1147, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "Please name one player whose overall strength is the greatest.", "answer": "SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.overall_rating = ( SELECT MAX(overall_rating) FROM Player_Attributes)", "difficulty": "simple", @@ -10334,7 +13680,10 @@ { "query_id": 1148, "database_id": "european_football_2", - "table_id": "N/A", + "table_id": [ + "Player_Attributes", + "Player" + ], "query": "What is the percentage of players that are under 180 cm who have an overall strength of more than 70?", "answer": "SELECT CAST(COUNT(CASE WHEN t2.overall_rating > 70 THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height < 180", "difficulty": "moderate", @@ -10343,7 +13692,9 @@ { "query_id": 1149, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "Are there more in-patient or outpatient who were male? What is the deviation in percentage?", "answer": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE SEX = 'M'", "difficulty": "moderate", @@ -10352,7 +13703,9 @@ { "query_id": 1150, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What is the percentage of female patient were born after 1930?", "answer": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'", "difficulty": "moderate", @@ -10361,7 +13714,9 @@ { "query_id": 1151, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "For patient born between Year 1930 to 1940, how many percent of them were inpatient?", "answer": "SELECT CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE STRFTIME('%Y', Birthday) BETWEEN '1930' AND '1940'", "difficulty": "moderate", @@ -10370,7 +13725,9 @@ { "query_id": 1152, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?", "answer": "SELECT SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) / SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) FROM Patient WHERE Diagnosis = 'SLE'", "difficulty": "moderate", @@ -10379,7 +13736,10 @@ { "query_id": 1153, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.", "answer": "SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609", "difficulty": "simple", @@ -10388,7 +13748,10 @@ { "query_id": 1154, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.", "answer": "SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109", "difficulty": "simple", @@ -10397,7 +13760,10 @@ { "query_id": 1155, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List the patient ID, sex and birthday of patient with LDH beyond normal range.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 500", "difficulty": "simple", @@ -10406,7 +13772,10 @@ { "query_id": 1156, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "State the ID and age of patient with positive degree of coagulation.", "answer": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'", "difficulty": "moderate", @@ -10415,7 +13784,10 @@ { "query_id": 1157, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "For patients with severe degree of thrombosis, list their ID, sex and dieseas the patient is diagnosed with.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 2", "difficulty": "simple", @@ -10424,7 +13796,10 @@ { "query_id": 1158, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List all patients who were born in 1937 whose total cholesterol was beyond the normal range.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250", "difficulty": "moderate", @@ -10433,7 +13808,10 @@ { "query_id": 1159, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5", "difficulty": "simple", @@ -10442,7 +13820,10 @@ { "query_id": 1160, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the percentage of female patient had total protein not within the normal range?", "answer": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND (T2.TP < 6.0 OR T2.TP > 8.5) THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "difficulty": "moderate", @@ -10451,7 +13832,10 @@ { "query_id": 1161, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration?", "answer": "SELECT AVG(T2.`aCL IgG`) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'", "difficulty": "challenging", @@ -10460,7 +13844,9 @@ { "query_id": 1162, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?", "answer": "SELECT COUNT(*) FROM Patient WHERE STRFTIME('%Y', Description) = '1997' AND SEX = 'F' AND Admission = '-'", "difficulty": "moderate", @@ -10469,7 +13855,9 @@ { "query_id": 1163, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What was the age of the youngest patient when they initially arrived at the hospital?", "answer": "SELECT MIN(STRFTIME('%Y', `First Date`) - STRFTIME('%Y', Birthday)) FROM Patient", "difficulty": "simple", @@ -10478,7 +13866,10 @@ { "query_id": 1164, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "How many of the patients with the most serious thrombosis cases examined in 1997 are women?", "answer": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1", "difficulty": "moderate", @@ -10487,7 +13878,10 @@ { "query_id": 1165, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the age gap between the youngest and oldest patient with a normal triglyceride recorded?", "answer": "SELECT STRFTIME('%Y', MAX(T1.Birthday)) - STRFTIME('%Y', MIN(T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200", "difficulty": "moderate", @@ -10496,7 +13890,10 @@ { "query_id": 1166, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.", "answer": "SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1", "difficulty": "simple", @@ -10505,7 +13902,10 @@ { "query_id": 1167, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month?", "answer": "SELECT CAST(COUNT(T1.ID) AS REAL) / 12 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.Date) = '1998' AND T1.SEX = 'M'", "difficulty": "moderate", @@ -10514,7 +13914,10 @@ { "query_id": 1168, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "The oldest SJS patient's medical laboratory work was completed on what date, and what age was the patient when they initially arrived at the hospital?", "answer": "SELECT T1.Date, STRFTIME('%Y', T2.`First Date`) - STRFTIME('%Y', T2.Birthday) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'SJS' AND T2.Birthday IS NOT NULL ORDER BY T2.Birthday ASC LIMIT 1", "difficulty": "challenging", @@ -10523,7 +13926,10 @@ { "query_id": 1169, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the ratio of male to female patients among all those with abnormal uric acid counts?", "answer": "SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID", "difficulty": "challenging", @@ -10532,7 +13938,10 @@ { "query_id": 1170, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.`First Date`) >= 1", "difficulty": "moderate", @@ -10541,7 +13950,10 @@ { "query_id": 1171, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "How many underage patients were examined during the course of the three-year period from 1990 to 1993?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < '18'", "difficulty": "challenging", @@ -10550,7 +13962,10 @@ { "query_id": 1172, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many male patients have elevated total bilirubin count?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'", "difficulty": "simple", @@ -10559,7 +13974,10 @@ { "query_id": 1173, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985, and 12/31/1995?", "answer": "SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC LIMIT 1", "difficulty": "challenging", @@ -10568,7 +13986,10 @@ { "query_id": 1174, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the average age of patients examined in the laboratory for the October of the year 1991?", "answer": "SELECT AVG('1999' - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30'", "difficulty": "moderate", @@ -10577,7 +13998,10 @@ { "query_id": 1175, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How old was the patient who had the highest hemoglobin count at the time of the examination, and what is the doctor's diagnosis?", "answer": "SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday), T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.HGB DESC LIMIT 1", "difficulty": "moderate", @@ -10586,7 +14010,9 @@ { "query_id": 1176, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination" + ], "query": "What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?", "answer": "SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'", "difficulty": "simple", @@ -10595,7 +14021,9 @@ { "query_id": 1177, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?", "answer": "SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'", "difficulty": "simple", @@ -10604,7 +14032,9 @@ { "query_id": 1178, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What was the gender of the first AORTITIS diagnosed patient?", "answer": "SELECT SEX FROM Patient WHERE Diagnosis = 'AORTITIS' AND `First Date` IS NOT NULL ORDER BY `First Date` ASC LIMIT 1", "difficulty": "simple", @@ -10613,7 +14043,10 @@ { "query_id": 1179, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?", "answer": "SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'", "difficulty": "moderate", @@ -10622,7 +14055,10 @@ { "query_id": 1180, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?", "answer": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9.0 AND T2.Date = '1992-06-12'", "difficulty": "moderate", @@ -10631,7 +14067,10 @@ { "query_id": 1181, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient who got the laboratory test of uric acid level as 8.4 on 1991-10-21, how old was he/she at that time?", "answer": "SELECT STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UA = 8.4 AND T2.Date = '1991-10-21'", "difficulty": "moderate", @@ -10640,7 +14079,10 @@ { "query_id": 1182, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient who first came to the hospital on 1991/6/13 who was diagnosed with SJS, what is the total number of his/her Laboratory tests in 1995?", "answer": "SELECT COUNT(*) FROM Laboratory WHERE ID = ( SELECT ID FROM Patient WHERE `First Date` = '1991-06-13' AND Diagnosis = 'SJS' ) AND STRFTIME('%Y', Date) = '1995'", "difficulty": "moderate", @@ -10649,7 +14091,10 @@ { "query_id": 1183, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?", "answer": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = ( SELECT ID FROM Examination WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' ) AND T2.`Examination Date` = T1.`First Date`", "difficulty": "challenging", @@ -10658,7 +14103,10 @@ { "query_id": 1184, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?", "answer": "SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'", "difficulty": "simple", @@ -10667,7 +14115,10 @@ { "query_id": 1185, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?", "answer": "SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02-18'", "difficulty": "challenging", @@ -10676,7 +14127,9 @@ { "query_id": 1186, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination" + ], "query": "Lists all patients by ID who were diagnosed with Behcet's and had their exams between 01/01/197 and 12/31/1997.", "answer": "SELECT ID FROM Examination WHERE `Examination Date` BETWEEN '1997-01-01' AND '1997-12-31' AND Diagnosis = 'Behcet'", "difficulty": "moderate", @@ -10685,7 +14138,9 @@ { "query_id": 1187, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "How many patients who were examined between 1987/7/6 and 1996/1/31 had a GPT level greater than 30 and an ALB level less than 4? List them by their ID.", "answer": "SELECT DISTINCT ID FROM Laboratory WHERE Date BETWEEN '1987-07-06' AND '1996-01-31' AND GPT > 30 AND ALB < 4", "difficulty": "moderate", @@ -10694,7 +14149,9 @@ { "query_id": 1188, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "How many female patients born in 1964 were admitted to the hospital? List them by ID.", "answer": "SELECT ID FROM Patient WHERE STRFTIME('%Y', Birthday) = '1964' AND SEX = 'F' AND Admission = '+'", "difficulty": "simple", @@ -10703,7 +14160,9 @@ { "query_id": 1189, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination" + ], "query": "What number of patients with a degree of thrombosis level 2 and ANA pattern of only S, have a level of anti-Cardiolip in antibody (IgM) 20% higher than average?", "answer": "SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')", "difficulty": "challenging", @@ -10712,7 +14171,9 @@ { "query_id": 1190, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?", "answer": "SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE `U-PRO` > 0 AND `U-PRO` < 30", "difficulty": "challenging", @@ -10721,7 +14182,9 @@ { "query_id": 1191, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?", "answer": "SELECT CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE STRFTIME('%Y', `First Date`) = '1981' AND SEX = 'M'", "difficulty": "challenging", @@ -10730,7 +14193,10 @@ { "query_id": 1192, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.`T-BIL` < 2.0 AND STRFTIME('%Y', T2.Date) = '1991' AND STRFTIME('%m', T2.Date) = '10'", "difficulty": "challenging", @@ -10739,7 +14205,10 @@ { "query_id": 1193, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'P' AND STRFTIME('%Y', T1.Birthday) BETWEEN '1980' AND '1989' AND T1.SEX = 'F'", "difficulty": "moderate", @@ -10748,7 +14217,11 @@ { "query_id": 1194, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory", + "Patient" + ], "query": "What sex is the patient who in a medical examination was diagnosed with PSS and in a laboratory examination had a blood level of C-reactive protein de 2+, createnine 1 and LDH 123?", "answer": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T3.ID = T2.ID WHERE T2.Diagnosis = 'PSS' AND T3.CRP = '2+' AND T3.CRE = 1.0 AND T3.LDH = 123", "difficulty": "challenging", @@ -10757,7 +14230,10 @@ { "query_id": 1195, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the average blood albumin level for female patients with a PLT greater than 400 who have been diagnosed with SLE?", "answer": "SELECT AVG(T2.ALB) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 400 AND T1.Diagnosis = 'SLE' AND T1.SEX = 'F'", "difficulty": "moderate", @@ -10766,7 +14242,9 @@ { "query_id": 1196, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination" + ], "query": "What is the most common sign of patients with SLE disease?", "answer": "SELECT Symptoms FROM Examination WHERE Diagnosis = 'SLE' GROUP BY Symptoms ORDER BY COUNT(Symptoms) DESC LIMIT 1", "difficulty": "simple", @@ -10775,7 +14253,9 @@ { "query_id": 1197, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "When was the medical information on patient number 48473 first documented, and what disease did she have?", "answer": "SELECT `First Date`, Diagnosis FROM Patient WHERE ID = 48473", "difficulty": "simple", @@ -10784,7 +14264,9 @@ { "query_id": 1198, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "How many female patients were given an APS diagnosis?", "answer": "SELECT COUNT(ID) FROM Patient WHERE SEX = 'F' AND Diagnosis = 'APS'", "difficulty": "simple", @@ -10793,7 +14275,9 @@ { "query_id": 1199, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "How many patients who underwent testing in 1997 had protein levels outside the normal range?", "answer": "SELECT COUNT(ID) FROM Laboratory WHERE ALB <= 6.0 OR ALB >= 8.5 AND STRFTIME('%Y', Date) = '1997'", "difficulty": "simple", @@ -10802,7 +14286,9 @@ { "query_id": 1200, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination" + ], "query": "What proportion of patients who had signs of thrombocytopenia had SLE diagnosed?", "answer": "SELECT CAST(SUM(CASE WHEN Diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Examination WHERE Symptoms = 'thrombocytopenia'", "difficulty": "moderate", @@ -10811,7 +14297,9 @@ { "query_id": 1201, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Patient" + ], "query": "What percentage of patients who were born in 1980 and were diagnosed with RA are women?", "answer": "SELECT CAST(SUM(CASE WHEN SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE Diagnosis = 'RA' AND STRFTIME('%Y', Birthday) = '1980'", "difficulty": "moderate", @@ -10820,7 +14308,10 @@ { "query_id": 1202, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "How many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with BEHCET disease did not stay in the hospital for treatment?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'Behcet' AND T1.SEX = 'M' AND STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1995' AND '1997' AND T1.Admission = '-'", "difficulty": "challenging", @@ -10829,7 +14320,10 @@ { "query_id": 1203, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients who were female got white blood cells that were below 3.5?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC < 3.5 AND T1.SEX = 'F'", "difficulty": "simple", @@ -10838,7 +14332,10 @@ { "query_id": 1204, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Patient" + ], "query": "How long did it take after patient number 821298 arrived at the hospital for the first time before her evaluation began?", "answer": "SELECT STRFTIME('%d', T3.`Examination Date`) - STRFTIME('%d', T1.`First Date`) FROM Patient AS T1 INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T1.ID = 821298", "difficulty": "simple", @@ -10847,7 +14344,10 @@ { "query_id": 1205, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Was the patient with the number 57266's uric acid within a normal range?", "answer": "SELECT CASE WHEN (T1.SEX = 'F' AND T2.UA > 6.5) OR (T1.SEX = 'M' AND T2.UA < 8.0) THEN true ELSE false END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 57266", "difficulty": "moderate", @@ -10856,7 +14356,9 @@ { "query_id": 1206, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "When is the laboratory examination of patient '48473' where his/her AST glutamic oxaloacetic transaminase (GOT) index is above the normal range.", "answer": "SELECT Date FROM Laboratory WHERE ID = 48473 AND GOT >= 60", "difficulty": "simple", @@ -10865,7 +14367,10 @@ { "query_id": 1207, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List all patients with their sex and date of birthday, whose AST glutamic oxaloacetic transaminase (GOT) index is within normal range for loboratory examination in 1994.", "answer": "SELECT DISTINCT T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND STRFTIME('%Y', T2.Date) = '1994'", "difficulty": "moderate", @@ -10874,7 +14379,10 @@ { "query_id": 1208, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide IDs for male patients with ALT glutamic pylvic transaminase (GPT) that have history of ALT glutamic pylvic transaminase (GPT) exceed the normal range.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.GPT >= 60", "difficulty": "moderate", @@ -10883,7 +14391,10 @@ { "query_id": 1209, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth.", "answer": "SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT > 60 ORDER BY T1.Birthday ASC", "difficulty": "moderate", @@ -10892,7 +14403,9 @@ { "query_id": 1210, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "What is the average index of the lactate dehydrogenase (LDH) for all patients with lactate dehydrogenase (LDH) within the normal range.", "answer": "SELECT AVG(LDH) FROM Laboratory WHERE LDH < 500", "difficulty": "simple", @@ -10901,7 +14414,10 @@ { "query_id": 1211, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide the ID and age of patient with lactate dehydrogenase (LDH) between 100-300 index above the normal range.", "answer": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 600 AND T2.LDH < 800", "difficulty": "moderate", @@ -10910,7 +14426,10 @@ { "query_id": 1212, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For patients with alkaliphophatase (ALP) within normal range, were they treated as inpatient or outpatient?", "answer": "SELECT T1.Admission FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300", "difficulty": "moderate", @@ -10919,7 +14438,10 @@ { "query_id": 1213, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Name the ID of the patient who is born on the April 1st, 1982. Is his/her alkaliphophatase (ALP) within normal range?", "answer": "SELECT T1.ID , CASE WHEN T2.ALP < 300 THEN 'normal' ELSE 'abNormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1982-04-01'", "difficulty": "moderate", @@ -10928,7 +14450,10 @@ { "query_id": 1214, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List ID, sex and date of birth of patient whose total protein (TP) below the lower range of the normal index.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0", "difficulty": "simple", @@ -10937,7 +14462,10 @@ { "query_id": 1215, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP idex from the normal.", "answer": "SELECT T2.TP - 8.5 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND T2.TP > 8.5", "difficulty": "moderate", @@ -10946,7 +14474,10 @@ { "query_id": 1216, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Sort in descending order all patients by birthday for male patient with albumin not within range.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND (T2.ALB <= 3.5 OR T2.ALB >= 5.5) ORDER BY T1.Birthday", "difficulty": "simple", @@ -10955,7 +14486,10 @@ { "query_id": 1217, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all patient born in 1982, state if their albumin is within normal range.", "answer": "SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982'", "difficulty": "moderate", @@ -10964,7 +14498,10 @@ { "query_id": 1218, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the percentage of the female patient whose uric acid (UA) beyond the normal range?", "answer": "SELECT CAST(SUM(CASE WHEN T2.UA > 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "difficulty": "moderate", @@ -10973,7 +14510,10 @@ { "query_id": 1219, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all patients with normal uric acid (UA), what is the average UA index based on their latest laboratory examination result?", "answer": "SELECT AVG(T2.UA) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.UA > 6.5 AND T1.SEX = 'F') OR (T2.UA > 8.0 AND T1.SEX = 'M') AND T2.Date = ( SELECT MAX(Date) FROM Laboratory )", "difficulty": "moderate", @@ -10982,7 +14522,10 @@ { "query_id": 1220, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN = 29", "difficulty": "simple", @@ -10991,7 +14534,10 @@ { "query_id": 1221, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide the ID, sex, birthday of all patients diagnosed with 'RA' that are within the UN normal index.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN < 30 AND T1.Diagnosis = 'RA'", "difficulty": "simple", @@ -11000,7 +14546,10 @@ { "query_id": 1222, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many male patients are are with creatinine index out of the normal range?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5 AND T1.SEX = 'M'", "difficulty": "simple", @@ -11009,7 +14558,10 @@ { "query_id": 1223, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Are there more male patients with creatinine not within the normal range than female? True or False?", "answer": "SELECT CASE WHEN SUM(CASE WHEN T1.SEX = 'M' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) THEN 'True' ELSE 'False' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5", "difficulty": "challenging", @@ -11018,7 +14570,10 @@ { "query_id": 1224, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the highest total bilirubin level recorded? List out the patient details with ID, sex and birthday with that index.", "answer": "SELECT T2.`T-BIL`, T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-BIL` DESC LIMIT 1", "difficulty": "simple", @@ -11027,7 +14582,10 @@ { "query_id": 1225, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List and group all patients by sex for total bilirubin (T-BIL) level not within the normal range.", "answer": "SELECT DISTINCT CASE WHEN T1.SEX = 'F' THEN T1.ID END , CASE WHEN T1.SEX = 'M' THEN T1.ID END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0", "difficulty": "moderate", @@ -11036,7 +14594,10 @@ { "query_id": 1226, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Who is the oldest patient with the highest total cholesterol (T-CHO). State the patient ID and T-CHO index.", "answer": "SELECT T1.ID, T2.`T-CHO` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-CHO` DESC, T1.Birthday ASC LIMIT 1", "difficulty": "simple", @@ -11045,7 +14606,10 @@ { "query_id": 1227, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the average age of the male patient with high cholesterol?", "answer": "SELECT AVG(STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-CHO` >= 250 AND T1.SEX = 'M'", "difficulty": "moderate", @@ -11054,7 +14618,10 @@ { "query_id": 1228, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range?", "answer": "SELECT T1.ID, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG > 300", "difficulty": "simple", @@ -11063,7 +14630,10 @@ { "query_id": 1229, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG >= 200 AND STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 50", "difficulty": "moderate", @@ -11072,7 +14642,10 @@ { "query_id": 1230, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CPK < 250 AND T1.Admission = '-'", "difficulty": "simple", @@ -11081,7 +14654,10 @@ { "query_id": 1231, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) BETWEEN '1936' AND '1956' AND T1.SEX = 'M' AND T2.CPK >= 250", "difficulty": "challenging", @@ -11090,7 +14666,10 @@ { "query_id": 1232, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Provide ID, sex and age of patient who has blood glucose (GLU) not within normal range but with total cholesterol(T-CHO) within normal range.", "answer": "SELECT DISTINCT T1.ID, T1.SEX , STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU >= 180 AND T2.`T-CHO` < 250", "difficulty": "challenging", @@ -11099,7 +14678,10 @@ { "query_id": 1233, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List each patient's ID and blood glucose (GLU) index that were within normal range for patient's whose data was first recorded in 1991.", "answer": "SELECT DISTINCT T1.ID, T2.GLU FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.`First Date`) = '1991' AND T2.GLU < 180", "difficulty": "moderate", @@ -11108,7 +14690,10 @@ { "query_id": 1234, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List the patient ID, sex and birthday who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order.", "answer": "SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC <= 3.5 OR T2.WBC >= 9.0 GROUP BY T1.SEX,T1.ID ORDER BY T1.Birthday ASC", "difficulty": "moderate", @@ -11117,7 +14702,10 @@ { "query_id": 1235, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age.", "answer": "SELECT T1.Diagnosis, T1.ID , STRFTIME('%Y', CURRENT_TIMESTAMP) -STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RBC < 3.5", "difficulty": "moderate", @@ -11126,7 +14714,10 @@ { "query_id": 1236, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital.", "answer": "SELECT DISTINCT T1.ID, T1.Admission FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND (T2.RBC <= 3.5 OR T2.RBC >= 6.0) AND STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) >= 50", "difficulty": "challenging", @@ -11135,7 +14726,10 @@ { "query_id": 1237, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex.", "answer": "SELECT DISTINCT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HGB < 10 AND T1.Admission = '-'", "difficulty": "simple", @@ -11144,7 +14738,10 @@ { "query_id": 1238, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex.", "answer": "SELECT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.HGB > 10 AND T2.HGB < 17 ORDER BY T1.Birthday ASC LIMIT 1", "difficulty": "moderate", @@ -11153,7 +14750,10 @@ { "query_id": 1239, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.", "answer": "SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID IN ( SELECT ID FROM Laboratory WHERE HCT >= 52 GROUP BY ID HAVING COUNT(ID) >= 2 )", "difficulty": "challenging", @@ -11162,7 +14762,10 @@ { "query_id": 1240, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "From laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range.", "answer": "SELECT AVG(T2.HCT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HCT < 29 AND STRFTIME('%Y', T2.Date) = '1991'", "difficulty": "moderate", @@ -11171,7 +14774,10 @@ { "query_id": 1241, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For patients with abnormal platelet level, state the number of patients with lower than normal range. How is it compare to the number of patients with higher than normal range?", "answer": "SELECT SUM(CASE WHEN T2.PLT < 100 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.PLT > 400 THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID", "difficulty": "challenging", @@ -11180,7 +14786,10 @@ { "query_id": 1242, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT BETWEEN 100 AND 400 AND STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) < 50 AND STRFTIME('%Y', T2.Date) = '1984'", "difficulty": "challenging", @@ -11189,7 +14798,10 @@ { "query_id": 1243, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)?", "answer": "SELECT CAST(SUM(CASE WHEN T2.PT >= 14 AND T1.SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 55", "difficulty": "challenging", @@ -11198,7 +14810,10 @@ { "query_id": 1244, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.", "answer": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.`First Date`) > '1992' AND T2.PT < 14", "difficulty": "moderate", @@ -11207,7 +14822,10 @@ { "query_id": 1245, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.Date > '1997-01-01' AND T2.APTT >= 45", "difficulty": "moderate", @@ -11216,7 +14834,11 @@ { "query_id": 1246, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "For the patients with an abnormal activated partial prothrom bin time, how many of them have a mild thrombosis?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T3.Thrombosis = 3 AND T2.APTT > 45", "difficulty": "moderate", @@ -11225,7 +14847,10 @@ { "query_id": 1247, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T2.WBC > 3.5 AND T2.WBC < 9.0 AND T1.SEX = 'M'", "difficulty": "challenging", @@ -11234,7 +14859,10 @@ { "query_id": 1248, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients born after 1980/1/1 have an abnormal fibrinogen level?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T1.Birthday > '1980-01-01'", "difficulty": "moderate", @@ -11243,7 +14871,10 @@ { "query_id": 1249, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the disease names of the patients that have a proteinuria level higher than normal.", "answer": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`U-PRO` >= 30", "difficulty": "simple", @@ -11252,7 +14883,10 @@ { "query_id": 1250, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Which patient has a normal proteinuria level and is diagnosed with SLE? Please give his or her patient ID.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`U-PRO` > 0 AND T2.`U-PRO` < 30 AND T1.Diagnosis = 'SLE'", "difficulty": "moderate", @@ -11261,7 +14895,11 @@ { "query_id": 1251, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "How many patients with an Ig G lower than normal has the symptom of abortion?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T2.IGG < 900 AND T3.Symptoms = 'abortion'", "difficulty": "moderate", @@ -11270,7 +14908,11 @@ { "query_id": 1252, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "Among the patients with a normal Ig G level, how many of them have symptoms?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T2.IGG BETWEEN 900 AND 2000 AND T3.Symptoms IS NOT NULL", "difficulty": "moderate", @@ -11279,7 +14921,10 @@ { "query_id": 1253, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient who has the highest Ig A within the normal range, what is his or her diagnosis?", "answer": "SELECT patientData.Diagnosis FROM Patient AS patientData INNER JOIN Laboratory AS labData ON patientData.ID = labData.ID WHERE labData.IGA BETWEEN 80 AND 500 ORDER BY labData.IGA DESC LIMIT 1", "difficulty": "simple", @@ -11288,7 +14933,10 @@ { "query_id": 1254, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients with a normal Ig A level came to the hospital after 1990/1/1?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGA BETWEEN 80 AND 500 AND T1.`First Date` > '1990-01-01'", "difficulty": "moderate", @@ -11297,7 +14945,10 @@ { "query_id": 1255, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with?", "answer": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGM NOT BETWEEN 40 AND 400 GROUP BY T1.Diagnosis ORDER BY COUNT(T1.Diagnosis) DESC LIMIT 1", "difficulty": "moderate", @@ -11306,7 +14957,10 @@ { "query_id": 1256, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients with a normal C-reactive protein don't have their data recorded?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.CRP = '-' OR T2.CRP = '+-' OR T2.CRP < 1.0) AND T1.Description IS NULL", "difficulty": "moderate", @@ -11315,7 +14969,10 @@ { "query_id": 1257, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients whose C-reactive protein level is abnormal, how many of them aren't 18 yet?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.CRP != '-' AND T2.CRP != '+-') AND T2.CRP >= 1.0 AND STRFTIME('%Y', Date('now')) - STRFTIME('%Y', T1.Birthday) < '18'", "difficulty": "challenging", @@ -11324,7 +14981,11 @@ { "query_id": 1258, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T3.KCT = '+'", "difficulty": "moderate", @@ -11333,7 +14994,10 @@ { "query_id": 1259, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the diseases of the patients born after 1995-1-1 and have a normal Rhuematoid Factor.", "answer": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T1.Birthday > 1995-01-01", "difficulty": "moderate", @@ -11342,7 +15006,10 @@ { "query_id": 1260, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the ID of the patient whose RF is normal and who is older than 60.", "answer": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND STRFTIME('%Y', DATE('now')) - STRFTIME('%Y', T1.Birthday) > 60", "difficulty": "simple", @@ -11351,7 +15018,10 @@ { "query_id": 1261, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "How many patients with a normal RF don't have thrombosis?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0", "difficulty": "simple", @@ -11360,7 +15030,10 @@ { "query_id": 1262, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C3 > 35 AND T1.`ANA Pattern` = 'P'", "difficulty": "moderate", @@ -11369,7 +15042,11 @@ { "query_id": 1263, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory", + "Patient" + ], "query": "Among the patients whose level of Hematoclit isn't normal, which patient has the highest anti-Cardiolipin antibody concentration? Please list his or her ID.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 on T1.ID = T3.ID WHERE (T3.HCT >= 52 OR T3.HCT <= 29) ORDER BY T2.`aCL IgA` DESC LIMIT 1", "difficulty": "moderate", @@ -11378,7 +15055,10 @@ { "query_id": 1264, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients have blood clots in veins, how many of them have a normal level of complement 4?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C4 > 10 AND T1.Diagnosis = 'APS'", "difficulty": "moderate", @@ -11387,7 +15067,10 @@ { "query_id": 1265, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP = 'negative' OR T2.RNP = '0' AND T1.Admission = '+'", "difficulty": "moderate", @@ -11396,7 +15079,10 @@ { "query_id": 1266, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Which is the youngest patient with an abnormal anti-ribonuclear protein level? Please list his or her date of birth.", "answer": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP != '-' OR '+-' ORDER BY T1.Birthday DESC LIMIT 1", "difficulty": "moderate", @@ -11405,7 +15091,10 @@ { "query_id": 1267, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "Among the patients with normal anti-SM, how many of them have the most severe degree of thrombosis?", "answer": "SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM IN ('negative','0') AND T1.Thrombosis = 1", "difficulty": "moderate", @@ -11414,7 +15103,10 @@ { "query_id": 1268, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones.", "answer": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM NOT IN ('negative','0') ORDER BY T1.Birthday DESC LIMIT 3", "difficulty": "simple", @@ -11423,7 +15115,10 @@ { "query_id": 1269, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70.", "answer": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SC170 IN ('negative','0') AND T2.Date > 1997-01-01", "difficulty": "moderate", @@ -11432,7 +15127,11 @@ { "query_id": 1270, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "Among the patients who has a normal anti-scl70, how many of them are male and have the symptom of vertigo?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE (T2.SC170 = '-' OR T2.SC170 = '+-') AND T1.SEX = 'M' AND T3.Symptoms = 'vertigo'", "difficulty": "challenging", @@ -11441,7 +15140,10 @@ { "query_id": 1271, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients with a normal anti-SSA came to the hospital before 1990?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSA IN ('negative', '0') AND STRFTIME('%Y', T2.Date) < '1990'", "difficulty": "moderate", @@ -11450,7 +15152,10 @@ { "query_id": 1272, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID.", "answer": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.`First Date` IS NOT NULL AND T2.SSA NOT IN ('negative', '0') ORDER BY T1.`First Date` ASC LIMIT 1", "difficulty": "moderate", @@ -11459,7 +15164,10 @@ { "query_id": 1273, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients have a normal anti-SSB and are diagnosed with SLE in the examination?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR '0' AND T1.Diagnosis = 'SLE'", "difficulty": "moderate", @@ -11468,7 +15176,10 @@ { "query_id": 1274, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "For the patients whose anti-SSB are normal, how many of them have other symptoms observed in their examination?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR '0' AND T1.Symptoms IS NOT NULL", "difficulty": "moderate", @@ -11477,7 +15188,10 @@ { "query_id": 1275, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male?", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CENTROMEA IN ('negative', '0') AND T2.SSB IN ('negative', '0') AND T1.SEX = 'M'", "difficulty": "moderate", @@ -11486,7 +15200,10 @@ { "query_id": 1276, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.", "answer": "SELECT DISTINCT(T1.Diagnosis) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA >= 8", "difficulty": "simple", @@ -11495,7 +15212,10 @@ { "query_id": 1277, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients have a normal anti-DNA level, yet their data are not recorded.", "answer": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA < 8 AND T1.Description IS NULL", "difficulty": "moderate", @@ -11504,7 +15224,10 @@ { "query_id": 1278, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Of the patients with an abnormal level of anti-DNA-II, how many of them admitted to the hospital?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`DNA-II` >= 8 AND T1.Admission = '+'", "difficulty": "simple", @@ -11513,7 +15236,10 @@ { "query_id": 1279, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "What is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with SLE?", "answer": "SELECT COUNT(CASE WHEN T1.Diagnosis LIKE '%SLE%' THEN T1.ID ELSE 0 END) / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`GOT` >= 60", "difficulty": "moderate", @@ -11522,7 +15248,10 @@ { "query_id": 1280, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many male patients have their glutamic oxaloacetic transaminase in the normal range?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M'", "difficulty": "simple", @@ -11531,7 +15260,10 @@ { "query_id": 1281, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?", "answer": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60 ORDER BY T1.Birthday DESC LIMIT 1", "difficulty": "moderate", @@ -11540,7 +15272,10 @@ { "query_id": 1282, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the top three patients' birthdays with the highest glutamic pylvic transaminase in the normal range.", "answer": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT < 60 ORDER BY T2.GPT DESC LIMIT 3", "difficulty": "simple", @@ -11549,7 +15284,10 @@ { "query_id": 1283, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patients with the normal glutamic pylvic transaminase level, how many of them are male?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT < 60 AND T1.SEX = 'M'", "difficulty": "simple", @@ -11558,7 +15296,10 @@ { "query_id": 1284, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded?", "answer": "SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH < 500 ORDER BY T2.LDH DESC LIMIT 1", "difficulty": "moderate", @@ -11567,7 +15308,10 @@ { "query_id": 1285, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase.", "answer": "SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH >= 500 ORDER BY T1.`First Date` DESC LIMIT 1", "difficulty": "moderate", @@ -11576,7 +15320,10 @@ { "query_id": 1286, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP >= 300 AND T1.Admission = '+'", "difficulty": "simple", @@ -11585,7 +15332,10 @@ { "query_id": 1287, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300 AND T1.Admission = '-'", "difficulty": "moderate", @@ -11594,7 +15344,10 @@ { "query_id": 1288, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the diagnosis of the patients whose total protein is lower than normal.", "answer": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0", "difficulty": "simple", @@ -11603,7 +15356,10 @@ { "query_id": 1289, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the patients who are diagnosed with SJS, how many of them have a normal level of total protein?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SJS' AND T2.TP > 6.0 AND T2.TP < 8.5", "difficulty": "moderate", @@ -11612,7 +15368,9 @@ { "query_id": 1290, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory" + ], "query": "What is the examination date of the patient whose albumin is the highest in the normal range?", "answer": "SELECT Date FROM Laboratory WHERE ALB BETWEEN 3.5 AND 5.5 ORDER BY ALB DESC LIMIT 1", "difficulty": "simple", @@ -11621,7 +15379,10 @@ { "query_id": 1291, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many male patients have a normal level of both albumin and total protein?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.ALB BETWEEN 3.5 AND 5.5 AND T2.TP BETWEEN 6.0 AND 8.5", "difficulty": "moderate", @@ -11630,7 +15391,11 @@ { "query_id": 1292, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range?", "answer": "SELECT T3.`aCL IgG`, T3.`aCL IgM`, T3.`aCL IgA` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T1.SEX = 'F' AND T2.UA > 6.5 ORDER BY T2.UA DESC LIMIT 1", "difficulty": "challenging", @@ -11639,7 +15404,11 @@ { "query_id": 1293, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory", + "Patient" + ], "query": "What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?", "answer": "SELECT T2.ANA FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T1.ID = T3.ID WHERE T3.CRE < 1.5 ORDER BY T2.ANA DESC LIMIT 1", "difficulty": "moderate", @@ -11648,7 +15417,10 @@ { "query_id": 1294, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination" + ], "query": "Please list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest.", "answer": "SELECT T2.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.CRE < 1.5 ORDER BY T2.`aCL IgA` DESC LIMIT 1", "difficulty": "moderate", @@ -11657,7 +15429,11 @@ { "query_id": 1295, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "Among the patients whose total bilirubin is over the normal range, how many of them have a peripheral pattern observed in the sheet of ANA examination?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-BIL` >= 2 AND T3.`ANA Pattern` LIKE '%P%'", "difficulty": "challenging", @@ -11666,7 +15442,11 @@ { "query_id": 1296, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?", "answer": "SELECT T3.ANA FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-BIL` < 2.0 ORDER BY T2.`T-BIL` DESC LIMIT 1", "difficulty": "moderate", @@ -11675,7 +15455,11 @@ { "query_id": 1297, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "For the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-CHO` >= 250 AND T3.KCT = '-'", "difficulty": "moderate", @@ -11684,7 +15468,11 @@ { "query_id": 1298, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "Among the patients whose total cholesterol is within the normal range, how many of them have a P pattern observed in the sheet of ANA examination?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T3.`ANA Pattern` = 'P' AND T2.`T-CHO` < 250", "difficulty": "moderate", @@ -11693,7 +15481,10 @@ { "query_id": 1299, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "Among the patients with the normal level of triglyceride, how many of them have other symptoms observed?", "answer": "SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG < 200 AND T1.Symptoms IS NOT NULL", "difficulty": "simple", @@ -11702,7 +15493,10 @@ { "query_id": 1300, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Examination", + "Laboratory" + ], "query": "What is the disease name of the patient who has the highest level of triglyceride within the normal range?", "answer": "SELECT T1.Diagnosis FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG < 200 ORDER BY T2.TG DESC LIMIT 1", "difficulty": "moderate", @@ -11711,7 +15505,10 @@ { "query_id": 1301, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination" + ], "query": "Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.", "answer": "SELECT DISTINCT T1.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 0 AND T1.CPK < 250", "difficulty": "simple", @@ -11720,7 +15517,11 @@ { "query_id": 1302, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.CPK < 250 AND (T3.KCT = '+' OR T3.RVVT = '+' OR T3.LAC = '+')", "difficulty": "challenging", @@ -11729,7 +15530,10 @@ { "query_id": 1303, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "When is the birthday of the oldest patient whose blood glucose is abnormal?", "answer": "SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU > 180 ORDER BY T1.Birthday ASC LIMIT 1", "difficulty": "simple", @@ -11738,7 +15542,11 @@ { "query_id": 1304, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "Among the patients with a normal blood glucose, how many of them don't have thrombosis?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.GLU < 180 AND T3.Thrombosis = 0", "difficulty": "moderate", @@ -11747,7 +15555,10 @@ { "query_id": 1305, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients accepted to the hospital have a normal level of white blood cells?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'", "difficulty": "moderate", @@ -11756,7 +15567,10 @@ { "query_id": 1306, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "How many patients diagnosed with SLE have a normal white blood cell level?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.WBC BETWEEN 3.5 AND 9", "difficulty": "simple", @@ -11765,7 +15579,10 @@ { "query_id": 1307, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic.", "answer": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'", "difficulty": "challenging", @@ -11774,7 +15591,10 @@ { "query_id": 1308, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Among the patients who have a normal platelet level, how many of them have other symptoms observed?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT BETWEEN 100 AND 400 AND T1.Diagnosis IS NOT NULL", "difficulty": "moderate", @@ -11783,7 +15603,10 @@ { "query_id": 1309, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.", "answer": "SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400", "difficulty": "moderate", @@ -11792,7 +15615,10 @@ { "query_id": 1310, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Patient" + ], "query": "For the male patients that have a normal prothrombin time, what is their average prothrombin time?", "answer": "SELECT AVG(T2.PT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PT < 14 AND T1.SEX = 'M'", "difficulty": "simple", @@ -11801,7 +15627,11 @@ { "query_id": 1311, "database_id": "thrombosis_prediction", - "table_id": "N/A", + "table_id": [ + "Laboratory", + "Examination", + "Patient" + ], "query": "How many patients with severe thrombosis have a normal prothrombin time?", "answer": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.PT < 14 AND T3.Thrombosis < 3 AND T3.Thrombosis > 0", "difficulty": "moderate", @@ -11810,7 +15640,10 @@ { "query_id": 1312, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What's Angela Sanders's major?", "answer": "SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Angela' AND T1.last_name = 'Sanders'", "difficulty": "simple", @@ -11819,7 +15652,10 @@ { "query_id": 1313, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "How many students in the Student_Club are from the College of Engineering?", "answer": "SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.college = 'College of Engineering'", "difficulty": "simple", @@ -11828,7 +15664,10 @@ { "query_id": 1314, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Please list the full names of the students in the Student_Club that come from the Art and Design Department.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'Art and Design Department'", "difficulty": "simple", @@ -11837,7 +15676,10 @@ { "query_id": 1315, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "How many students of the Student_Club have attended the event \"Women's Soccer\"?", "answer": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'", "difficulty": "simple", @@ -11846,7 +15688,11 @@ { "query_id": 1316, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "Please list the phone numbers of the students from the Student_Club that has attended the event \"Women's Soccer\".", "answer": "SELECT T3.phone FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer'", "difficulty": "moderate", @@ -11855,7 +15701,11 @@ { "query_id": 1317, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "Among the students from the Student_Club who attended the event \"Women's Soccer\", how many of them want a T-shirt that's in medium size?", "answer": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer' AND T3.t_shirt_size = 'Medium'", "difficulty": "moderate", @@ -11864,7 +15714,10 @@ { "query_id": 1318, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "What is the event that has the highest attendance of the students from the Student_Club?", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_name ORDER BY COUNT(T2.link_to_event) DESC LIMIT 1", "difficulty": "simple", @@ -11873,7 +15726,10 @@ { "query_id": 1319, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Which college is the vice president of the Student_Club from?", "answer": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position LIKE 'vice president'", "difficulty": "simple", @@ -11882,7 +15738,11 @@ { "query_id": 1320, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "Please list the event names of all the events attended by Maya Mclean.", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Maya' AND T3.last_name = 'Mclean'", "difficulty": "simple", @@ -11891,7 +15751,11 @@ { "query_id": 1321, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "How many events of the Student_Club did Sacha Harrison attend in 2019?", "answer": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Sacha' AND T3.last_name = 'Harrison' AND SUBSTR(T1.event_date, 1, 4) = '2019'", "difficulty": "moderate", @@ -11900,7 +15764,10 @@ { "query_id": 1322, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "Among the events attended by more than 10 members of the Student_Club, how many of them are meetings?", "answer": "SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.type = 'Meeting' GROUP BY T1.type HAVING COUNT(T2.link_to_event) > 10", "difficulty": "moderate", @@ -11909,7 +15776,10 @@ { "query_id": 1323, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "Please list the names of all the events of the Student_Club that had an attendance of over 20 students.", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_id HAVING COUNT(T2.link_to_event) > 20", "difficulty": "moderate", @@ -11918,7 +15788,10 @@ { "query_id": 1324, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "What is the average attendance of meetings in 2020?", "answer": "SELECT CAST(COUNT(T2.link_to_event) AS REAL) / COUNT(DISTINCT T2.link_to_event) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE SUBSTR(T1.event_date, 1, 4) = '2020' AND T1.type = 'Meeting'", "difficulty": "moderate", @@ -11927,7 +15800,9 @@ { "query_id": 1325, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "What is the most expensive item that was spent in support of club events?", "answer": "SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1", "difficulty": "simple", @@ -11936,7 +15811,10 @@ { "query_id": 1326, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "How many members of the Student_Club have majored Environmental Engineering?\n", "answer": "SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Environmental Engineering'", "difficulty": "simple", @@ -11945,7 +15823,11 @@ { "query_id": 1327, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member", + "event" + ], "query": "List the full name of all the members of the Student_Club who attended the \"Laugh Out Loud\" event.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T3.event_name = 'Laugh Out Loud'", "difficulty": "moderate", @@ -11954,7 +15836,10 @@ { "query_id": 1328, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "List the last name of all the students who majored Law and Constitutional Studies. \n", "answer": "SELECT T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Law and Constitutional Studies'", "difficulty": "simple", @@ -11963,7 +15848,10 @@ { "query_id": 1329, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "What county did Sherri Ramsey grew up?", "answer": "SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sherri' AND T1.last_name = 'Ramsey'", "difficulty": "simple", @@ -11972,7 +15860,10 @@ { "query_id": 1330, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What college offers the major that Tyler Hewitt took?", "answer": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Tyler' AND T1.last_name = 'Hewitt'", "difficulty": "simple", @@ -11981,7 +15872,10 @@ { "query_id": 1331, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "What is the amount of the funds that the Vice President received?", "answer": "SELECT T2.amount FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'", "difficulty": "simple", @@ -11990,7 +15884,10 @@ { "query_id": 1332, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "How much did the Student_Club members spend on food in September Meeting?", "answer": "SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Food' AND SUBSTR(T1.event_date, 6, 2) = '09'", "difficulty": "moderate", @@ -11999,7 +15896,10 @@ { "query_id": 1333, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "What city and state did the President of the Student_Club grow up?", "answer": "SELECT T2.city, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.position = 'President'", "difficulty": "simple", @@ -12008,7 +15908,10 @@ { "query_id": 1334, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "List the full name of the Student_Club members that grew up in Illinois state.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T2.state = 'Illinois'", "difficulty": "simple", @@ -12017,7 +15920,10 @@ { "query_id": 1335, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "How much did the Student_Club members spend on advertisement in September Meeting?", "answer": "SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Advertisement' AND SUBSTR(T1.event_date, 6, 2) = '09'", "difficulty": "moderate", @@ -12026,7 +15932,10 @@ { "query_id": 1336, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What department offers the major that Pierce and Guidi took?", "answer": "SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.last_name = 'Pierce' OR T1.last_name = 'Guidi'", "difficulty": "simple", @@ -12035,7 +15944,10 @@ { "query_id": 1337, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "What is the total budgeted amount for all category in \"October Speaker\" event?", "answer": "SELECT SUM(T2.amount) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'October Speaker'", "difficulty": "simple", @@ -12044,7 +15956,11 @@ { "query_id": 1338, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Was each expense in October Meeting on October 8, 2019 approved?", "answer": "SELECT T3.approved FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'October Meeting' AND T1.event_date LIKE '2019-10-08%'", "difficulty": "moderate", @@ -12053,7 +15969,10 @@ { "query_id": 1339, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "Calculate the total average cost that Elijah Allen spent in the events on September and October.", "answer": "SELECT AVG(T2.cost) FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.last_name = 'Allen' AND T1.first_name = 'Elijah' AND (SUBSTR(T2.expense_date, 6, 2) = '09' OR SUBSTR(T2.expense_date, 6, 2) = '10')", "difficulty": "challenging", @@ -12062,7 +15981,10 @@ { "query_id": 1340, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020.", "answer": "SELECT SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2019' THEN T2.spent ELSE 0 END) - SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2020' THEN T2.spent ELSE 0 END) AS num FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event", "difficulty": "moderate", @@ -12071,7 +15993,9 @@ { "query_id": 1341, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event" + ], "query": "Give the location for \"Spring Budget Review\".", "answer": "SELECT location FROM event WHERE event_name = 'Spring Budget Review'", "difficulty": "simple", @@ -12080,7 +16004,9 @@ { "query_id": 1342, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "What was the cost for the \"Posters\" on 2019/9/4?", "answer": "SELECT cost FROM expense WHERE expense_description = 'Posters' AND expense_date = '2019-09-04'", "difficulty": "simple", @@ -12089,7 +16015,9 @@ { "query_id": 1343, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "With the biggest budget for the \"Food\", what was the remaining of it?", "answer": "SELECT remaining FROM budget WHERE category = 'Food' AND amount = ( SELECT MAX(amount) FROM budget WHERE category = 'Food' )", "difficulty": "simple", @@ -12098,7 +16026,9 @@ { "query_id": 1344, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "income" + ], "query": "What was the notes of the fundraising on 2019/9/14?", "answer": "SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'", "difficulty": "simple", @@ -12107,7 +16037,9 @@ { "query_id": 1345, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major" + ], "query": "How many majors are there in \"College of Humanities and Social Sciences\"?", "answer": "SELECT COUNT(major_name) FROM major WHERE college = 'College of Humanities and Social Sciences'", "difficulty": "simple", @@ -12116,7 +16048,9 @@ { "query_id": 1346, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "Tell the phone number of \"Carlo Jacobs\".", "answer": "SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'", "difficulty": "simple", @@ -12125,7 +16059,10 @@ { "query_id": 1347, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Tell the hometown county for \"Adela O'Gallagher\".", "answer": "SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Adela' AND T1.last_name = 'O''Gallagher'", "difficulty": "simple", @@ -12134,7 +16071,10 @@ { "query_id": 1348, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "For all the budgets for \"November Meeting\", how many of them had exceeded the budget?", "answer": "SELECT COUNT(T2.event_id) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Meeting' AND T1.remaining < 0", "difficulty": "simple", @@ -12143,7 +16083,10 @@ { "query_id": 1349, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Provide the total number of the budget amount for \"September Speaker\" event.", "answer": "SELECT SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'September Speaker'", "difficulty": "simple", @@ -12152,7 +16095,10 @@ { "query_id": 1350, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget", + "expense" + ], "query": "What is the status of the event which bought \"Post Cards, Posters\" on 2019/8/20?", "answer": "SELECT T1.event_status FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget WHERE T2.expense_description = 'Post Cards, Posters' AND T2.expense_date = '2019-08-20'", "difficulty": "moderate", @@ -12161,7 +16107,10 @@ { "query_id": 1351, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What was Brent Thomason's major?", "answer": "SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Brent' AND T1.last_name = 'Thomason'", "difficulty": "simple", @@ -12170,7 +16119,10 @@ { "query_id": 1352, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "For all the club members from \"Human Development and Family Studies\" major, how many of them wear large size t-shirt?", "answer": "SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Human Development AND Family Studies' AND T1.t_shirt_size = 'Large'", "difficulty": "moderate", @@ -12179,7 +16131,10 @@ { "query_id": 1353, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "What's Christof Nielson's zip code type?", "answer": "SELECT T2.type FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Christof' AND T1.last_name = 'Nielson'", "difficulty": "simple", @@ -12188,7 +16143,10 @@ { "query_id": 1354, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "State the major name for the Vice President of the club.", "answer": "SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'Vice President'", "difficulty": "simple", @@ -12197,7 +16155,10 @@ { "query_id": 1355, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Where is the hometown state for \"Sacha Harrison\"?", "answer": "SELECT T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'", "difficulty": "simple", @@ -12206,7 +16167,10 @@ { "query_id": 1356, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Which department was the President of the club in?", "answer": "SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'", "difficulty": "simple", @@ -12215,7 +16179,10 @@ { "query_id": 1357, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "State the date Connor Hilton paid his/her dues.", "answer": "SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Connor' AND T1.last_name = 'Hilton' AND T2.source = 'Dues'", "difficulty": "simple", @@ -12224,7 +16191,10 @@ { "query_id": 1358, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "Who was the first one paid his/her dues? Tell the full name.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.source = 'Dues' ORDER BY T2.date_received LIMIT 1", "difficulty": "simple", @@ -12233,7 +16203,10 @@ { "query_id": 1359, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "How many times was the budget in Advertisement for \"Yearly Kickoff\" meeting more than \"October Meeting\"?", "answer": "SELECT CAST(SUM(CASE WHEN T2.event_name = 'Yearly Kickoff' THEN T1.amount ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.event_name = 'October Meeting' THEN T1.amount ELSE 0 END) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' AND T2.type = 'Meeting'", "difficulty": "challenging", @@ -12242,7 +16215,10 @@ { "query_id": 1360, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "What percentage was the budget for Parking to the total budget for the \"November Speaker\"?", "answer": "SELECT CAST(SUM(CASE WHEN T1.category = 'Parking' THEN T1.amount ELSE 0 END) AS REAL) * 100 / SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Speaker'", "difficulty": "moderate", @@ -12251,7 +16227,9 @@ { "query_id": 1361, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "What is the total cost of the pizzas for all the events?", "answer": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'", "difficulty": "simple", @@ -12260,7 +16238,9 @@ { "query_id": 1362, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code" + ], "query": "How many cities are there in Orange County, Virginia?", "answer": "SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'", "difficulty": "simple", @@ -12269,7 +16249,9 @@ { "query_id": 1363, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major" + ], "query": "List all of the College of Humanities and Social Sciences' departments.", "answer": "SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences'", "difficulty": "simple", @@ -12278,7 +16260,10 @@ { "query_id": 1364, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Where is Amy Firth's hometown?", "answer": "SELECT T2.city, T2.county, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Amy' AND T1.last_name = 'Firth'", "difficulty": "simple", @@ -12287,7 +16272,10 @@ { "query_id": 1365, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget", + "expense" + ], "query": "What are the expenses of the budget with the lowest remaining?", "answer": "SELECT T2.expense_description FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget ORDER BY T1.remaining LIMIT 1", "difficulty": "simple", @@ -12296,7 +16284,11 @@ { "query_id": 1366, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "List all the members who attended the event \"October Meeting\".", "answer": "SELECT DISTINCT T3.member_id FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'October Meeting'", "difficulty": "simple", @@ -12305,7 +16297,10 @@ { "query_id": 1367, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Which college do most of the members go to?", "answer": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id GROUP BY T2.major_id ORDER BY COUNT(T2.college) DESC LIMIT 1", "difficulty": "simple", @@ -12314,7 +16309,10 @@ { "query_id": 1368, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What does the person with the phone number \"809-555-3360\" major in?", "answer": "SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.phone = '809-555-3360'", "difficulty": "simple", @@ -12323,7 +16321,10 @@ { "query_id": 1369, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Which event has the highest budget amount?", "answer": "SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id ORDER BY T1.amount DESC LIMIT 1", "difficulty": "simple", @@ -12332,7 +16333,10 @@ { "query_id": 1370, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "List all the expenses incurred by the vice president.", "answer": "SELECT T2.expense_id, T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'", "difficulty": "simple", @@ -12341,7 +16345,10 @@ { "query_id": 1371, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "How many members attended the \"Women's Soccer\" event?", "answer": "SELECT COUNT(T2.link_to_member) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'", "difficulty": "simple", @@ -12350,7 +16357,10 @@ { "query_id": 1372, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "When did the member, Casey Mason, received the income?", "answer": "SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Casey' AND T1.last_name = 'Mason'", "difficulty": "simple", @@ -12359,7 +16369,10 @@ { "query_id": 1373, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "How many of the members' hometowns are from Maryland state?", "answer": "SELECT COUNT(T2.member_id) FROM zip_code AS T1 INNER JOIN member AS T2 ON T1.zip_code = T2.zip WHERE T1.state = 'Maryland'", "difficulty": "simple", @@ -12368,7 +16381,10 @@ { "query_id": 1374, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member" + ], "query": "How many events did the member with the phone number \"954-555-6240\" attend?", "answer": "SELECT COUNT(T2.link_to_event) FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member WHERE T1.phone = '954-555-6240'", "difficulty": "simple", @@ -12377,7 +16393,10 @@ { "query_id": 1375, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "List all the members of the \"School of Applied Sciences, Technology and Education\" department.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'School of Applied Sciences, Technology and Education'", "difficulty": "moderate", @@ -12386,7 +16405,10 @@ { "query_id": 1376, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Among all the closed events, which event has the highest spend-to-budget ratio?", "answer": "SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.status = 'Closed' ORDER BY T1.spent / T1.amount DESC LIMIT 1", "difficulty": "moderate", @@ -12395,7 +16417,9 @@ { "query_id": 1377, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "How many student have the position of president?", "answer": "SELECT COUNT(member_id) FROM member WHERE position = 'President'", "difficulty": "simple", @@ -12404,7 +16428,9 @@ { "query_id": 1378, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "What is the highest amount of budget spend for an event?", "answer": "SELECT MAX(spent) FROM budget", "difficulty": "simple", @@ -12413,7 +16439,9 @@ { "query_id": 1379, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event" + ], "query": "How many meeting events were held in 2020?", "answer": "SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND SUBSTR(event_date, 1, 4) = '2020'", "difficulty": "simple", @@ -12422,7 +16450,9 @@ { "query_id": 1380, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "What is the total amount of money spent for food?", "answer": "SELECT SUM(spent) FROM budget WHERE category = 'Food'", "difficulty": "simple", @@ -12431,7 +16461,10 @@ { "query_id": 1381, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member" + ], "query": "List the name of students that have attended more than 7 events.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member GROUP BY T2.link_to_member HAVING COUNT(T2.link_to_event) > 7", "difficulty": "moderate", @@ -12440,7 +16473,12 @@ { "query_id": 1382, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "attendance", + "member", + "event" + ], "query": "Among the students majored in interior design, who have attended the Community Theater event?", "answer": "SELECT T2.first_name, T2.last_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id WHERE T4.event_name = 'Community Theater' AND T1.major_name = 'Interior Design'", "difficulty": "moderate", @@ -12449,7 +16487,10 @@ { "query_id": 1383, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "State the name of students from Georgetown, South Carolina.", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T2.city = 'Georgetown' AND T2.state = 'South Carolina'", "difficulty": "simple", @@ -12458,7 +16499,10 @@ { "query_id": 1384, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "How many income generated by Grant Gilmour?", "answer": "SELECT T2.amount FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Grant' AND T1.last_name = 'Gilmour'", "difficulty": "simple", @@ -12467,7 +16511,10 @@ { "query_id": 1385, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "Which student was able to generate income more than $40?", "answer": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.amount > 40", "difficulty": "simple", @@ -12476,7 +16523,11 @@ { "query_id": 1386, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "What is the total expense for the Yearly Kickoff?", "answer": "SELECT SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'Yearly Kickoff'", "difficulty": "simple", @@ -12485,7 +16536,12 @@ { "query_id": 1387, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "event", + "budget", + "expense" + ], "query": "Which student has been entrusted to manage the budget for the Yearly Kickoff?", "answer": "SELECT T4.first_name, T4.last_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget INNER JOIN member AS T4 ON T3.link_to_member = T4.member_id WHERE T1.event_name = 'Yearly Kickoff'", "difficulty": "moderate", @@ -12494,7 +16550,10 @@ { "query_id": 1388, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "Which students manage to generate the highest income. State his/her full name along with the income source.", "answer": "SELECT T1.first_name, T1.last_name, T2.source FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name, T2.source ORDER BY SUM(T2.amount) DESC LIMIT 1", "difficulty": "moderate", @@ -12503,7 +16562,11 @@ { "query_id": 1389, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Which event has the lowest cost?", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget ORDER BY T3.cost LIMIT 1", "difficulty": "simple", @@ -12512,7 +16575,11 @@ { "query_id": 1390, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event?", "answer": "SELECT CAST(SUM(CASE WHEN T1.event_name = 'Yearly Kickoff' THEN T3.cost ELSE 0 END) AS REAL) * 100 / SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget", "difficulty": "moderate", @@ -12521,7 +16588,9 @@ { "query_id": 1391, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major" + ], "query": "What is the ratio between students majored in finance and physics?", "answer": "SELECT SUM(CASE WHEN major_name = 'Finance' THEN 1 ELSE 0 END) / SUM(CASE WHEN major_name = 'Physics' THEN 1 ELSE 0 END) AS ratio FROM major", "difficulty": "simple", @@ -12530,7 +16599,9 @@ { "query_id": 1392, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "income" + ], "query": "Indicate the top source of funds received in September 2019 based on their amount.", "answer": "SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' and '2019-09-30' ORDER BY source DESC LIMIT 1", "difficulty": "simple", @@ -12539,7 +16610,9 @@ { "query_id": 1393, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "Provide the full name and email address of the Student_Club's Secretary.", "answer": "SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'", "difficulty": "simple", @@ -12548,7 +16621,10 @@ { "query_id": 1394, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "How many members of the Student_Club have major in 'Physics Teaching'?", "answer": "SELECT COUNT(T2.member_id) FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Physics Teaching'", "difficulty": "simple", @@ -12557,7 +16633,10 @@ { "query_id": 1395, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "event" + ], "query": "How many members did attend the event 'Community Theater' in 2019?", "answer": "SELECT COUNT(T2.link_to_member) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Community Theater' AND SUBSTR(T1.event_date, 1, 4) = '2019'", "difficulty": "moderate", @@ -12566,7 +16645,11 @@ { "query_id": 1396, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "attendance", + "member" + ], "query": "Provide the number of events attended by Luisa Guidi. What is her major?", "answer": "SELECT COUNT(T3.link_to_event), T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T2.first_name = 'Luisa' AND T2.last_name = 'Guidi'", "difficulty": "simple", @@ -12575,7 +16658,9 @@ { "query_id": 1397, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "On average, how much did the Student_Club spend on food for the typical event in the past?", "answer": "SELECT SUM(spent) / COUNT(spent) FROM budget WHERE category = 'Food' AND event_status = 'Closed'", "difficulty": "simple", @@ -12584,7 +16669,10 @@ { "query_id": 1398, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Name the event with the highest amount spent on advertisement.", "answer": "SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' ORDER BY T1.spent DESC LIMIT 1", "difficulty": "moderate", @@ -12593,7 +16681,11 @@ { "query_id": 1399, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member", + "event" + ], "query": "Did Maya Mclean attend the 'Women's Soccer' event?", "answer": "SELECT CASE WHEN T3.event_name = 'Women''s Soccer' THEN 'YES' END AS result FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T1.first_name = 'Maya' AND T1.last_name = 'Mclean'", "difficulty": "moderate", @@ -12602,7 +16694,9 @@ { "query_id": 1400, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event" + ], "query": "Among all events hold by the Student_Club in 2019, find the percentage share of events related to 'Community Service'", "answer": "SELECT CAST(SUM(CASE WHEN type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(type) FROM event WHERE SUBSTR(event_date, 1, 4) = '2019'", "difficulty": "moderate", @@ -12611,7 +16705,11 @@ { "query_id": 1401, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Indicate the cost of posters for 'September Speaker' event.", "answer": "SELECT T3.cost FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'September Speaker' AND T3.expense_description = 'Posters'", "difficulty": "moderate", @@ -12620,7 +16718,9 @@ { "query_id": 1402, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "What is the most popular size of t-shirt ordered by the club members?", "answer": "SELECT t_shirt_size FROM member GROUP BY t_shirt_size ORDER BY COUNT(t_shirt_size) DESC LIMIT 1", "difficulty": "simple", @@ -12629,7 +16729,10 @@ { "query_id": 1403, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Indicate the name of the closed event whose cost has exceeded the budget the most.", "answer": "SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event WHERE T1.event_status = 'Closed' AND T1.remaining < 0 ORDER BY T1.remaining LIMIT 1", "difficulty": "moderate", @@ -12638,7 +16741,11 @@ { "query_id": 1404, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Identify the type of expenses and their total value approved for 'October Meeting' event.", "answer": "SELECT T1.type, SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'October Meeting'", "difficulty": "moderate", @@ -12647,7 +16754,10 @@ { "query_id": 1405, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Calculate the amount budgeted for 'April Speaker' event. List all the budgeted categories for said event in an ascending order based on their amount.", "answer": "SELECT SUM(T2.amount), T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'April Speaker' ORDER BY T2.amount", "difficulty": "moderate", @@ -12656,7 +16766,9 @@ { "query_id": 1406, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "Among the budgets for Food, which one has the highest budgeted amount?", "answer": "SELECT budget_id FROM budget WHERE category = 'Food' AND amount = ( SELECT MAX(amount) FROM budget )", "difficulty": "simple", @@ -12665,7 +16777,9 @@ { "query_id": 1407, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "Among the budgets for Advertising, list out top three which have the most budgeted amount?", "answer": "SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3", "difficulty": "simple", @@ -12674,7 +16788,9 @@ { "query_id": 1408, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "Calculate the total cost spent for Parking in the list.", "answer": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Parking'", "difficulty": "simple", @@ -12683,7 +16799,9 @@ { "query_id": 1409, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "Mention the total expense used on 8/20/2019.", "answer": "SELECT SUM(cost) FROM expense WHERE expense_date = '2019-08-20'", "difficulty": "simple", @@ -12692,7 +16810,10 @@ { "query_id": 1410, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "List out the full name and total cost that member id \"rec4BLdZHS2Blfp4v\" incurred?", "answer": "SELECT T1.first_name, T1.last_name, SUM(T2.cost) FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.member_id = 'rec4BLdZHS2Blfp4v'", "difficulty": "simple", @@ -12701,7 +16822,10 @@ { "query_id": 1411, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "State what kind of expenses that Sacha Harrison incurred?", "answer": "SELECT T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'", "difficulty": "simple", @@ -12710,7 +16834,10 @@ { "query_id": 1412, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "What kind of expenses incurred by members who have X-Large in size of tee shirt?", "answer": "SELECT T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.t_shirt_size = 'X-Large'", "difficulty": "simple", @@ -12719,7 +16846,10 @@ { "query_id": 1413, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "Mention the zip code of member who incurred less than 50USD.", "answer": "SELECT T1.zip FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T2.cost < 50", "difficulty": "simple", @@ -12728,7 +16858,10 @@ { "query_id": 1414, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "State the name of major that Phillip Cullen has joined.", "answer": "SELECT T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T2.first_name = 'Phillip' AND T2.last_name = 'Cullen'", "difficulty": "simple", @@ -12737,7 +16870,10 @@ { "query_id": 1415, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "List out the position of members who joined major of Business.", "answer": "SELECT T2.position FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Business'", "difficulty": "simple", @@ -12746,7 +16882,10 @@ { "query_id": 1416, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "How many members of Business have the Medium size of tee shirt?", "answer": "SELECT COUNT(T2.member_id) FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Business' AND T2.t_shirt_size = 'Medium'", "difficulty": "simple", @@ -12755,7 +16894,10 @@ { "query_id": 1417, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "List out the type of events which have remaining budget more than 30 USD.", "answer": "SELECT T1.type FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.remaining > 30", "difficulty": "simple", @@ -12764,7 +16906,10 @@ { "query_id": 1418, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Mention the category of events which were held at MU 215.", "answer": "SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215'", "difficulty": "simple", @@ -12773,7 +16918,10 @@ { "query_id": 1419, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "What is the category of event which was taken place in 2020-03-24T12:00:00?", "answer": "SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_date = '2020-03-24T12:00:00'", "difficulty": "simple", @@ -12782,7 +16930,10 @@ { "query_id": 1420, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "State the name of major that Vice President has joined.", "answer": "SELECT T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T2.position = 'Vice President'", "difficulty": "simple", @@ -12791,7 +16942,10 @@ { "query_id": 1421, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Calculate the percentage of members who are major Mathematics in the list?", "answer": "SELECT CAST(SUM(CASE WHEN T2.major_name = 'Mathematics' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Member'", "difficulty": "moderate", @@ -12800,7 +16954,10 @@ { "query_id": 1422, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "State the category of events were held at MU 215.", "answer": "SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215'", "difficulty": "simple", @@ -12809,7 +16966,9 @@ { "query_id": 1423, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "income" + ], "query": "How many income are received with an amount of 50?", "answer": "SELECT COUNT(income_id) FROM income WHERE amount = 50", "difficulty": "simple", @@ -12818,7 +16977,9 @@ { "query_id": 1424, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "Among the members, how many of them have an extra large t-shirt size?", "answer": "SELECT COUNT(member_id) FROM member WHERE position = 'Member' AND t_shirt_size = 'X-Large'", "difficulty": "simple", @@ -12827,7 +16988,9 @@ { "query_id": 1425, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major" + ], "query": "In the College of Agriculture and Applied Sciences, how many majors are under the department of School of Applied Sciences, Technology and Education?", "answer": "SELECT COUNT(major_id) FROM major WHERE department = 'School of Applied Sciences, Technology AND Education' AND college = 'College of Agriculture AND Applied Sciences'", "difficulty": "simple", @@ -12836,7 +16999,10 @@ { "query_id": 1426, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "List the last name of members with a major in environmental engineering and include its department and college name.", "answer": "SELECT T2.last_name, T1.department, T1.college FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T2.position = 'Member' AND T1.major_name = 'Environmental Engineering'", "difficulty": "moderate", @@ -12845,7 +17011,10 @@ { "query_id": 1427, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "What are the budget category of the events located at MU 215 and a guest speaker type with a 0 budget spent?", "answer": "SELECT DISTINCT T2.category, T1.type FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215' AND T2.spent = 0 AND T1.type = 'Guest Speaker'", "difficulty": "moderate", @@ -12854,7 +17023,11 @@ { "query_id": 1428, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "major", + "member" + ], "query": "List the city and state of members enrolled under electrical and computer engineering department.", "answer": "SELECT city, state FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major INNER JOIN zip_code AS T3 ON T3.zip_code = T1.zip WHERE department = 'Electrical and Computer Engineering Department' AND position = 'Member'", "difficulty": "moderate", @@ -12863,7 +17036,11 @@ { "query_id": 1429, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "What is the name of the social event that was attended by the vice president of the Student_Club located at 900 E. Washington St.?", "answer": "SELECT T2.event_name FROM attendance AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id WHERE T3.position = 'Vice President' AND T2.location = '900 E. Washington St.' AND T2.type = 'Social'", "difficulty": "challenging", @@ -12872,7 +17049,10 @@ { "query_id": 1430, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "What is the last name and position of the student that bought pizza on 09/10/2019?", "answer": "SELECT T1.last_name, T1.position FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T2.expense_date = '2019-09-10' AND T2.expense_description = 'Pizza'", "difficulty": "moderate", @@ -12881,7 +17061,11 @@ { "query_id": 1431, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event" + ], "query": "List the last name of the members of the club that attended the women's soccer event.", "answer": "SELECT T3.last_name FROM attendance AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id WHERE T2.event_name = 'Women''s Soccer' AND T3.position = 'Member'", "difficulty": "moderate", @@ -12890,7 +17074,10 @@ { "query_id": 1432, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "income" + ], "query": "Among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the Student_Club?", "answer": "SELECT CAST(SUM(CASE WHEN T2.amount = 50 THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(T2.income_id) FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Member' AND T1.t_shirt_size = 'Medium'", "difficulty": "moderate", @@ -12899,7 +17086,9 @@ { "query_id": 1433, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code" + ], "query": "Which countries have zip codes with post office boxes?", "answer": "SELECT DISTINCT county FROM zip_code WHERE type = 'PO Box' AND county IS NOT NULL", "difficulty": "simple", @@ -12908,7 +17097,9 @@ { "query_id": 1434, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code" + ], "query": "What are the zip codes that have post office boxes in the country of the country of San Juan Municipio whose state is Puerto Rico?", "answer": "SELECT zip_code FROM zip_code WHERE type = 'PO Box' AND county = 'San Juan Municipio' AND state = 'Puerto Rico'", "difficulty": "simple", @@ -12917,7 +17108,9 @@ { "query_id": 1435, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event" + ], "query": "List the names of closed event as \"game\" that was closed from 3/15/2019 to 3/20/2020.", "answer": "SELECT DISTINCT event_name FROM event WHERE type = 'Game' AND date(SUBSTR(event_date, 1, 10)) BETWEEN '2019-03-15' AND '2020-03-20' AND status = 'Closed'", "difficulty": "moderate", @@ -12926,7 +17119,11 @@ { "query_id": 1436, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member", + "expense" + ], "query": "Please provide links to events for members who have paid more than 50 dollar.", "answer": "SELECT DISTINCT T3.link_to_event FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T1.cost > 50", "difficulty": "simple", @@ -12935,7 +17132,11 @@ { "query_id": 1437, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "attendance", + "member", + "expense" + ], "query": "Which members who were approved from 1/10/2019 to 11/19/2019? Please identify the member who attended the event and the link to their event.", "answer": "SELECT DISTINCT T1.link_to_member, T3.link_to_event FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE date(SUBSTR(T1.expense_date, 1, 10)) BETWEEN '2019-01-10' AND '2019-11-19' AND T1.approved = 'true'", "difficulty": "challenging", @@ -12944,7 +17145,10 @@ { "query_id": 1438, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Please indicate the college of the person whose first name is Katy with the link to the major \"rec1N0upiVLy5esTO\".", "answer": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.link_to_major = 'rec1N0upiVLy5esTO' AND T1.first_name = 'Katy'", "difficulty": "simple", @@ -12953,7 +17157,10 @@ { "query_id": 1439, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Please list the phone numbers of the members who majored in business at the College of Agriculture and Applied Sciences.", "answer": "SELECT T1.phone FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T2.major_name = 'Business' AND T2.college = 'College of Agriculture and Applied Sciences'", "difficulty": "moderate", @@ -12962,7 +17169,10 @@ { "query_id": 1440, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019.", "answer": "SELECT DISTINCT T1.email FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE date(SUBSTR(T2.expense_date, 1, 10)) BETWEEN '2019-09-10' AND '2019-11-19' AND T2.cost > 20", "difficulty": "moderate", @@ -12971,7 +17181,10 @@ { "query_id": 1441, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "How many members have education major in the College of Education & Human Services?", "answer": "SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Member' AND T2.major_name LIKE '%Education%' AND T2.college = 'College of Education & Human Services'", "difficulty": "moderate", @@ -12980,7 +17193,9 @@ { "query_id": 1442, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget" + ], "query": "What is the percentage of the events that went over budget?", "answer": "SELECT CAST(SUM(CASE WHEN remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(budget_id) FROM budget", "difficulty": "simple", @@ -12989,7 +17204,9 @@ { "query_id": 1443, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event" + ], "query": "Give the event ID, location, and status of events conducted from November 2019 to March 2020.", "answer": "SELECT event_id, location, status FROM event WHERE date(SUBSTR(event_date, 1, 10)) BETWEEN '2019-11-01' AND '2020-03-31'", "difficulty": "simple", @@ -12998,7 +17215,9 @@ { "query_id": 1444, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "expense" + ], "query": "List the expenses that spend more than fifty dollars on average.", "answer": "SELECT expense_description FROM expense GROUP BY expense_description HAVING AVG(cost) > 50", "difficulty": "simple", @@ -13007,7 +17226,9 @@ { "query_id": 1445, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member" + ], "query": "Find the full name of members whose t-shirt size is extra large.", "answer": "SELECT first_name, last_name FROM member WHERE t_shirt_size = 'X-Large'", "difficulty": "simple", @@ -13016,7 +17237,9 @@ { "query_id": 1446, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code" + ], "query": "Calculate the percentage of zip codes that are PO boxes.", "answer": "SELECT CAST(SUM(CASE WHEN type = 'PO box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code", "difficulty": "simple", @@ -13025,7 +17248,10 @@ { "query_id": 1447, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "List the name and location of events that underspend its budget.", "answer": "SELECT DISTINCT T1.event_name, T1.location FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.remaining > 0", "difficulty": "simple", @@ -13034,7 +17260,11 @@ { "query_id": 1448, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.", "answer": "SELECT T1.event_name, T1.event_date FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T3.expense_description = 'Pizza' AND T3.cost > 50 AND T3.cost < 100", "difficulty": "challenging", @@ -13043,7 +17273,11 @@ { "query_id": 1449, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member", + "expense" + ], "query": "What is the name and major of members who had to spend more than a hundred dollars on an expense?", "answer": "SELECT DISTINCT T1.first_name, T1.last_name, T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major INNER JOIN expense AS T3 ON T1.member_id = T3.link_to_member WHERE T3.cost > 100", "difficulty": "moderate", @@ -13052,7 +17286,11 @@ { "query_id": 1450, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "zip_code", + "income" + ], "query": "In the events with more than forty incomes, list the city and country in which the event is happening.", "answer": "SELECT DISTINCT T3.city, T3.county FROM income AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN zip_code AS T3 ON T3.zip_code = T2.zip WHERE T1.amount > 40", "difficulty": "simple", @@ -13061,7 +17299,12 @@ { "query_id": 1451, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "budget", + "expense", + "event" + ], "query": "Among the members who incurred expenses in more than one event, who paid the most amount?", "answer": "SELECT T2.member_id FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN budget AS T3 ON T1.link_to_budget = T3.budget_id INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id GROUP BY T2.member_id HAVING COUNT(DISTINCT T4.event_id) > 1 ORDER BY SUM(T1.cost) DESC LIMIT 1", "difficulty": "challenging", @@ -13070,7 +17313,10 @@ { "query_id": 1452, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "What is the average amount paid by students in a position other than a member?", "answer": "SELECT AVG(T1.cost) FROM expense AS T1 INNER JOIN member as T2 ON T1.link_to_member = T2.member_id WHERE T2.position != 'Member'", "difficulty": "moderate", @@ -13079,7 +17325,11 @@ { "query_id": 1453, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "List the name of events with less than average parking cost.", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T2.category = 'Parking' AND T3.cost < (SELECT AVG(cost) FROM expense)", "difficulty": "moderate", @@ -13088,7 +17338,11 @@ { "query_id": 1454, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget", + "expense" + ], "query": "What is the percentage of the cost for the game events?", "answer": "SELECT SUM(CASE WHEN T1.type = 'Game' THEN T3.cost ELSE 0 END) * 100 / SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget", "difficulty": "moderate", @@ -13097,7 +17351,10 @@ { "query_id": 1455, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget", + "expense" + ], "query": "Which budget allowed the most money for water, chips, and cookies?", "answer": "SELECT T2.budget_id FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Water, chips, cookies' ORDER BY T1.cost DESC LIMIT 1", "difficulty": "moderate", @@ -13106,7 +17363,11 @@ { "query_id": 1456, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "budget", + "expense" + ], "query": "List the full name of the top five members who spend the most money in the descending order of spending.", "answer": "SELECT T3.first_name, T3.last_name FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id ORDER BY T2.spent DESC LIMIT 5", "difficulty": "moderate", @@ -13115,7 +17376,11 @@ { "query_id": 1457, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "budget", + "expense" + ], "query": "Give the full name and contact number of members who had to spend more than average on each expense.", "answer": "SELECT DISTINCT T3.first_name, T3.last_name, T3.phone FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id INNER JOIN member AS T3 ON T3.member_id = T1.link_to_member WHERE T1.cost > ( SELECT AVG(T1.cost) FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id INNER JOIN member AS T3 ON T3.member_id = T1.link_to_member )", "difficulty": "challenging", @@ -13124,7 +17389,10 @@ { "query_id": 1458, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Calculate the difference in the percentage of members in Maine and Vermont.", "answer": "SELECT CAST((SUM(CASE WHEN T2.state = 'Maine' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.state = 'Vermont' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.member_id) AS diff FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip", "difficulty": "moderate", @@ -13133,7 +17401,10 @@ { "query_id": 1459, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "What is the major of Garrett Gerke and which department does it belong to?", "answer": "SELECT T2.major_name, T2.department FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.first_name = 'Garrett' AND T1.last_name = 'Gerke'", "difficulty": "simple", @@ -13142,7 +17413,10 @@ { "query_id": 1460, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "expense" + ], "query": "Write the full name of the member who spent money for water, veggie tray and supplies and include the cost of it.", "answer": "SELECT T2.first_name, T2.last_name, T1.cost FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.expense_description = 'Water, Veggie tray, supplies'", "difficulty": "challenging", @@ -13151,7 +17425,10 @@ { "query_id": 1461, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "List the last names of students under the Elementary Education major and include their phone numbers.", "answer": "SELECT T1.last_name, T1.phone FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T2.major_name = 'Elementary Education'", "difficulty": "simple", @@ -13160,7 +17437,10 @@ { "query_id": 1462, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "What category was budgeted for the 'January Speaker' event and how much was the amount budgeted for that category?", "answer": "SELECT T2.category, T2.amount FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'January Speaker'", "difficulty": "simple", @@ -13169,7 +17449,10 @@ { "query_id": 1463, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "List the event names which were budgeted for the food.", "answer": "SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.category = 'Food'", "difficulty": "simple", @@ -13178,7 +17461,12 @@ { "query_id": 1464, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "member", + "attendance", + "event", + "income" + ], "query": "Write the full names of students who received funds on the date of 9/9/2019 and include the amount received.", "answer": "SELECT DISTINCT T3.first_name, T3.last_name, T4.amount FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T3.member_id = T2.link_to_member INNER JOIN income AS T4 ON T4.link_to_member = T3.member_id WHERE T4.date_received = '2019-09-09'", "difficulty": "challenging", @@ -13187,7 +17475,10 @@ { "query_id": 1465, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "budget", + "expense" + ], "query": "Which budget category does the expense 'Posters' fall to?", "answer": "SELECT DISTINCT T2.category FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Posters'", "difficulty": "simple", @@ -13196,7 +17487,10 @@ { "query_id": 1466, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "major", + "member" + ], "query": "Write the full name of the club member with the position of 'Secretary' and list which college the club member belongs to.", "answer": "SELECT T1.first_name, T1.last_name, college FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Secretary'", "difficulty": "simple", @@ -13205,7 +17499,10 @@ { "query_id": 1467, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "event", + "budget" + ], "query": "Calculate the total amount spent on speaker gifts and list the name of the event they were spent on.", "answer": "SELECT SUM(T1.spent), T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Speaker Gifts'", "difficulty": "simple", @@ -13214,7 +17511,10 @@ { "query_id": 1468, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Where is the hometown of Garrett Girke?", "answer": "SELECT T2.city FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip WHERE T1.first_name = 'Garrett' AND T1.last_name = 'Gerke'", "difficulty": "simple", @@ -13223,7 +17523,10 @@ { "query_id": 1469, "database_id": "student_club", - "table_id": "N/A", + "table_id": [ + "zip_code", + "member" + ], "query": "Which student has the hometown of Lincolnton, North Carolina with the zip code of 28092? List their full name and position.", "answer": "SELECT T1.first_name, T1.last_name, T1.position FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip WHERE T2.city = 'Lincolnton' AND T2.state = 'North Carolina' AND T2.zip_code = 28092", "difficulty": "moderate", @@ -13232,7 +17535,9 @@ { "query_id": 1470, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations" + ], "query": "How many gas stations in CZE has Premium gas?", "answer": "SELECT COUNT(GasStationID) FROM gasstations WHERE Country = 'CZE' AND Segment = 'Premium'", "difficulty": "simple", @@ -13241,7 +17546,9 @@ { "query_id": 1471, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers" + ], "query": "What is the ratio of costumers who pay in EUR against customers who pay in CZK?", "answer": "SELECT CAST(SUM(IIF(Currency = 'EUR', 1, 0)) AS FLOAT) / SUM(IIF(Currency = 'CZK', 1, 0)) FROM customers", "difficulty": "simple", @@ -13250,7 +17557,10 @@ { "query_id": 1472, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "In 2012, who had the least consumption in LAM?", "answer": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.date BETWEEN 201201 AND 201212 GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "difficulty": "moderate", @@ -13259,7 +17569,10 @@ { "query_id": 1473, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "What was the average monthly consumption of customers in SME for the year 2013?", "answer": "SELECT AVG(T2.Consumption) / 12 FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTRING(T2.Date, 1, 4) = '2013' AND T1.Segment = 'SME'", "difficulty": "moderate", @@ -13268,7 +17581,10 @@ { "query_id": 1474, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which customers, paying in CZK, consumed the most gas in 2011?", "answer": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'CZK' AND T2.Date BETWEEN 201101 AND 201112 GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "moderate", @@ -13277,7 +17593,10 @@ { "query_id": 1475, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "How many customers in KAM had a consumption of less than 30,000 for the year 2012?", "answer": "SELECT COUNT(*) FROM ( SELECT T2.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' AND SUBSTRING(T2.Date, 1, 4) = '2012' GROUP BY T2.CustomerID HAVING SUM(T2.Consumption) < 30000 ) AS t1", "difficulty": "moderate", @@ -13286,7 +17605,10 @@ { "query_id": 1476, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "What was the difference in gas consumption between CZK-paying customers and EUR-paying customers in 2012?", "answer": "SELECT SUM(IIF(T1.Currency = 'CZK', T2.Consumption, 0)) - SUM(IIF(T1.Currency = 'EUR', T2.Consumption, 0)) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTRING(T2.Date, 1, 4) = '2012'", "difficulty": "challenging", @@ -13295,7 +17617,10 @@ { "query_id": 1477, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which year recorded the most gas use paid in EUR?", "answer": "SELECT SUBSTRING(T2.Date, 1, 4) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'EUR' GROUP BY SUBSTRING(T2.Date, 1, 4) ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "simple", @@ -13304,7 +17629,10 @@ { "query_id": 1478, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which segment had the least consumption?", "answer": "SELECT T1.Segment FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.Segment ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "difficulty": "simple", @@ -13313,7 +17641,10 @@ { "query_id": 1479, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which year recorded the most consumption of gas paid in CZK?", "answer": "SELECT SUBSTRING(T2.Date, 1, 4) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'CZK' GROUP BY SUBSTRING(T2.Date, 1, 4) ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "moderate", @@ -13322,7 +17653,10 @@ { "query_id": 1480, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "What was the gas consumption peak month for SME customers in 2013?", "answer": "SELECT SUBSTRING(T2.Date, 5, 2) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTRING(T2.Date, 1, 4) = '2013' AND T1.Segment = 'SME' GROUP BY SUBSTRING(T2.Date, 5, 2) ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "moderate", @@ -13331,7 +17665,10 @@ { "query_id": 1481, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "What is the difference in the annual average consumption of the customers with the least amount of consumption paid in CZK for 2013 between SME and LAM, LAM and KAM, and KAM and SME?", "answer": "SELECT CAST(SUM(IIF(T1.Segment = 'SME', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) - CAST(SUM(IIF(T1.Segment = 'LAM', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) , CAST(SUM(IIF(T1.Segment = 'LAM', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) - CAST(SUM(IIF(T1.Segment = 'KAM', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) , CAST(SUM(IIF(T1.Segment = 'KAM', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) - CAST(SUM(IIF(T1.Segment = 'SME', T2.Consumption, 0)) AS FLOAT) / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'CZK' AND T2.Consumption = ( SELECT MIN(Consumption) FROM yearmonth ) AND T2.Date BETWEEN 201301 AND 201312", "difficulty": "challenging", @@ -13340,7 +17677,10 @@ { "query_id": 1482, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which of the three segments\u2014SME, LAM and KAM\u2014has the biggest and lowest percentage increases in consumption paid in EUR between 2012 and 2013?", "answer": "SELECT CAST((SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0))) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0)), CAST(SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) , CAST(SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID", "difficulty": "challenging", @@ -13349,7 +17689,9 @@ { "query_id": 1483, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth" + ], "query": "How much did customer 6 consume in total between August and November 2013?", "answer": "SELECT SUM(Consumption) FROM yearmonth WHERE CustomerID = 6 AND Date BETWEEN '201308' AND '201311'", "difficulty": "simple", @@ -13358,7 +17700,9 @@ { "query_id": 1484, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations" + ], "query": "How many more \"discount\" gas stations does the Czech Republic have compared to Slovakia?", "answer": "SELECT SUM(IIF(Country = 'CZE', 1, 0)) - SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations WHERE Segment = 'Discount'", "difficulty": "simple", @@ -13367,7 +17711,9 @@ { "query_id": 1485, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth" + ], "query": "How much more was customer 7 consuming in April 2013 than customer 5?", "answer": "SELECT SUM(IIF(CustomerID = 7, Consumption, 0)) - SUM(IIF(CustomerID = 5, Consumption, 0)) FROM yearmonth WHERE Date = '201304'", "difficulty": "simple", @@ -13376,7 +17722,9 @@ { "query_id": 1486, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers" + ], "query": "Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more?", "answer": "SELECT SUM(Currency = 'CZK') - SUM(Currency = 'EUR') FROM customers WHERE Segment = 'SME'", "difficulty": "simple", @@ -13385,7 +17733,10 @@ { "query_id": 1487, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?", "answer": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.Date = '201310' AND T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "moderate", @@ -13394,7 +17745,10 @@ { "query_id": 1488, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Who among KAM's customers consumed the most? How much did it consume?", "answer": "SELECT T2.CustomerID, SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' GROUP BY T2.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "simple", @@ -13403,7 +17757,10 @@ { "query_id": 1489, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "How much did the KAM customers consume in total in May 2013?", "answer": "SELECT SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201305' AND T1.Segment = 'KAM'", "difficulty": "simple", @@ -13412,7 +17769,10 @@ { "query_id": 1490, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "How many percent of LAM customer consumed more than 46.73?", "answer": "SELECT CAST(SUM(IIF(T2.Consumption > 46.73, 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM'", "difficulty": "moderate", @@ -13421,7 +17781,9 @@ { "query_id": 1491, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations" + ], "query": "Which country has more \"value for money\" gas stations? Please give a total number of \"value for money\" gas stations in each country.", "answer": "SELECT Country , ( SELECT COUNT(GasStationID) FROM gasstations WHERE Segment = 'Value for money' ) FROM gasstations WHERE Segment = 'Value for money' GROUP BY Country ORDER BY COUNT(GasStationID) DESC LIMIT 1", "difficulty": "simple", @@ -13430,7 +17792,9 @@ { "query_id": 1492, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers" + ], "query": "What percentage of KAM customers pay in euros?", "answer": "SELECT CAST(SUM(Currency = 'EUR') AS FLOAT) * 100 / COUNT(CustomerID) FROM customers WHERE Segment = 'KAM'", "difficulty": "simple", @@ -13439,7 +17803,9 @@ { "query_id": 1493, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth" + ], "query": "In February 2012, what percentage of customers consumed more than 528.3?", "answer": "SELECT CAST(SUM(IIF(Consumption > 528.3, 1, 0)) AS FLOAT) * 100 / COUNT(CustomerID) FROM yearmonth WHERE Date = '201202'", "difficulty": "simple", @@ -13448,7 +17814,9 @@ { "query_id": 1494, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations" + ], "query": "What percentage of Slovakian gas stations are premium?", "answer": "SELECT CAST(SUM(IIF(Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / COUNT(GasStationID) FROM gasstations WHERE Country = 'SVK'", "difficulty": "simple", @@ -13457,7 +17825,10 @@ { "query_id": 1495, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which client ID consumed the most in September 2013?", "answer": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201309' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "difficulty": "simple", @@ -13466,7 +17837,10 @@ { "query_id": 1496, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which client segment consumed the least in September 2013?", "answer": "SELECT T1.Segment FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201309' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "difficulty": "simple", @@ -13475,7 +17849,10 @@ { "query_id": 1497, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Which SME customer consumed the least in June 2012?", "answer": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201206' AND T1.Segment = 'SME' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "difficulty": "simple", @@ -13484,7 +17861,9 @@ { "query_id": 1498, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth" + ], "query": "What is the highest monthly consumption in the year 2012?", "answer": "SELECT SUM(Consumption) FROM yearmonth WHERE SUBSTRING(Date, 1, 4) = '2012' GROUP BY SUBSTRING(Date, 5, 2) ORDER BY SUM(Consumption) DESC LIMIT 1", "difficulty": "simple", @@ -13493,7 +17872,10 @@ { "query_id": 1499, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "What is the biggest monthly consumption of the customers who use euro as their currency?", "answer": "SELECT SUM(T2.Consumption) / 12 AS MonthlyConsumption FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY MonthlyConsumption DESC LIMIT 1", "difficulty": "simple", @@ -13502,7 +17884,11 @@ { "query_id": 1500, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "products", + "yearmonth", + "transactions_1k" + ], "query": "Please list the product description of the products consumed in September, 2013.", "answer": "SELECT T3.Description FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Date = '201309'", "difficulty": "simple", @@ -13511,7 +17897,11 @@ { "query_id": 1501, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "yearmonth", + "transactions_1k" + ], "query": "Please list the countries of the gas stations with transactions taken place in June, 2013.", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Date = '201306'", "difficulty": "moderate", @@ -13520,7 +17910,11 @@ { "query_id": 1502, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "customers", + "transactions_1k" + ], "query": "Please list the chains of the gas stations with transactions in euro.", "answer": "SELECT DISTINCT T3.ChainID FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN gasstations AS T3 ON T1.GasStationID = T3.GasStationID WHERE T2.Currency = 'EUR'", "difficulty": "simple", @@ -13529,7 +17923,11 @@ { "query_id": 1503, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "products", + "customers", + "transactions_1k" + ], "query": "Please list the product description of the products bought in transactions in euro.", "answer": "SELECT DISTINCT T1.ProductID, T3.Description FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Currency = 'EUR'", "difficulty": "simple", @@ -13538,7 +17936,9 @@ { "query_id": 1504, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "transactions_1k" + ], "query": "What is the average total price of the transactions taken place in January, 2012?", "answer": "SELECT AVG(Amount) FROM transactions_1k WHERE Date LIKE '2012-01%'", "difficulty": "simple", @@ -13547,7 +17947,10 @@ { "query_id": 1505, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "Among the customers who paid in euro, how many of them have a monthly consumption of over 1000?", "answer": "SELECT COUNT(*) FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Currency = 'EUR' AND T1.Consumption > 1000.00", "difficulty": "simple", @@ -13556,7 +17959,11 @@ { "query_id": 1506, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "products", + "transactions_1k" + ], "query": "Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic.", "answer": "SELECT T3.Description FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Country = 'CZE'", "difficulty": "moderate", @@ -13565,7 +17972,10 @@ { "query_id": 1507, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "Please list the disparate time of the transactions taken place in the gas stations from chain no. 11.", "answer": "SELECT DISTINCT T1.Time FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.ChainID = 11", "difficulty": "simple", @@ -13574,7 +17984,10 @@ { "query_id": 1508, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "How many transactions taken place in the gas station in the Czech Republic are with a price of over 1000?", "answer": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND T1.Price > 1000", "difficulty": "simple", @@ -13583,7 +17996,10 @@ { "query_id": 1509, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?", "answer": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND strftime('%Y', T1.Date) >= '2012'", "difficulty": "moderate", @@ -13592,7 +18008,10 @@ { "query_id": 1510, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "What is the average total price of the transactions taken place in gas stations in the Czech Republic?", "answer": "SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE'", "difficulty": "simple", @@ -13601,7 +18020,11 @@ { "query_id": 1511, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "customers", + "transactions_1k" + ], "query": "For the customers who paid in the euro, what is their average total price of the transactions?", "answer": "SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN customers AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Currency = 'EUR'", "difficulty": "simple", @@ -13610,7 +18033,9 @@ { "query_id": 1512, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "transactions_1k" + ], "query": "Which customer paid the most in 2012/8/25?", "answer": "SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC LIMIT 1", "difficulty": "simple", @@ -13619,7 +18044,10 @@ { "query_id": 1513, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "Which country's gas station had the first paid cusomer in 2012/8/25?", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' ORDER BY T1.Time DESC LIMIT 1", "difficulty": "simple", @@ -13628,7 +18056,11 @@ { "query_id": 1514, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "customers", + "transactions_1k" + ], "query": "What kind of currency did the customer paid at 16:25:00 in 2012/8/24?", "answer": "SELECT T3.Currency FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN customers AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Time = '16:25:00'", "difficulty": "simple", @@ -13637,7 +18069,10 @@ { "query_id": 1515, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers", + "transactions_1k" + ], "query": "What segment did the customer have at 2012/8/23 21:20:00?", "answer": "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.date = '2012-08-23' AND T1.time = '21:20:00'", "difficulty": "simple", @@ -13646,7 +18081,10 @@ { "query_id": 1516, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers", + "transactions_1k" + ], "query": "How many transactions were paid in EUR in the morning of 2012/8/26?", "answer": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-26' AND T1.Time < '13:00:00' AND T2.Currency = 'EUR'", "difficulty": "moderate", @@ -13655,7 +18093,10 @@ { "query_id": 1517, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers", + "transactions_1k" + ], "query": "For the earliest customer, what segment did he/she have?", "answer": "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY Date ASC LIMIT 1", "difficulty": "simple", @@ -13664,7 +18105,10 @@ { "query_id": 1518, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "For the deal happened at 2012/8/24 12:42:00, which country was it?", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Time = '12:42:00'", "difficulty": "simple", @@ -13673,7 +18117,10 @@ { "query_id": 1519, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "What was the product id of the transaction happened at 2012/8/23 21:20:00?", "answer": "SELECT T1.ProductID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-23' AND T1.Time = '21:20:00'", "difficulty": "simple", @@ -13682,7 +18129,10 @@ { "query_id": 1520, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "transactions_1k" + ], "query": "For the customer who paid 124.05 in 2012/8/24, how much did he/she spend during the January of 2012? And what is the date and expenses exactly?", "answer": "SELECT T1.CustomerID, T2.Date, T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Price = 124.05 AND T2.Date = '201201'", "difficulty": "moderate", @@ -13691,7 +18141,10 @@ { "query_id": 1521, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?", "answer": "SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-26' AND T1.Time BETWEEN '08:00:00' AND '09:00:00' AND T2.Country = 'CZE'", "difficulty": "moderate", @@ -13700,7 +18153,10 @@ { "query_id": 1522, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers" + ], "query": "There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?", "answer": "SELECT T2.Currency FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '201306' AND T1.Consumption = 214582.17", "difficulty": "simple", @@ -13709,7 +18165,10 @@ { "query_id": 1523, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "Which country was the card owner of No.667467 in?", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.CardID = '667467'", "difficulty": "simple", @@ -13718,7 +18177,10 @@ { "query_id": 1524, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "What's the nationality of the customer who spent 548.4 in 2012/8/24?", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Price = 548.4", "difficulty": "simple", @@ -13727,7 +18189,10 @@ { "query_id": 1525, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "customers", + "transactions_1k" + ], "query": "What is the percentage of the customers who used EUR in 2012/8/25?", "answer": "SELECT CAST(SUM(IIF(T2.Currency = 'EUR', 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-25'", "difficulty": "simple", @@ -13736,7 +18201,11 @@ { "query_id": 1526, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "yearmonth", + "transactions_1k" + ], "query": "For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?", "answer": "SELECT CAST(SUM(IIF(SUBSTRING(Date, 1, 4) = '2012', Consumption, 0)) - SUM(IIF(SUBSTRING(Date, 1, 4) = '2013', Consumption, 0)) AS FLOAT) / SUM(IIF(SUBSTRING(Date, 1, 4) = '2012', Consumption, 0)) FROM yearmonth WHERE CustomerID = ( SELECT T1.CustomerID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' AND T1.Price = 634.8 )", "difficulty": "challenging", @@ -13745,7 +18214,9 @@ { "query_id": 1527, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "transactions_1k" + ], "query": "Which gas station has the highest amount of revenue?", "answer": "SELECT GasStationID FROM transactions_1k GROUP BY GasStationID ORDER BY SUM(Price) DESC LIMIT 1", "difficulty": "simple", @@ -13754,7 +18225,9 @@ { "query_id": 1528, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations" + ], "query": "What is the percentage of \"premium\" against the overall segment in \"SVK\"?", "answer": "SELECT CAST(SUM(IIF(Country = 'SVK' AND Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations", "difficulty": "simple", @@ -13763,7 +18236,11 @@ { "query_id": 1529, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "yearmonth", + "transactions_1k" + ], "query": "What is the amount spent by customer \"38508\" at the gas stations? How much had the customer spent in January 2012?", "answer": "SELECT SUM(T1.Price) , SUM(IIF(T3.Date = '201201', T1.Price, 0)) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.CustomerID = '38508'", "difficulty": "moderate", @@ -13772,7 +18249,10 @@ { "query_id": 1530, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "products", + "transactions_1k" + ], "query": "Which are the top five best selling products? Please state the full name of them.", "answer": "SELECT T2.Description FROM transactions_1k AS T1 INNER JOIN products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Amount DESC LIMIT 5", "difficulty": "simple", @@ -13781,7 +18261,11 @@ { "query_id": 1531, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "customers", + "transactions_1k" + ], "query": "Who is the top spending customer and how much is the average price per single item purchased by this customer? What currency was being used?", "answer": "SELECT T2.CustomerID, SUM(T2.Price / T2.Amount), T1.Currency FROM customers AS T1 INNER JOIN transactions_1k AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CustomerID = ( SELECT CustomerID FROM yearmonth ORDER BY Consumption DESC LIMIT 1 ) GROUP BY T2.CustomerID, T1.Currency", "difficulty": "moderate", @@ -13790,7 +18274,10 @@ { "query_id": 1532, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "gasstations", + "transactions_1k" + ], "query": "Which country had the gas station that sold the most expensive product id No.2 for one unit?", "answer": "SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.ProductID = 2 ORDER BY T1.Price DESC LIMIT 1", "difficulty": "simple", @@ -13799,7 +18286,10 @@ { "query_id": 1533, "database_id": "debit_card_specializing", - "table_id": "N/A", + "table_id": [ + "yearmonth", + "transactions_1k" + ], "query": "For all the people who paid more than 29.00 per unit of product id No.5. Give their consumption status in the August of 2012.", "answer": "SELECT T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Price / T1.Amount > 29.00 AND T1.ProductID = 5 AND T2.Date = '201208'", "difficulty": "moderate",