diff --git "a/bird/bart-base/run_1/all_preds.json" "b/bird/bart-base/run_1/all_preds.json" --- "a/bird/bart-base/run_1/all_preds.json" +++ "b/bird/bart-base/run_1/all_preds.json" @@ -5,10 +5,13 @@ "question": "What is the highest eligible free rate for K-12 students in the schools in Alameda County", "evidence": "Eligible free rate for K-12 = \"Free Meal Count (K-12)\" / \"Enrollment (K-12)\"", "difficulty": "simple", - "pred": "SELECT \"percentage\" FROM schools WHERE \"free meal count (K-12)\" = 'Free Meal Count (k-12)' AND \"county name\" = 'Alameda County'", + "pred": "SELECT \"percent (%) eligible free (k-12)' FROM schools WHERE county = 'Alameda County' ORDER BY \"enrollment (K-12)' DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1, @@ -16,10 +19,13 @@ "question": "Please list the lowest three eligible free rates for students aged 5-17 in continuation schools", "evidence": "Eligible free rates for students aged 5-17 = \"Free Meal Count (Ages 5-17)\" / \"Enrollment (Ages 5-17)\"", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.rate FROM schools AS t1 INNER JOIN \"free meal count (ages 5-17)\" AS t2 ON t1.cdscode = t2.\"district name\" WHERE t1.\"income\" = 'Free Meal Count (Ages 5-18)'", + "pred": "SELECT t1.\"free meal count (ages 5-17)\" - t1.\"free meal count (ages 5-17)' FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE NOT t2.\"free meal count (ages 5-17)' IS NULL ORDER BY t2.\"free meal count (ages 5-17)' LIMIT 3", "gold": "SELECT \"free meal count (ages 5-17)\" / \"enrollment (ages 5-17)\" FROM frpm WHERE \"educational option type\" = 'Continuation School' AND NOT \"free meal count (ages 5-17)\" / \"enrollment (ages 5-17)\" IS NULL ORDER BY \"free meal count (ages 5-17)\" / \"enrollment (ages 5-17)\" ASC LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 2, @@ -27,10 +33,13 @@ "question": "Please list the zip code of all the charter schools in Fresno County Office of Education", "evidence": "Charter schools refers to \"Charter School (Y/N)\" = 1 in the table fprm", "difficulty": "simple", - "pred": "SELECT t2.\"zip code\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"county name\" = 'Fresno County Office of Education' AND \"charter school (y/n)\" = 1", + "pred": "SELECT t1.zip FROM schools AS t1 INNER JOIN \"charter school (y/n)' AS t2 ON t1.cdscode = t2.\"charter school (y/n)' WHERE t1.county = 'Fresno County Office of Education'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 3, @@ -38,10 +47,13 @@ "question": "What is the unabbreviated mailing street address of the school with the highest FRPM count for K-12 students", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.mailstreet FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.districtcode = t2.\"district code\" WHERE t1.\"frpm count\" = (SELECT AVG(frpm) FROM schools)", + "pred": "SELECT t1.address FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"frpm count (k-12)' = (SELECT MAX(frpm count) FROM frpm)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 4, @@ -49,10 +61,13 @@ "question": "Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1", "evidence": "Charter schools refers to \"Charter School (Y/N)\" = 1 in the frpm", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.phone FROM schools AS t1 INNER JOIN \"charter school (y/n)' AS t2 ON t2.cdscode = t1.\"charterschool\" WHERE t2.\"school\" = 'Charter School (Y/N)' AND STRFTIME('%Y-%N)' = '2000'", + "pred": "SELECT phone FROM schools WHERE \"charter school (y/n)\" = 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 5, @@ -60,10 +75,13 @@ "question": "How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual", "evidence": "Exclusively virtual refers to Virtual = 'F'", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cds = t2.\"cds\" WHERE t2.virtual = 'F' AND t1.\"average score\" > 400", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.vacationrate > 400 AND t2.vacationtype = 'F'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 6, @@ -71,10 +89,13 @@ "question": "Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program", "evidence": "Magnet schools or offer a magnet program means that Magnet = 1", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.schoolname FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cdscode\" = t2.\"cds\" WHERE t2.magnet = 1", + "pred": "SELECT DISTINCT t1.schoolname FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.magnet = 1 GROUP BY t1.schoolname HAVING COUNT(t2.cdscode) > 500", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 7, @@ -82,10 +103,13 @@ "question": "What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.phone FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.\"cds\" WHERE t1.\"satsscore\" = 1500 AND t1\"score\" > 1500", + "pred": "SELECT t1.phone FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.numge1500 > 1500 GROUP BY t1.school ORDER BY COUNT(t1.cdscode) DESC LIMIT 1", "gold": "SELECT t2.phone FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode ORDER BY t1.numge1500 DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 8, @@ -93,10 +117,13 @@ "question": "What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cds = t2.\"cds\" WHERE t2.frpm count = 'K-12'", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.\"frpm count (k-12)' = (SELECT MAX(frpm count (k-12)' FROM \"satscores\")", "gold": "SELECT numtsttakr FROM satscores WHERE cds = (SELECT cdscode FROM frpm ORDER BY \"frpm count (k-12)\" DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 9, @@ -104,10 +131,13 @@ "question": "Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM schools WHERE \"average score\" > 560", + "pred": "SELECT COUNT(DISTINCT t1.cname) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cds = t2.cds WHERE t2.charterly = 'charter funding type' AND t1.Math > 560", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 10, @@ -115,10 +145,13 @@ "question": "For the school with the highest average score in Reading in the SAT test, what is its FRPM count for students aged 5-17", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.\"frpm count\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"average score\" = 5-17 AND t1\"score\" = (SELECT AVG(score) FROM schools)", + "pred": "SELECT t2.\"frpm count\" FROM \"satscores\" AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.rating = (SELECT MAX(rating) FROM \"satscores\") AND t1.ages 5-17 = (SELECT MAX(rating) FROM \"satscores\")", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 11, @@ -126,10 +159,13 @@ "question": "Please list the codes of the schools with a total enrollment of over 500", "evidence": "Total enrollment can be represented by \"Enrollment (K-12)\" + \"Enrollment (Ages 5-17)\"", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"school code\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cds WHERE STRFTIME('%Y', t1.\"enrollment (K-12)\" = '500' AND t2 \"student enrollment (Ages 5-17)'", + "pred": "SELECT DISTINCT t1.\"school code\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.\"district code\" WHERE t2.\"enrollment (k-12)\" + t2.\"enrollment (ages 5-17)\" > 500", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 12, @@ -137,10 +173,13 @@ "question": "Among the schools with an SAT excellence rate of over 0.3, what is the highest eligible free rate for students aged 5-17", "evidence": "Excellence rate = NumGE1500 / NumTstTakr; Eligible free rates for students aged 5-17 = \"Free Meal Count (Ages 5-17)\" / \"Enrollment (Ages 5-17)\"", "difficulty": "moderate", - "pred": "SELECT AVG(t1.rate) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t2.\"score\" = 0.3 AND t1.\"income rate\" = NumGE1500 / NumTsttakr", + "pred": "SELECT t1.numge1500 / t1.numtsttakr FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t2.satscode IN (SELECT MAX(t2.numge1500) FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cds)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 13, @@ -148,10 +187,13 @@ "question": "Please list the phone numbers of the schools with the top 3 SAT excellence rate", "evidence": "Excellence rate = NumGE1500 / NumTstTakr", "difficulty": "simple", - "pred": "SELECT phone FROM schools WHERE numge1500 / numtsttakr = 3", + "pred": "SELECT t1.phone FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t2.numge1500 / t2.numtsttakr = (SELECT MAX(numge1500) FROM satscores) LIMIT 3", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 14, @@ -159,10 +201,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.schoolname FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cds\" = t2.cds WHERE t2.\"enrollment (ages 5-17)' = 5", + "pred": "SELECT t1.ncesschool FROM schools AS t1 INNER JOIN \"enrollment (ages 5-17)' AS t2 ON t1.cdscode = t2.cdscode GROUP BY t1.ncesschool ORDER BY COUNT(t1.cdscode) DESC LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 15, @@ -170,10 +215,13 @@ "question": "Which active district has the highest average score in Reading", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.\"cds\" WHERE t1.\"academic year\" = '2013-14' AND t1\"average score\" = (SELECT AVG(t2.averagescore) FROM schools)", + "pred": "SELECT t1.district FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.district = 'Reading' GROUP BY t1.district ORDER BY SUM(t2.avgscrread) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 16, @@ -181,10 +229,13 @@ "question": "How many schools in merged Alameda have number of test takers less than 100", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"districts\" AS t2 ON t1.districtcode = t2.\"district code\" WHERE t2.county name = 'Alameda' AND t1.\"test takers\" > 100", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN merges AS t2 ON t1.cdscode = t2.cdscode WHERE t2.county = 'Alameda' AND t1.testtakers < 100", "gold": "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 = 'Lake'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 17, @@ -192,10 +243,13 @@ "question": "Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers", "evidence": "Valid charter number means the number is not null", "difficulty": "simple", - "pred": "SELECT AVG(t1.score) FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cds WHERE t2.\"charter school number\" = 499 AND t1.\"score\" > 499", + "pred": "SELECT CAST(SUM(CASE WHEN charternum = 499 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN charternum = 499 THEN 1 ELSE 0 END) FROM schools", "gold": "SELECT charternum, avgscrwrite, RANK() OVER (ORDER BY avgscrwrite DESC) AS writingscorerank FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cds WHERE t2.avgscrwrite > 499 AND NOT charternum IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 18, @@ -203,10 +257,13 @@ "question": "How many schools in Fresno (directly funded) have number of test takers not more than 250", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.dist = t2.dist WHERE t2.\"district name\" = 'Fresno' AND t1.\"score\" > 250", + "pred": "SELECT COUNT(DISTINCT t1.cdscode) FROM schools AS t1 INNER JOIN \"charter school\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.fresno = 'fresno' AND t1.score <= 250", "gold": "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\" = 'Fresno' AND t2.numtsttakr <= 250", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 19, @@ -214,10 +271,13 @@ "question": "What is the phone number of the school that has the highest average score in Math", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.\"phone\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cds\" = t2.cdscode WHERE t1.averagescore = (SELECT AVG(score) FROM schools)", + "pred": "SELECT t2.phone FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.score = (SELECT MAX(score) FROM satscores)", "gold": "SELECT t1.phone FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cds ORDER BY t2.avgscrmath DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 20, @@ -225,10 +285,13 @@ "question": "How many schools in Amador which the Low Grade is 9 and the High Grade is 12", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.districtname = t2.distorder WHERE t2.\"low grade\" = 9 AND t1.\"high grade\") = 12", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.\"low grade\" = 9 AND t1.\"high grade\" = 12", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 21, @@ -236,10 +299,13 @@ "question": "In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"district code\" AS t2 ON t1.districtcode = t2.distorder WHERE t2.\"free meal count\" = 500 AND t1.\"free price meals\" = 700", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.county = 'Los Angeles' AND t2.\"free meal count (k-12)' AND t2.\"free meal count (k-12)' > 500", "gold": "SELECT COUNT(cdscode) FROM frpm WHERE \"county name\" = 'Los Angeles' AND \"free meal count (k-12)\" > 500 AND \"frpm count (k-12)\" < 700", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 22, @@ -247,10 +313,13 @@ "question": "Which school in Contra Costa has the highest number of test takers", "evidence": "", "difficulty": "simple", - "pred": "SELECT \"school name\" FROM schools WHERE \"county name\" = 'Contra Costa'", + "pred": "SELECT t1.school FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.county = 'contra costa' GROUP BY t1.school ORDER BY COUNT(t2.cdscode) DESC LIMIT 1", "gold": "SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND NOT sname IS NULL ORDER BY numtsttakr DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 23, @@ -258,10 +327,13 @@ "question": "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", "evidence": "Diffrence in enrollement = \"Enrollment (K-12)\" - \"Enrollment (Ages 5-17)\"", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.schoolname FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.\"cds\" WHERE STRFTIME('%Y', t1.\"age 5-17\") = 30 AND t1 \"enrollment (K-12)\" = 'Enrollment (Ages 5-16)'", + "pred": "SELECT t1.school, t2.streetabr FROM schools AS t1 INNER JOIN (SELECT t1.school, t2.streetabr, COUNT(DISTINCT t1.district) FROM schools AS t1 INNER JOIN \"enrollment (K-12)\" - t1.\"enrollment (Ages 5-17)\" AS t2 ON t1.cdscode = t2.cdscode GROUP BY t1.school, t2.streetabr HAVING COUNT(DISTINCT t1.district) > 30) AS t3", "gold": "SELECT t1.school, t1.street 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 24, @@ -269,10 +341,13 @@ "question": "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", "evidence": "Percent eligible for free meals = Free Meal Count (K-12) / Total (Enrollment (K-12)", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.\"school name\" FROM schools AS t1 INNER JOIN \"free meal count\" AS t2 ON t1.cdscode = t2.cds WHERE t2.\"percentage\" > 0.1 AND t1 \"test takers\" > 1500", + "pred": "SELECT t1.\"school name\" FROM schools AS t1 INNER JOIN \"enrollment (k-12)' AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"percent eligible free (k-12)' > 0.1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 25, @@ -280,10 +355,13 @@ "question": "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", "evidence": "Average of average math = sum(average math scores) / count(schools).", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.schooltype FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.\"cds\" WHERE t1.\"grater than 400\" = (SELECT AVG(t2.average math scores) FROM schools)", + "pred": "SELECT SUM(t1.avgscrmath) / SUM(t1.avgscrmath) FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.district = 'Riverside' AND t2.sat = 400", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 26, @@ -291,10 +369,13 @@ "question": "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", "evidence": "Full communication address should include Street, City, State and zip code if any.", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.street, t1.zipcode, t2.\"zipcode\" FROM schools AS t1 INNER JOIN schools \"satscores\" AS t2 ON t1.\"cdscode\" = t2 \"cdscodes\" WHERE t1\"age 15-17\" AND t2\"free meal count\" = 800 AND t1 \"free price meals\" = (SELECT free meal count FROM schools)", + "pred": "SELECT t1.school, t1.street, t1.city, t1.state, t1.zip FROM schools AS t1 INNER JOIN \"high schools\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.foodprice = 800 AND t2.county = 'Monterey'", "gold": "SELECT t1.\"school name\", t2.street, t2.city, t2.state, t2.zip 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)'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 27, @@ -302,10 +383,13 @@ "question": "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", "evidence": "Communication number refers to phone number.", "difficulty": "moderate", - "pred": "SELECT AVG(t2.score) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"closeddate\" = '1991-2000' AND t2.\"closeddate\"' = '2000-01'", + "pred": "SELECT AVG(t1.cdscode), t1.schoolname, t1.phone FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cds WHERE STRFTIME('%Y', t2.closingdate) >= '1991' AND STRFTIME('%Y', t2.closingdate) < '2000'", "gold": "SELECT t2.school, t1.avgscrwrite, t2.phone FROM schools AS t2 LEFT JOIN satscores AS t1 ON t2.cdscode = t1.cds WHERE STRFTIME('%Y', t2.opendate) > '1991' OR STRFTIME('%Y', t2.closeddate) < '2000'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 28, @@ -313,10 +397,13 @@ "question": "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", "evidence": "Difference between K-12 enrollment and 15-17 enrollment can be computed by \"Enrollment (K-12)\" - \"Enrollment (Ages 5-17)\"", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.name, t1.doc FROM schools AS t1 INNER JOIN \"district type\" AS t2 ON t1.\"districttype\" = t2.\"distinctive type\" WHERE t1\"enrollment (K-12) = 15-17", + "pred": "SELECT DISTINCT t1.\"school name\", t2.\"school type\" FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.\"enrollment (K-12)\" - t1.\"Enrollment (Ages 5-17)\"", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 29, @@ -324,10 +411,13 @@ "question": "When did the first-through-twelfth-grade school with the largest enrollment open", "evidence": "K-12 means First-through-twelfth-grade", "difficulty": "simple", - "pred": "SELECT t2.\"date\" FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.cdscode = t2.district WHERE t1.\"first-through-twelfth-grade\" = 'K-12'", + "pred": "SELECT t2.closingdate FROM schools AS t1 INNER JOIN \"enrollment (k-12)' AS t2 ON t1.cdscode = t2.cdscode WHERE t2. enroll12 = (SELECT MAX( enroll12) FROM \"enrollment (k-12)')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 30, @@ -335,10 +425,13 @@ "question": "Which cities have the top 5 lowest enrollment number for students in grades 1 through 12", "evidence": "K-12 refers to students in grades 1 through 12.", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.city FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.districtname = t2.\"district name\" WHERE t1.\"school number\" = 5 AND t2 \"grade 1 through 12\"", + "pred": "SELECT t2.city FROM \"enrollment (k-12)\" AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.students IN (1, 2) GROUP BY t2.city ORDER BY SUM(t1.occupation) ASC LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 31, @@ -346,10 +439,13 @@ "question": "What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12", "evidence": "K-12 refers to students in grades 1 through 12; Eligible free rate for K-12 = \"Free Meal Count (K-12)\" / \"Enrollment (K-12)\"", "difficulty": "moderate", - "pred": "SELECT \"eligible free (k-12)' FROM schools AS t1 INNER JOIN \"free meal count (K-12)\" AS t2 ON t1.cdscode = t2.dscode WHERE t2.\"income (income)\" = 'Free Meal Count (K%12)' AND t1.\"age 1 through 12\" = '10th'", + "pred": "SELECT \"free meal count (K-12)' / \"Enrollment (K-12)' FROM schools WHERE \"school name\" IN ('10', '11') ORDER BY \" enrolment (k-12)' DESC LIMIT 1", "gold": "SELECT CAST(\"free meal count (k-12)\" AS REAL) / \"enrollment (k-12)\" FROM frpm ORDER BY \"enrollment (k-12)\" DESC LIMIT 2 OFFSET 9", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 32, @@ -357,10 +453,13 @@ "question": "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", "evidence": "grades 1-12 means K-12; Eligible free or reduced price meal rate for K-12 = \"FRPM Count (K-12)\" / \"Enrollment (K-12)\"", "difficulty": "moderate", - "pred": "SELECT \"eligible free or reduced price meal rate\" FROM schools AS t1 INNER JOIN \"fpm\" AS t2 ON t1.cdscode = t2.cds WHERE t2.\"school code\" = 66 AND t1.\"age 1-12\" = 'K-12'", + "pred": "SELECT \"percent (%) eligible free (k-12)' / \"Enrollment (K-12)' FROM schools WHERE \"district code\" = 66 ORDER BY \"percent (%) eligible free (k-12)' DESC LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 33, @@ -368,10 +467,13 @@ "question": "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", "evidence": "", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.email FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cds\" = t2.cdscode WHERE t2.\"free meal count\" = 1,900-2,000", + "pred": "SELECT DISTINCT t1.homepage FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.\"free meal count (k-12)' = 1,900-2,000", "gold": "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 NOT t2.website IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 34, @@ -379,10 +481,13 @@ "question": "What is the free rate for students between the ages of 5 and 17 at the school run by Kacey Gibson", "evidence": "Eligible free rates for students aged 5-17 = \"Free Meal Count (Ages 5-17)\" / \"Enrollment (Ages 5-17)\"", "difficulty": "moderate", - "pred": "SELECT \"free meal count (ages 5-17)\" FROM schools AS t1 INNER JOIN \"fpm\" AS t2 ON t1.\"cdscode\" = t2.\"cds\" WHERE t2.schoolname = 'Kacey Gibson' AND t1.age = 5 AND t2 \"age of 17\"", + "pred": "SELECT \"free meal count (ages 5-17)\" / \"Enrollment (ages 5-17)\" FROM schools WHERE dname = 'Kacey' AND dname = 'Gibson'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 35, @@ -390,10 +495,13 @@ "question": "What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12", "evidence": "Charted school means \"Charter School (Y/N)\" = 1 in the table frpm; Students enrolled in grades 1 through 12 refers to \"Enrollment (K-12)\"", "difficulty": "moderate", - "pred": "SELECT t2.email FROM schools AS t1 INNER JOIN \"charter school (y/n)' AS t2 ON t1.cdscode = t2.\"district name\" WHERE t1.\"school name\" = 'Charter School (Y/N)'", + "pred": "SELECT t1.email FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"enrollment (k-12)\" = 1 AND t2.\"charter school (y/n)' = 12", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 36, @@ -401,10 +509,13 @@ "question": "Under whose administration is the school with the highest number of students scoring 1500 or more on the SAT? Indicate their full names", "evidence": "full name means first name, last name; There are at most 3 administrators for each school; SAT Scores are greater or equal to 1500 refers to NumGE1500", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.first name, t1.\"last name\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t2.cds = t3.cdscode WHERE t2.\"numge1500\" = 1500 AND t3.\"score\" > 1500", + "pred": "SELECT t1.firstname, t1.lastname FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t2.numge1500 = (SELECT MAX(numge1500) FROM satscores)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 37, @@ -412,10 +523,13 @@ "question": "What is the complete address of the school with the lowest excellence rate? Indicate the Street, City, Zip and State", "evidence": "Execellence Rate = NumGE1500 / NumTstTakr; complete address has Street, City, State, Zip code", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.street, t1.zip, t2.\"zip\" FROM schools AS t1 INNER JOIN \"districts\" AS t2 ON t1.\"districtscode\" = t2._dist WHERE SUBSTRING(t1.numge1500 / t1._numtsttakr) = 'Numge1500'", + "pred": "SELECT t1.street, t1.city, t1.zip, t2.state FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.execellencerate = (SELECT MAX(execellencerate) FROM schools)", "gold": "SELECT t2.street, t2.city, t2.state, t2.zip 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 38, @@ -423,10 +537,13 @@ "question": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.webpage FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.districtcode = t2.\"district code\" WHERE t1.\"county name\" BETWEEN 2,000 AND 3,000", + "pred": "SELECT t1.site FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.county = 'Los Angeles County' AND t2.test takers BETWEEN 2,000 AND 3,000", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 39, @@ -434,10 +551,13 @@ "question": "What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980", "evidence": "between 1/1/1980 and 12/31/1980 means the year = 1980", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t1.year = 1980 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.\"district\" = t2.district", + "pred": "SELECT CAST(SUM(CASE WHEN t2.year = 1980 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t2.year = 1980 THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 40, @@ -445,10 +565,13 @@ "question": "What is the telephone number for the school with the lowest average score in reading in Fresno Unified", "evidence": "Fresno Unified is a name of district;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.\"phone\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"district name\" = 'Fresno Unified' ORDER BY COUNT(t1.score) DESC LIMIT 1", + "pred": "SELECT t1.phone FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.district = 'Fresno Unified' ORDER BY t2.avgscrread LIMIT 1", "gold": "SELECT t2.phone FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode WHERE t2.district = 'Fresno Unified' AND NOT t1.avgscrread IS NULL ORDER BY t1.avgscrread ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 41, @@ -456,10 +579,13 @@ "question": "List the names of virtual schools that are among the top 5 in their respective counties based on average reading scores", "evidence": "Exclusively virtual refers to Virtual = 'F'; respective counties means PARTITION BY County", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"school name\" FROM schools AS t1 INNER JOIN counties AS t2 ON t1.\"county name\" = t2.county WHERE t1.vendor = 'F' AND t2 \"average reading scores\" = 5", + "pred": "SELECT DISTINCT t1.schoolname FROM schools AS t1 INNER JOIN (SELECT t1.schoolname, COUNT(DISTINCT t1.cdscode) FROM schools AS t1 INNER JOIN (SELECT t1.schoolname, COUNT(DISTINCT t1.cdscode) AS num FROM schools AS t2 ON t1.cdscode = t2.cdscode WHERE t2.vacation = 'F' GROUP BY t1.schoolname) AS t3 ORDER BY t3.numge1500 DESC LIMIT 5", "gold": "SELECT school FROM (SELECT t2.school, t1.avgscrread, RANK() OVER (PARTITION BY t2.county ORDER BY t1.avgscrread DESC) AS rnk FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode WHERE t2.virtual = 'F') AS ranked_schools WHERE rnk <= 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 42, @@ -467,10 +593,13 @@ "question": "What is the type of education offered in the school who scored the highest average in Math", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"school type\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"average\" = (SELECT AVG(t1.average) FROM schools)", + "pred": "SELECT t2.\"educational option type\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.average = (SELECT MAX(average) FROM frpm)", "gold": "SELECT t2.edopsname FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode ORDER BY t1.avgscrmath DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 43, @@ -478,10 +607,13 @@ "question": "What is the average math score of the school with the lowest average score for all subjects, and in which county is it located", "evidence": "Average score for all subjects can be computed by AvgScrMath + AvgScrRead + AvgScrWrite", "difficulty": "moderate", - "pred": "SELECT AVGscrmath, avgscrwrite FROM schools WHERE county = 'county'", + "pred": "SELECT AVGscrmath, AVGscrwrite, t2.county FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode GROUP BY t2.district ORDER BY SUM(t1.avgscrrate) ASC LIMIT 1", "gold": "SELECT t1.avgscrmath, t2.county FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode WHERE NOT t1.avgscrmath IS NULL ORDER BY t1.avgscrmath + t1.avgscrread + t1.avgscrwrite ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 44, @@ -489,10 +621,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t1.satscores >= 1500 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.cds) FROM schools AS t1 INNER JOIN schools AS T2 ON t1.\"cdscode\" = t2.cdscodes WHERE t2.\"score\" > 1500", + "pred": "SELECT AVG(t1.avgscrread), t2.city FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.numge1500 = (SELECT MAX(numge1500) FROM satscores)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 45, @@ -500,10 +635,13 @@ "question": "What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores", "evidence": "Usually, administrators manage the school stuff.", "difficulty": "moderate", - "pred": "SELECT AVG(t2.average) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"school name\" = 'Ricci Ulrich'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.\"school name\" = 'Ricci' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t2.\"school name\" = 'Ulrich' THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.cname = 'Ricci'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 46, @@ -511,10 +649,13 @@ "question": "Which state special schools have the highest number of enrollees from grades 1 through 12", "evidence": "State Special Schools refers to DOC = 31; Grades 1 through 12 means K-12", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.state FROM schools AS t1 INNER JOIN \"districts\" AS t2 ON t1.cdscode = t2.\"districttype\" WHERE t1.\"doc\" = 31 AND t2 \"k-12\" = 'K-12'", + "pred": "SELECT t1.ncesschool FROM schools AS t1 INNER JOIN \"special schools\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.doc = 31 AND t2.k-12 = 'K-12' GROUP BY t1.ncesschool ORDER BY COUNT(t1.cdscode) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 47, @@ -522,10 +663,13 @@ "question": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980", "evidence": "Elementary School District refers to DOC = 52; Monthly average number of schools that opened in 1980 = count(schools that opened in 1980) / 12", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) AS REAL) / 12 FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.dist = t2.dist WHERE t2.\"county name\" = 'Alameda County'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.district = 52 THEN 1 ELSE 0 END) AS REAL) / 12 FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.doc = 52", "gold": "SELECT CAST(COUNT(school) AS REAL) / 12 FROM schools WHERE doc = 52 AND county = 'Alameda' AND STRFTIME('%Y', opendate) = '1980'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 48, @@ -533,10 +677,13 @@ "question": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools", "evidence": "Elementary School District refers to DOC = 52; Unified School District refers to DOC = 54.", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.district = t2.dist WHERE t2.\"district name\" = 'Orange County'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.district = 52 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t2.district = 54 THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN fpm AS t2 ON t1.cdscode = t2.cdscode", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 49, @@ -544,10 +691,13 @@ "question": "Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date", "evidence": "Closure date and closed date are synonyms; 'Closed' was mentioned in schools.StatusType.", "difficulty": "moderate", - "pred": "SELECT t2.\"county name\" FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.dist = t2.dist ORDER BY t1.\"closingdate\" DESC LIMIT 1", + "pred": "SELECT t2.county, t2.schoolname, t2.closingdate FROM schools AS t1 INNER JOIN counties AS t2 ON t1.cdscode = t2.cds WHERE t1.statustype = 'Closed' GROUP BY t2.county, t2.schoolname, t2.closingdate ORDER BY COUNT(t1.cdscode) DESC LIMIT 1", "gold": "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 NOT school IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 50, @@ -555,10 +705,13 @@ "question": "What is the postal street address for the school with the 7th highest Math average? Indicate the school's name", "evidence": "Postal street and mailing street are synonyms.", "difficulty": "simple", - "pred": "SELECT t2.\"postal street\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"maximscrmath\" = 7", + "pred": "SELECT t1.address, t2.\"school name\" FROM schools AS t1 INNER JOIN (SELECT t1.district, t1.address FROM schools AS t1 INNER JOIN \"charter school (y/n)' AS t2 ON t1.cdscode = t2.cdscode ORDER BY t1.avgscrmath DESC LIMIT 1) AS t2 ON t1.cdscode = t2.cdscode ORDER BY t2.avgscrmath DESC LIMIT 1", "gold": "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 1 OFFSET 6", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 51, @@ -566,10 +719,13 @@ "question": "In which mailing street address can you find the school that has the lowest average score in reading? Also give the school's name", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.mailstreet FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.\"cds\" WHERE t1.\"average score\" = (SELECT AVG(score) FROM schools)", + "pred": "SELECT t1.mailstreet, t2.\"school name\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode ORDER BY t2.avgscrread ASC LIMIT 1", "gold": "SELECT t2.mailstreet, t2.school FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode WHERE NOT t1.avgscrread IS NULL ORDER BY t1.avgscrread ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 52, @@ -577,10 +733,13 @@ "question": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport", "evidence": "Total SAT scores can be computed by AvgScrRead + AvgScrMath + AvgScrWrite", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cds = t2.dscode WHERE t1.\"district\" = 1500 AND t2.\"emailcity\" = 'Lakeport' AND t3.avscrread = (SELECT AVGscrrate, avgscrwrite FROM schools)", + "pred": "SELECT COUNT(DISTINCT t1.cdscode) FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.postal = 'Lakeport' AND t2.avgscrread >= (SELECT AVGscrread FROM satscores WHERE mailcity = 'Lakeport')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 53, @@ -588,10 +747,13 @@ "question": "How many test takers are there at the school/s whose mailing city address is in Fresno", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.\"test takers\") FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t2.\"mailcity\" = 'Fresno'", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.postal = 'Fresno'", "gold": "SELECT t1.numtsttakr FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cds = t2.cdscode WHERE t2.mailcity = 'Fresno'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 54, @@ -599,10 +761,13 @@ "question": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.school, t2.\"zip code\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cdscode\" = t2 \"cdscodes\" WHERE t1.name = 'Avetik Atoian'", + "pred": "SELECT t1.school, t2.\"school code\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.first = 'Atoian' AND t2.last = 'Atoian'", "gold": "SELECT school, mailzip FROM schools WHERE admfname1 = 'Avetik' AND admlname1 = 'Atoian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 55, @@ -610,10 +775,13 @@ "question": "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", "evidence": "Ratio = count(schools in Colusa) / count(schools in Humboldt)", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN state = 'California' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(schools) FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.dist = t2.dist", + "pred": "SELECT CAST(SUM(CASE WHEN mailstate = 'California' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN mailstate = 'Humboldt' THEN 1 ELSE 0 END) FROM schools", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 56, @@ -621,10 +789,13 @@ "question": "Of all the schools with a mailing state address in California, how many are active in San Joaquin city", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM schools WHERE mailstate = 'San Joaquin'", + "pred": "SELECT COUNT(*) FROM schools WHERE mailcity = 'San Joaquin' AND state = 'California'", "gold": "SELECT COUNT(cdscode) FROM schools WHERE city = 'San Joaquin' AND mailstate = 'CA' AND statustype = 'Active'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 57, @@ -632,10 +803,13 @@ "question": "What is the phone number and extension number for the school that had the 333rd highest average writing score", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.phone, t2.\"extension\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2._cds WHERE t1.\"average writing score\" = 333", + "pred": "SELECT t1.phone, t1.ext FROM schools AS t1 INNER JOIN \"fpm\" AS t2 ON t1.cdscode = t2.cdscode WHERE t2.avgscrwrite = (SELECT MAX(avgscrwrite) FROM fpm)", "gold": "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 1 OFFSET 332", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 58, @@ -643,10 +817,13 @@ "question": "What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name", "evidence": "", "difficulty": "simple", - "pred": "SELECT phone, extension number FROM schools WHERE zip code 95203-3704", + "pred": "SELECT phone, extension FROM schools WHERE zipcode = 95203-3704", "gold": "SELECT phone, ext, school FROM schools WHERE zip = '95203-3704'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 59, @@ -654,10 +831,13 @@ "question": "What is the website for the schools under the administrations of Mike Larson and Dante Alvarez", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT website FROM schools WHERE administrations = 'Mike Larson and Dante Alvarez'", + "pred": "SELECT DISTINCT t1.homepage FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.first = 'Mike' AND t2.last = 'Alvarez' AND t2.last = 'Larman'", "gold": "SELECT website FROM schools WHERE (admfname1 = 'Mike' AND admlname1 = 'Larson') OR (admfname1 = 'Dante' AND admlname1 = 'Alvarez')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 60, @@ -665,10 +845,13 @@ "question": "What are the websites for all the partially virtual chartered schools located in San Joaquin", "evidence": "Virtual = 'P' means partially virtual; Charter schools refers to Charter = 1 in the table schools", "difficulty": "simple", - "pred": "SELECT DISTINCT website FROM schools WHERE charternum = 1 AND virtual = 'P'", + "pred": "SELECT DISTINCT t1.homepage FROM schools AS t1 INNER JOIN \"charter schools\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.charter = 1 AND t1.region = 'San Joaquin'", "gold": "SELECT website FROM schools WHERE county = 'San Joaquin' AND virtual = 'P' AND charter = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 61, @@ -676,10 +859,13 @@ "question": "How many chartered schools located in the city of Hickman are owned by the Elementary School District", "evidence": "Elementary School District refers to DOC = 52; Chartered schools refer to Charter = 1 in the table schools", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM schools WHERE charter = 1 AND city = 'Hickman' AND charter = 52", + "pred": "SELECT COUNT(*) FROM schools WHERE charternum = 52 AND city = 'Hickman'", "gold": "SELECT COUNT(school) FROM schools WHERE doc = 52 AND charter = 1 AND city = 'Hickman'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 62, @@ -687,10 +873,13 @@ "question": "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%", "evidence": "non-chartered schools refer to schools whose Charter = 0; K-12 means grades 1 through 12; percent of eligible free rate for K-12 = \"Free Meal Count (K-12)\" * 100 / \"Enrollment (K-12)\"", "difficulty": "challenging", - "pred": "SELECT COUNT(*) FROM schools WHERE \"charter school\" = 0 AND \"free meal count (K-12)\" * 100 / (SELECT CAST(SUBSTRING(CASE WHEN t1.charter = 0 THEN 1 ELSE 0 END) AS REAL) * 100 FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t2.districtname = t1.\"district name\" WHERE t2.\"school name\" = 'Los Angeles'", + "pred": "SELECT COUNT(*) FROM schools WHERE charternum = 0 AND \"free meal count (K-12)' * 100 / \"Enrollment (K-12)\" < 0.18", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 63, @@ -698,10 +887,13 @@ "question": "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", "evidence": "Chartered schools refer to Charter = 1 in the table schools; Full name refers to first name, last name", "difficulty": "simple", - "pred": "SELECT first name, last name, city FROM schools WHERE charter = 1 AND charternum = 1", + "pred": "SELECT t1.firstname, t1.lastname, t2.\"school name\" FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t1.charter = 00D2", "gold": "SELECT admfname1, admlname1, school, city FROM schools WHERE charter = 1 AND charternum = '00D2'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 64, @@ -709,10 +901,13 @@ "question": "What is the total number of schools with a mailing city in Hickman belonging to the charter number 00D4", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"charter school\" AS t2 ON t1.cds = t2.cdscode WHERE t2.\"charter number\" = 00D4", + "pred": "SELECT COUNT(*) FROM schools WHERE charternum = 00D4", "gold": "SELECT COUNT(*) FROM schools WHERE charternum = '00D4' AND mailcity = 'Hickman'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 65, @@ -720,10 +915,13 @@ "question": "What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding", "evidence": "Ratio in percentage = (count(locally funded schools in Santa Clara) / count(all funding type schools in Santa Clara) * 100%", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.charter school number = 'Santa Clara' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.district name) FROM schools AS t1 INNER JOIN \"charter funding type\" AS t2 ON t1.cdscode = t2.\"charter\"type\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.charter fundingtype = 'local funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t1.charter fundingtype = 'charter funded type' THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cds = t2.cds", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 66, @@ -731,10 +929,13 @@ "question": "Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus", "evidence": "Directly funded schools refers to FundingType = 'Directly Funded'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM schools WHERE county = 'Stanislaus' AND fundingtype = 'Directly Funded'", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"charter school\" AS t2 ON t1.cdscode = t2.\"charter school\" WHERE t1.county = 'Stanislaus' AND t2.\"school type\" = 'Directly Funded' AND t2. Fundingtype = 'Directly Funded'", "gold": "SELECT COUNT(school) FROM schools WHERE STRFTIME('%Y', opendate) BETWEEN '2000' AND '2005' AND county = 'Stanislaus' AND fundingtype = 'Directly funded'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 67, @@ -742,10 +943,13 @@ "question": "What is the total amount of Community College District closure in 1989 in the city of San Francisco", "evidence": "", "difficulty": "simple", - "pred": "SELECT SUM(CASE WHEN t2.district name = 'Community College District' THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.\"cds\" WHERE t1.\"city\" = 'San Francisco'", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.city = 'San Francisco' AND t2.district = 'Community College District' AND STRFTIME('%Y', t2.closingdate) ='1989'", "gold": "SELECT COUNT(school) FROM schools WHERE STRFTIME('%Y', closeddate) = '1989' AND city = 'San Francisco' AND doctype = 'Community College District'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 68, @@ -753,10 +957,13 @@ "question": "Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)", "evidence": "Youth Authority Facilities (CEA) refers to SOC = 11; 1980s = years between 1980 and 1989", "difficulty": "moderate", - "pred": "SELECT t2.\"county code\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"school code\" = 'Youth Authority Facilities (CEA)'", + "pred": "SELECT t2.county name FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.ssc = 11 AND t2.year BETWEEN 1980 AND 1989 GROUP BY t2.county ORDER BY COUNT(t1.cdscode) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 69, @@ -764,10 +971,13 @@ "question": "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", "evidence": "State Special Schools means that SOC = 31.", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"school code\" FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.\"district code\" = t2.dist WHERE t1.school code = 'State Special Schools'", + "pred": "SELECT DISTINCT t1.\"district name\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.ssc = 31", "gold": "SELECT ncesdist FROM schools WHERE soc = 31", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 70, @@ -775,10 +985,13 @@ "question": "How many active and closed District Community Day Schools are there in the county of Alpine", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM schools WHERE county = 'Alpine'", + "pred": "SELECT COUNT(t1.cdscode) FROM schools AS t1 INNER JOIN \"community day\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.county = 'Alpine' AND t2.\"district name\" = 'District Community Day'", "gold": "SELECT COUNT(school) FROM schools WHERE (statustype = 'Closed' OR statustype = 'Active') AND soc = 69 AND county = 'Alpine'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 71, @@ -786,10 +999,13 @@ "question": "What is the district code for the School that does not offer a magnet program in the city of Fresno", "evidence": "When magent is equal to 0 in the database, it means ths school doesn't offer a magnet program.", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"district code\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cds WHERE t1.\"magent\" = 0 AND t2 \"city\" = 'Fresno'", + "pred": "SELECT t2.\"district code\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.city = 'Fresno' AND t2.magent = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 72, @@ -797,10 +1013,13 @@ "question": "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", "evidence": "State Special School means EdOpsCode = 'SSS'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM schools WHERE edopscode = 'SSS' AND \"age of 5 to 17\" = '17'", + "pred": "SELECT COUNT(t1.cname) FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.educationopscode = 'SSS' AND t1.ages 5 AND 17", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 73, @@ -808,10 +1027,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT \"free meal count\" FROM schools WHERE mailingstreet = 'PO Box 1040'", + "pred": "SELECT DISTINCT \"free meal count (k-12)' - \"free meal count (k-12)' FROM schools WHERE mailingstreet = 'Youth Authority School' AND ages 5 AND 17", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 74, @@ -819,10 +1041,13 @@ "question": "What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 0613360", "evidence": "District Special Education Consortia School refers to EdOpsCode = 'SPECON'.", "difficulty": "moderate", - "pred": "SELECT \"low grade\" FROM schools WHERE \"school code\" = 'SPECON' AND school district identification number = 0613360", + "pred": "SELECT t2.\"low grade\" FROM schools AS t1 INNER JOIN fpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.educationcode = 'SPECON' AND t1.district = 0613360", "gold": "SELECT MIN(t1.\"low grade\") FROM frpm AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t2.ncesdist = '0613360' AND t2.edopscode = 'SPECON'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 75, @@ -830,10 +1055,13 @@ "question": "What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"school name\" FROM schools AS t1 INNER JOIN \"nslp provision status\" AS t2 ON t1.\"district name\" = t2.district code WHERE t1.county code = 37", + "pred": "SELECT DISTINCT t1.\"educational option type\", t2.\"school name\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.\"county code\" = 37 AND t2.\"breakfast provision status\" = 'Education'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 76, @@ -841,10 +1069,13 @@ "question": "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", "evidence": "High school can be represented as EILCode = 'HS'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.city FROM schools AS t1 INNER JOIN fpm AS t2 ON t1.cdscode = t2.\"fpm\" WHERE t1.\"lunch provision status\" = 'HS'", + "pred": "SELECT t1.city FROM schools AS t1 INNER JOIN satscores AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"nslp provision status\" = 'HS' AND t1.\"low grade\" = 9 AND t1.\"high grade\" = 12", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 77, @@ -852,10 +1083,13 @@ "question": "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)", "evidence": "Percent (%) Eligible FRPM (Ages 5-17) can be acquired by \"FRPM Count (Ages 5-17)\" / \"Enrollment (Ages 5-17)\" * 100", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.\"school name\" FROM schools AS t1 INNER JOIN \"frpm\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"grade span\" = 'Kindergarten to 9th grade' AND \"enrollment (Ages 5-17)\"", + "pred": "SELECT t1.\"school name\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"grade\" BETWEEN 'Kindergarten' AND '9th grade' AND t2.county = 'Los Angeles' AND t2.\"grade\" BETWEEN 'Kindergarten' AND '9th grade'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 78, @@ -863,10 +1097,13 @@ "question": "What is the most common type of grade span served in the city of Adelanto", "evidence": "", "difficulty": "simple", - "pred": "SELECT \"school type\" FROM schools WHERE city = 'Adelanto'", + "pred": "SELECT t2.\"high grade\" FROM schools AS t1 INNER JOIN \"routing\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.city = 'Adelanto' GROUP BY t2.\"high grade\" ORDER BY COUNT(t2.\"routing\") DESC LIMIT 1", "gold": "SELECT gsserved FROM schools WHERE city = 'Adelanto' GROUP BY gsserved ORDER BY COUNT(gsserved) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 79, @@ -874,10 +1111,13 @@ "question": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount", "evidence": "'Does not offer physical building' means Virtual = F in the database.", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.district name) FROM schools AS t1 INNER JOIN counties AS t2 ON t1.cdscode = t2.cds WHERE t2.\"virtual\" = 'F' AND t1.\"county name\" LIKE 'san Diego' AND \"Santa Barbara County\" LIKE \"SAN DIEGO\" AND t3.virtual = 'Santa Barbara'", + "pred": "SELECT county, COUNT(cdscode) FROM schools WHERE \"district name\" = 'San Diego' AND \"district name\" = 'Santa Barbara' AND virtual = 'F' GROUP BY county ORDER BY COUNT(cdscode) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 80, @@ -885,10 +1125,13 @@ "question": "What is the school type of the school with the highest latitude? Indicate the name of the school as well as the latitude coordinates", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.\"school type\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"latitude\" = 'y/n'", + "pred": "SELECT t2.\"school type\", t1.latitude, t1.latitude FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode ORDER BY t1.latitude DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 81, @@ -896,10 +1139,13 @@ "question": "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", "evidence": "State of California refers to state = 'CA'", "difficulty": "moderate", - "pred": "SELECT t2.\"school name\" FROM schools AS t1 INNER JOIN state AS t2 ON t1.state = t2.state WHERE t1.\"state\" = 'CA'", + "pred": "SELECT t1.city, t2.\"low grade\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t2.state = 'CA' GROUP BY t1.city, t2.\"low grade\" ORDER BY t1.latitude ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 82, @@ -907,10 +1153,13 @@ "question": "What is the grade span offered in the school with the highest longitude", "evidence": "the highest longitude refers to the school with the maximum absolute longitude value.", "difficulty": "simple", - "pred": "SELECT \"grade span\" FROM schools WHERE latitude = (SELECT MAX(longitude) FROM schools)", + "pred": "SELECT t2.\"high grade\" FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.latitude = (SELECT MAX(latitude) FROM frpm)", "gold": "SELECT gsoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 83, @@ -918,10 +1167,13 @@ "question": "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", "evidence": "Kindergarten to 8th grade refers to K-8; 'Offers a magnet program' means Magnet = 1; Multiple Provision Types refers to \"NSLP Provision Status\" = 'Multiple Provision Types'", "difficulty": "challenging", - "pred": "SELECT COUNT(*) FROM schools WHERE \"nslp provision status\" = 'Multiple Provision Types'", + "pred": "SELECT COUNT(DISTINCT t1.district), COUNT(DISTINCT t1.city) FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cdscode WHERE t1.k-8 = 1 AND t2.\"nslp provision status\" = 'Multiple Provision Types'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 84, @@ -929,10 +1181,13 @@ "question": "What are the two most common first names among the school administrators? Indicate the district to which they administer", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"district name\" FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.cdscode = t2.cds WHERE t1.\"academic year\" = '2013-14'", + "pred": "SELECT t1.firstname, t2.\"district name\" FROM schools AS t1 INNER JOIN fpm AS t2 ON t1.cdscode = t2.cdscode GROUP BY t1.firstname, t2.district ORDER BY COUNT(t1.cdscode) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 85, @@ -940,10 +1195,13 @@ "question": "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", "evidence": "Percent (%) Eligible Free (K-12) = \"Free Meal Count (K-12)\" / \"Enrollment (K-12)\" * 100%", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.firstname = 'Alusine' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.districtcode) FROM schools AS t1 INNER JOIN \"fpm\" AS t2 ON t1.\"cdscode\" = t2.\"district name\" WHERE t2.first name = 'Eusine')", + "pred": "SELECT CAST(SUM(CASE WHEN t2.\"free meal count (K-12)\" / \"Enrollment (K-12)\" THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t2.\"free meal count (K-12)\" THEN 1 ELSE 0 END) FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.firstname = 'Alusine'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 86, @@ -951,10 +1209,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.\"district name\" FROM schools AS t1 INNER JOIN \"district\" AS t2 ON t1.districtname = t2.distorder WHERE t1.\"charter school number\" = 40", + "pred": "SELECT t1.lastname, t2.district, t2.county, t1.school FROM schools AS t1 INNER JOIN \"charter school (y/n)' AS t2 ON t1.cdscode = t2.cdscode WHERE t2.\"charter school number\" = 40", "gold": "SELECT admlname1, district, county, school FROM schools WHERE charternum = '0040'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 87, @@ -962,10 +1223,13 @@ "question": "What are the valid e-mail addresses of the administrator of the school located in the San Bernardino county, City 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 Schools", "evidence": "Intermediate/Middle Schools refers to SOC = 62; Unified School refers to DOC = 54; years between 2009 and 2010 can refer to 'between 1/1/2009 to 12/31/2010'", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.emailaddress FROM schools AS t1 INNER JOIN \"districts\" AS t2 ON t1.districtcode = t2.\"district\" WHERE t1.\"schooltype\" = 'Public Intermediate/Middle Schools' AND STRFTIME('%Y', '%J', '') BETWEEN 1/1/2009 AND '12/31/2010'", + "pred": "SELECT DISTINCT t2.email FROM schools AS t1 INNER JOIN frpm AS t2 ON t1.cdscode = t2.cdscode WHERE t1.county = 'San Bernardino County' AND t1.facilitytype = 'Public Intermediate/Middle Schools' AND t1.doc = 54", "gold": "SELECT t2.admemail1, t2.admemail2 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 88, @@ -973,10 +1237,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.email FROM schools AS t1 INNER JOIN \"satscores\" AS t2 ON t1.\"cds\" = t2.cdscode WHERE t2.\"score\" = 1500", + "pred": "SELECT t2.email FROM satscores AS t1 INNER JOIN schools AS t2 ON t1.cdscode = t2.cdscode WHERE t1.satscore >= 1500 GROUP BY t2.school ORDER BY COUNT(t1.satscore) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 89, @@ -984,10 +1251,13 @@ "question": "How many accounts who choose issuance after transaction are staying in East Bohemia region", "evidence": "A3 contains the data of region; 'POPLATEK PO OBRATU' represents for 'issuance after transaction'.", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE region = 'East Bohemia' AND name = 'POPLATEK PO OBRATU'", + "pred": "SELECT COUNT(*) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'East Bohemia' AND t1.issue = 'issuance after transaction'", "gold": "SELECT COUNT(t2.account_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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 90, @@ -995,10 +1265,13 @@ "question": "How many accounts who have region in Prague are eligible for loans", "evidence": "A3 contains the data of region", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE region = 'Prague'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'Prague'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 91, @@ -1006,10 +1279,13 @@ "question": "The average unemployment ratio of 1995 and 1996, which one has higher percentage", "evidence": "A12 refers to unemploymant rate 1995; A13 refers to unemploymant rate 1996", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2. unemploymant rate 1995 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.employee_id) FROM employeepay AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"employee\" rate 1996", + "pred": "SELECT CAST(SUM(IIF(a12 = 'A13', 1, 0)) AS REAL) / SUM(IIF(a12 = '1996', 1, 0)) FROM employeepayhistory ORDER BY CAST(SUM(IIF(a12 = 'A13', 1, 0)) DESC LIMIT 1", "gold": "SELECT DISTINCT IIF(AVG(a13) > AVG(a12), '1996', '1995') FROM district", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 92, @@ -1017,10 +1293,13 @@ "question": "List out the no. of districts that have female average salary is more than 6000 but less than 10000", "evidence": "A11 refers to average salary; Female mapps to gender = 'F'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district_id FROM district AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.\"district\"_id WHERE t1.\"gender\" = 'F' AND AVG(t2.average salary) = 6000 AND t1.'gender\" <> 'Female'", + "pred": "SELECT t1.district_id FROM district AS t1 INNER JOIN client AS t2 ON t1.district_id = t2.district_id WHERE t2.gender = 'F' AND t1.a11 < 6000", "gold": "SELECT COUNT(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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 93, @@ -1028,10 +1307,13 @@ "question": "How many male customers who are living in North Bohemia have average salary greater than 8000", "evidence": "Male means that gender = 'M'; A3 refers to region; A11 pertains to average salary.", "difficulty": "moderate", - "pred": "SELECT COUNT(customer_id) FROM client WHERE gender = 'M' AND average salary greater than 8000", + "pred": "SELECT COUNT(t1.gender) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'North Bohemia' AND t1.gender = 'M' AND t1.a1.a2 = 'A1' AND t1.a3 = 'a4' AND t1.a5 = 'a6'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 94, @@ -1039,10 +1321,13 @@ "question": "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", "evidence": "Female means gender = 'F'; A11 refers to average salary; Gap = highest average salary - lowest average salary; If the person A's birthdate > B's birthdate, it means that person B is order than person A.", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.account_id FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client_name\" WHERE t1.\"gender\" = 'F' ORDER BY t3.average salary DESC LIMIT 1", + "pred": "SELECT t1.account_id, AVG(t1.average salary) FROM client AS t1 INNER JOIN order AS t2 ON t1.account_id = t2.account_id WHERE t1.gender = 'F' GROUP BY t1.account_id ORDER BY AVG(t1.average salary) ASC LIMIT 1", "gold": "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 INNER JOIN disp AS t3 ON t1.account_id = t3.account_id INNER JOIN client AS t4 ON t3.client_id = t4.client_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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 95, @@ -1050,10 +1335,13 @@ "question": "List out the account numbers of clients who are youngest and have highest average salary", "evidence": "If the person A's birthdate < B's birthdate, it means that person B is younger than person A; A11 refers to average salary", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.account_id FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"birthdate\" < (SELECT AVG(birthdate) FROM client)", + "pred": "SELECT COUNT(t1.account_id) FROM client AS t1 INNER JOIN employeepayhistory AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'B' AND t1.averagesalary = (SELECT MAX(averagesalary) FROM client)", "gold": "SELECT t1.account_id FROM account AS t1 INNER JOIN disp AS t2 ON t1.account_id = t2.account_id INNER JOIN client AS t3 ON t2.client_id = t3.client_id INNER JOIN district AS t4 ON t4.district_id = t1.district_id WHERE t2.client_id = (SELECT client_id FROM client ORDER BY birth_date DESC LIMIT 1) GROUP BY t4.a11, t1.account_id", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 96, @@ -1061,10 +1349,13 @@ "question": "How many customers who choose statement of weekly issuance are Owner", "evidence": "'POPLATEK TYDNE' stands for weekly issuance", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE name = 'POPLATEK TYDNE'", + "pred": "SELECT COUNT(*) FROM card WHERE type = 'Owner' AND issued = 'POPLATEK TYDNE'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 97, @@ -1072,10 +1363,13 @@ "question": "List out the id number of client who choose statement of issuance after transaction are Disponent", "evidence": "'POPLATEK PO OBRATU' stands for issuance after transaction", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.client_id FROM client AS t1 INNER JOIN disp AS t2 ON t1.disp_id = t2.\"client\" WHERE t1.\"name\" = 'POPLATEK PO OBRATU'", + "pred": "SELECT COUNT(t1.client_id) FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE t2.issue = 'POPLATEK PO OBRATU'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 98, @@ -1083,10 +1377,13 @@ "question": "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", "evidence": "'POPLATEK TYDNE' stands for weekly issuance", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.account_id FROM account AS t1 INNER JOIN order AS t2 ON t1.ordernumber_id = t2.\"account_name\" WHERE t1.\"date\" = '1997' ORDER BY t3.amount DESC LIMIT 1", + "pred": "SELECT t1.account_id, t1.rate FROM account AS t1 INNER JOIN card AS t2 ON t1.account_id = t2.account_id WHERE t2.date = '1997-01-01' ORDER BY t1.rate ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 99, @@ -1094,10 +1391,13 @@ "question": "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", "evidence": "Loan validity more than 12 months refers to duration > 12", "difficulty": "moderate", - "pred": "SELECT t2.account_id FROM account AS t1 INNER JOIN loan AS t2 ON t1.\"account\"_id\" = t2.\"accountid\" WHERE t1.duration > 12 AND STRFTIME('%Y', t1.'date) > '1993'", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN loan AS t2 ON t1.account_id = t2.account_id WHERE t2.duration > 12 AND STRFTIME('%Y', t2.date) = '1993' ORDER BY t1.amount DESC LIMIT 1", "gold": "SELECT t1.account_id FROM loan AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE STRFTIME('%Y', t2.date) = '1993' AND t1.duration > 12 ORDER BY t1.amount DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 100, @@ -1105,10 +1405,13 @@ "question": "Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov", "evidence": "Customers refer to clients; Female refers to gender = 'F'; Names of districts appear in column A2", "difficulty": "moderate", - "pred": "SELECT COUNT(client_id) FROM client WHERE gender = 'F' AND birth_date = 1950 AND stayin Sokolov", + "pred": "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 t1.birth_date < 1950 AND t2.city = 'Sokolov'", "gold": "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 = 'Sokolov'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 101, @@ -1116,10 +1419,13 @@ "question": "List out the accounts who have the earliest trading date in 1995", "evidence": "", "difficulty": "simple", - "pred": "SELECT account_id FROM account WHERE date = 1995", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN order AS t2 ON t1.account_id = t2.account_id WHERE STRFTIME('%Y', t2.date) = '1995' ORDER BY t2.date DESC LIMIT 1", "gold": "SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 102, @@ -1127,10 +1433,13 @@ "question": "State different accounts who have account opening date before 1997 and own an amount of money greater than 3000USD", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.account_id FROM account AS t1 INNER JOIN loan AS t2 ON t1.department_id = t2._department WHERE t1.\"date\" = '1997' AND t2.\"amount\" = 3000USD", + "pred": "SELECT DISTINCT t1.account_id FROM account AS t1 INNER JOIN lending AS t2 ON t1.account_id = t2.account_id WHERE t2.amount > 3000USD AND t1.date < 1997", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 103, @@ -1138,10 +1447,13 @@ "question": "Which client issued his/her card in 1994/3/3, give his/her client id", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.client_id FROM client AS t1 INNER JOIN card AS t2 ON t1.district_id = t2.\"district\" WHERE t1.\"date\" = '1994/3/3'", + "pred": "SELECT t1.client_id FROM card AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.client_id WHERE STRFTIME('%Y-%m', t1.issue) = '1994-03-03'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 104, @@ -1149,10 +1461,13 @@ "question": "The transaction of 840 USD happened in 1998/10/14, when was this account opened", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.date FROM account AS t1 INNER JOIN transaction AS t2 ON t1.\"account_id\" = t2.\"account\" WHERE t1.amount = 840 USD", + "pred": "SELECT t2.date FROM account AS t1 INNER JOIN \"transaction\" AS t2 ON t1.account_id = t2.account_id WHERE t1.amount = 840 USD AND STRFTIME('%Y-%m-%d', t2.date) = '1998-10-14'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 105, @@ -1160,10 +1475,13 @@ "question": "There was a loan approved in 1994/8/25, where was that account opened, give the district Id of the branch", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district_id FROM account AS t1 INNER JOIN loan AS t2 ON t1.account_id = t2.\"account\" WHERE t1.\"date\" = '1994/8/25'", + "pred": "SELECT t1.district_id FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.date = '1994-08-25'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 106, @@ -1171,10 +1489,13 @@ "question": "What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t2.transaction_id) FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.district_id WHERE t1.\"date\" = '1996/10/21'", + "pred": "SELECT t1.amount FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE STRFTIME('%Y-%m', t2.date) = '1996-10-21' ORDER BY t1.amount DESC LIMIT 1", "gold": "SELECT t4.amount FROM card AS t1 JOIN disp AS t2 ON t1.disp_id = t2.disp_id JOIN account AS t3 ON t2.account_id = t3.account_id JOIN trans AS t4 ON t3.account_id = t4.account_id WHERE t1.issued = '1996-10-21' ORDER BY t4.amount DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 107, @@ -1182,10 +1503,13 @@ "question": "What is the gender of the oldest client who opened his/her account in the highest average salary branch", "evidence": "Earlier birthdate refers to older age; A11 refers to average salary", "difficulty": "simple", - "pred": "SELECT t2.gender FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"average salary\" = (SELECT AVG(average salary) FROM client)", + "pred": "SELECT t1.gender FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id WHERE t2.a11 = (SELECT AVG(a1.a1.a1.a1.a2) FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id WHERE t2.rate = (SELECT AVG(a1.a2) FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 108, @@ -1193,10 +1517,13 @@ "question": "For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.amount FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"name\" = 'Loan'", + "pred": "SELECT t1.amount FROM client AS t1 INNER JOIN lending AS t2 ON t1.client_id = t2.client_id WHERE t2.amount = (SELECT MAX(amount) FROM lending)", "gold": "SELECT t3.amount FROM loan AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id INNER JOIN trans AS t3 ON t2.account_id = t3.account_id ORDER BY t1.amount DESC, t3.date ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 109, @@ -1204,10 +1531,13 @@ "question": "How many clients opened their accounts in Jesenik branch were women", "evidence": "A2 has region names; Woman and female share the same meaning; female refers to gender = 'F'", "difficulty": "simple", - "pred": "SELECT COUNT(client_id) FROM client WHERE gender = 'F' AND region = 'Jesenik'", + "pred": "SELECT COUNT(t1.client_id) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'Jesenik' AND t1.gender = 'F'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 110, @@ -1215,10 +1545,13 @@ "question": "What is the disposition id of the client who made 5100 USD transaction in 1998/9/2", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.repossername FROM client AS t1 INNER JOIN disp AS t2 ON t1.disp_id = t2.\"client_id\" WHERE t1.\"date\" = '1998/9/2'", + "pred": "SELECT t2.disp_id FROM transaction AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.client_id WHERE STRFTIME('%Y-%m', t1.date) = '1998-09-02' AND t1.amount = 5100", "gold": "SELECT t1.disp_id FROM disp AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id INNER JOIN trans AS t3 ON t2.account_id = t3.account_id WHERE t3.date = '1997-08-20' AND t3.amount = 5100", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 111, @@ -1226,10 +1559,13 @@ "question": "How many accounts were opened in Litomerice in 1996", "evidence": "A2 refers to district name; Litomerice is one of district names.", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE district = 'Litomerice'", + "pred": "SELECT COUNT(account_id) FROM account WHERE district_name = 'Litomerice' AND date = '1996'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 112, @@ -1237,10 +1573,13 @@ "question": "For the female client who was born in 1976/1/29, which district did she opened her account", "evidence": "Female refers to gender = 'F'; A2 refers to district names", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district_name FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"gender\" = 'F'", + "pred": "SELECT t2.district_id FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.gender = 'F' AND t1.birth_date = '1976-01-29'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 113, @@ -1248,10 +1587,13 @@ "question": "For the client who applied 98832 USD loan in 1996/1/3, when was his/her birthday", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.birth_date FROM client AS t1 INNER JOIN loan AS t2 ON t1.client_id = t2.\"client\"", + "pred": "SELECT t1.birth_date FROM client AS t1 INNER JOIN lending AS t2 ON t1.client_id = t2.client_id WHERE t2.rate = 98832 USD AND t2.date = '1996-01-03'", "gold": "SELECT t4.birth_date FROM loan AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id INNER JOIN disp AS t3 ON t2.account_id = t3.account_id INNER JOIN client AS t4 ON t3.client_id = t4.client_id WHERE t1.date = '1996-01-03' AND t1.amount = 98832", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 114, @@ -1259,10 +1601,13 @@ "question": "For the first client who opened his/her account in Prague, what is his/her account ID", "evidence": "A3 stands for region names", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.account_id FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"region\" = 'Prague'", + "pred": "SELECT t1.account_id FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'Prague'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 115, @@ -1270,10 +1615,13 @@ "question": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients", "evidence": "Percentage of the male clients = DIVIDE(COUNT(male clients), COUNT(clients)) * 100; Male refers to gender = 'M', A3 is the region name. A4 contains the information about inhabitants.", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\"", + "pred": "SELECT CAST(SUM(IIF(t1.gender = 'M', 1, 0)) AS REAL) * 100 / COUNT(t1.gender) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region name = 'South Bohemia' AND t1.gender = 'M'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 116, @@ -1281,10 +1629,13 @@ "question": "For the client whose loan was approved first in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27", "evidence": "Increase rate of his/her account balance = [(balance of date A - balance of date B) / balance of Date B] * 100%", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.date = '1993-7-5' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.\"account_name\" WHERE t1.\"date\" = '1998-12-27'", + "pred": "SELECT CAST(SUM(IIF(STRFTIME('%Y', date) = '1993-07-05', t1.balderman, 0)) AS REAL) * 100 / SUM(IIF(STRFTIME('%Y', date) = '1998-12-27', t1.balderman, 0)) FROM client AS t1 INNER JOIN lending AS t2 ON t1.client_id = t2.client_id WHERE STRFTIME('%Y', date) = '1993-07-05'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 117, @@ -1292,10 +1643,13 @@ "question": "What is the percentage of loan amount that has been fully paid with no issue", "evidence": "Loan paid with no issue means contract finished, no problems; status = 'A' means contract finished, no problems; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100%", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.status = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM loan AS t1 INNER JOIN payment AS t2 ON t1.payment_id = t2.\"payment\"", + "pred": "SELECT CAST(SUM(t1.amount) AS REAL) * 100 / SUM(t1.amount) FROM loan AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE t1.status = 'A'", "gold": "SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 118, @@ -1303,10 +1657,13 @@ "question": "For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue", "evidence": "Status = 'C' stands for running contract, ok so far; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100.", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.amount = 'USD100,000' THEN 1 ELSE 0 END) AS REAL) * 100 / (SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN loan AS t2 ON t2.credit_id = t1.\"account\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.status = 'C' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM account AS t1 INNER JOIN loan AS t2 ON t1.account_id = t2.account_id WHERE t2.amount < USD100,000", "gold": "SELECT CAST(SUM(status = 'C') AS REAL) * 100 / COUNT(account_id) FROM loan WHERE amount < 100000", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 119, @@ -1314,10 +1671,13 @@ "question": "For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region", "evidence": "Records about district names could be found in A2; A3 contains the information about regions. 'POPLATEK PO OBRATU' stands for issuance after transaction", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_id, t1.region_name FROM account AS t1 INNER JOIN district AS t2 ON t1.\"district\" = t2.\"distinct\" WHERE t1.'pOPLATEK PO OBRATU' = '1993'", + "pred": "SELECT t1.account_id, t1.district_name, t2.region FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE STRFTIME('%Y', t1.issue) = '1993' AND t1.a2 = 'POPLATEK PO OBRATU'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 120, @@ -1325,10 +1685,13 @@ "question": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance", "evidence": "Accounts holder refers to the person who own this account.", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.frequency FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\" WHERE t1.\"date\" = '1995-2000'", + "pred": "SELECT t1.address_id, t1.frequency FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.address = 'east Bohemia' AND t1.date BETWEEN '1995' AND '2000'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 121, @@ -1336,10 +1699,13 @@ "question": "List account ID and account opening date for accounts from 'Prachatice'", "evidence": "A2 refers to the names of districts.", "difficulty": "simple", - "pred": "SELECT account_id, date FROM account WHERE district = 'Prachatice'", + "pred": "SELECT t1.account_id, t1.account_opening date FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.a2 = 'Prachatice'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 122, @@ -1347,10 +1713,13 @@ "question": "State the district and region for loan ID '4990'", "evidence": "A2, A3 contains the information about district and region respectively.", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.district, t2.region FROM district AS t1 INNER JOIN loan AS t2 ON t1.\"district_id\" = t2._districtid WHERE t2.\"loan\" = '4990'", + "pred": "SELECT t1.district_id, t1.region FROM district AS t1 INNER JOIN lending AS t2 ON t1.district_id = t2.district_id WHERE t2.loan_id =4990", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 123, @@ -1358,10 +1727,13 @@ "question": "Provide the account ID, district and region for loan amount greater than USD300,000", "evidence": "A2 contains district names and A3 contains region names.", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district, t1.region FROM account AS t1 INNER JOIN loan AS t2 ON t1.\"account_id\" = t2.\"account\" WHERE t2\".amount\" > 300,000", + "pred": "SELECT t1.account_id, t1.district_id, t1.region FROM district AS t1 INNER JOIN lending AS t2 ON t1.district_id = t2.district_id WHERE t2.amount > 300000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 124, @@ -1369,10 +1741,13 @@ "question": "List the loan ID, district and average salary for loan with duration of 60 months", "evidence": "A3 refers to regions; A11 refers to average salary", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district, t1.average salary FROM loan AS t1 INNER JOIN account AS t2 ON t1.\"account_id\" = t2.\"account\" WHERE t1\"duration\" = 60 months", + "pred": "SELECT t1.loan_id, t1.district_id, AVG(t1.rate) FROM loan AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.duration = 60", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 125, @@ -1380,10 +1755,13 @@ "question": "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", "evidence": "Unemployment increment rate in percentage = [(unemployment rate 2016 - unemployment rate 2015) / unemployment rate 2015] * 100; unemployment rate 2015 appears in the A12; unemployment rate 2016 appears in the A13; Loan contracts which are still running where client are in debt can be presented as status = 'D'", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.district, t1.state FROM client AS t1 INNER JOIN district AS t2 ON t1.\"district_id\" = t2.\"distinct\" WHERE t1.'status\" = 'D' AND t2.'unemployment rate 2016 - '2015'", + "pred": "SELECT t1.district_id, t2.state FROM district AS t1 INNER JOIN lending AS t2 ON t1.district_id = t2.district_id WHERE t2.status = 'D' AND STRFTIME('%Y', t2. unemployment_rate) BETWEEN '1995' AND '1996'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 126, @@ -1391,10 +1769,13 @@ "question": "Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993", "evidence": "A2 contains the information about district.", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.district_id = 'Decin' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.\"district\" = t2.\"distinct\" WHERE t1.date = '1993'", + "pred": "SELECT CAST(SUM(IIF(t2.district_id = 'Decin', 1, 0)) AS REAL) * 100 / COUNT(t1.account_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE STRFTIME('%Y', t1.date) = '1993'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 127, @@ -1402,10 +1783,13 @@ "question": "List the account IDs with monthly issuance of statements", "evidence": "'POPLATEK MESICNE' stands for monthly issuance", "difficulty": "simple", - "pred": "SELECT account_id FROM account WHERE monthly issuance = 'POPLATEK MESICNE'", + "pred": "SELECT account_id FROM card WHERE issued = (SELECT MAX( issued) FROM card)", "gold": "SELECT account_id FROM account WHERE frequency = 'POPLATEK MESICNE'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 128, @@ -1413,10 +1797,13 @@ "question": "List the top nine districts, by descending order, from the highest to the lowest, the number of female account holders", "evidence": "A2 refers to districts; Female refers to gender = 'F'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_id FROM district AS t1 INNER JOIN account AS t2 ON t1.\"district\"_id = t2\"id WHERE t1.gender = 'F' ORDER BY t2.\"gender\" DESC LIMIT 9", + "pred": "SELECT t1.district_id FROM district AS t1 INNER JOIN client AS t2 ON t1.district_id = t2.district_id WHERE t2.gender = 'F' GROUP BY t1.district_id ORDER BY COUNT(t1.district_id) DESC LIMIT 9", "gold": "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 9", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 129, @@ -1424,10 +1811,13 @@ "question": "Which are the top ten withdrawals (non-credit card) by district names for the month of January 1996", "evidence": "Non-credit card withdraws refers to type = 'VYDAJ'; January 1996 can be found by date LIKE '1996-01%' in the database; A2 means district names", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_name FROM card AS t1 INNER JOIN district AS t2 ON t1.\"district\"id = t2.\"department\" WHERE t1.type = 'VYDAJ' AND STRFTIME('%Y', t2.'date) LIKE '1996-01%'", + "pred": "SELECT t2.district_id FROM card AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.type = 'VYDAJ' AND t1.date LIKE '1996-01%' GROUP BY t2.district_id ORDER BY COUNT(t2.district_id) DESC LIMIT 10", "gold": "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' AND t3.date LIKE '1996-01%' ORDER BY a2 ASC LIMIT 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 130, @@ -1435,10 +1825,13 @@ "question": "How many of the account holders in South Bohemia still do not own credit cards", "evidence": "A3 contains the region names; South Bohemia is one of region names.", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE region = 'South Bohemia'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region names = 'South Bohemia'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 131, @@ -1446,10 +1839,13 @@ "question": "Which district has highest active loan", "evidence": "A3 refers to district names; Active loan refers to running contracts; Status = 'C' stands for running contract, OK so far; Status = 'D' stands for running contract, client in debt", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_name FROM district AS t1 INNER JOIN account AS t2 ON t1.\"district\"_id = t2\"districtid WHERE t1.status = 'C' AND t2.\"status\" = 'D'", + "pred": "SELECT t2.district_id FROM loan AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.status = 'C' ORDER BY t1.payment DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 132, @@ -1457,10 +1853,13 @@ "question": "What is the average loan amount by male borrowers", "evidence": "Male refers to gender = 'M'", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM client AS t1 INNER JOIN loan AS t2 ON t1.client_id = t2.\"client\"", + "pred": "SELECT CAST(SUM(t1.amount) AS REAL) / COUNT(t1.account_id) FROM loan AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.client_id WHERE t2.gender = 'M'", "gold": "SELECT AVG(t4.amount) 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 loan AS t4 ON t3.account_id = t4.account_id WHERE t1.gender = 'M'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 133, @@ -1468,10 +1867,13 @@ "question": "In 1996, which districts have the highest unemployment rate? List their branch location and district name", "evidence": "A2 refers to district names; A13 refers to unemploymant rate in 1996", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district_name, t1.region_name FROM district AS t1 INNER JOIN account AS t2 ON t1.\"district\" = t2\".districtid\" WHERE t2.\" unemploymant rate\" = '1996'", + "pred": "SELECT t1.district_name, t2.a2, t2.district_name FROM district AS t1 INNER JOIN employeepayhistory AS t2 ON t1.district_id = t2.district_id WHERE t1.employeepayhistory = 1996 ORDER BY t1. unemploymant DESC LIMIT 1", "gold": "SELECT district_id, a2 FROM district ORDER BY a13 DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 134, @@ -1479,10 +1881,13 @@ "question": "In the branch where the largest number of crimes were committed in 1996, how many accounts were opened", "evidence": "A16 stands for no. of committed crimes 1996", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE no. of committed crimes 1996", + "pred": "SELECT COUNT(account_id) FROM account WHERE a16 = (SELECT a16 FROM account WHERE date = '1996' GROUP BY a16 ORDER BY COUNT(account_id) DESC LIMIT 1)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 135, @@ -1490,10 +1895,13 @@ "question": "After making a credit card withdrawal, how many account/s with monthly issuance has a negative balance", "evidence": "Negative balance means balance < 0; Operation = 'VYBER KARTOU' stands for credit card withdraw. Frequency = 'POPLATEK MESICNE' stands for monthly issurance", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE balance < 0 AND operation = 'VYBER KARTOU'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN trans AS t2 ON t1.account_id = t2.account_id INNER JOIN address AS t3 ON t2.address_id = t3.address_id WHERE t2.occurrences = 'Negative' AND t2.rate = 'POPLATEK MESICNE'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 136, @@ -1501,10 +1909,13 @@ "question": "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", "evidence": "Frequency = 'POPLATEK MESICNE' stands for monthly issurance", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE monthly issurance = 'POPLATEK MESICNE' AND amount = 250,000 AND date = '12/31/1997'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN lending AS t2 ON t1.account_id = t2.account_id WHERE t1.frequency = 'POPLATEK MESICNE' AND t1.amount > 250000 AND t1.date = '1997-12-31'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 137, @@ -1512,10 +1923,13 @@ "question": "How many accounts have running contracts in Branch location 1", "evidence": "Status = 'C' stands for running contract, OK so far; Status = 'D' stands for running contract, client in debt", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE status = 'C' AND client in debt = 1", + "pred": "SELECT COUNT(account_id) FROM account WHERE location = 1 AND status = 'C'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 138, @@ -1523,10 +1937,13 @@ "question": "In the branch where the second-highest number of crimes were committed in 1995 occurred, how many male clients are there", "evidence": "Male refers to gender = 'M'; A15 stands for no. of commited crimes 1995", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.client_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.accountid WHERE t1.\"gender\" = 'M' AND t2.\"commited crimes 1995\" = (SELECT CASE WHEN SUBSTRING(t2.gender) = 'A15' THEN 1 ELSE 0 END) AS count FROM client", + "pred": "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 MAX(a15) FROM district WHERE gender = 'M') AND t2.a1 = (SELECT MIN(a15) FROM district WHERE gender = 'M')", "gold": "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 OFFSET 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 139, @@ -1537,7 +1954,10 @@ "pred": "SELECT COUNT(*) FROM card WHERE type = 'OWNER'", "gold": "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 = 'OWNER'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 140, @@ -1545,10 +1965,13 @@ "question": "How many accounts are there in the district of \"Pisek\"", "evidence": "A2 refers to district name", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE district = 'Pisek'", + "pred": "SELECT COUNT(account_id) FROM account WHERE district_id = (SELECT district_id FROM district WHERE a2 = 'Pisek')", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 141, @@ -1556,10 +1979,13 @@ "question": "Which districts have transactions greater than USS$10,000 in 1997", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.district_id FROM district AS t1 INNER JOIN account AS t2 ON t1.\"district\"_id = t2\".districtid\" WHERE t1.transaction_value > USS$10,000", + "pred": "SELECT t2.district_id FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.amount > 10000 AND STRFTIME('%Y', t1.transaction_date) = '1997'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 142, @@ -1567,10 +1993,13 @@ "question": "Which accounts placed orders for household payment in Pisek", "evidence": "k_symbol = 'SIPO' refers to household payment", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.account_id FROM order AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"k_symbol\" = 'SIPO'", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN order AS t2 ON t1.account_id = t2.account_id INNER JOIN district AS t3 ON t1.district_id = t3.district_id WHERE t3.k_symbol = 'SIPO'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 143, @@ -1578,10 +2007,13 @@ "question": "What are the accounts that have gold credit cards", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.account_id FROM card AS t1 INNER JOIN account AS t2 ON t1.card_id = t2.\"card\"", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN creditcard AS t2 ON t1.account_id = t2.account_id WHERE t2.type = 'Gold'", "gold": "SELECT t2.account_id FROM disp AS t2 INNER JOIN card AS t1 ON t1.disp_id = t2.disp_id WHERE t1.type = 'gold'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 144, @@ -1589,10 +2021,13 @@ "question": "How much is the average amount in credit card made by account holders in a month, in year 2021", "evidence": "Operation = 'VYBER KARTOU' refers to credit card withdrawn", "difficulty": "moderate", - "pred": "SELECT AVG(t2.amount) FROM account AS t1 INNER JOIN credit card AS t2 ON t1.account_id = t2.Account_id WHERE t1.\"occurrences\" = '%YBER KARTOU' AND t2.\"date\" = 2021", + "pred": "SELECT CAST(SUM(t1.amount) AS REAL) / COUNT(t1.account_id) FROM account AS t1 INNER JOIN trans AS t2 ON t1.account_id = t2.account_id WHERE STRFTIME('%Y', t1.date) ='2021' AND t2.occupation = 'VYBER KARTOU'", "gold": "SELECT AVG(t4.amount) FROM card AS t1 INNER JOIN disp AS t2 ON t1.disp_id = t2.disp_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 STRFTIME('%Y', t4.date) = '1998' AND t4.operation = 'VYBER KARTOU'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 145, @@ -1600,10 +2035,13 @@ "question": "Who are the account holder identification numbers whose who have transactions on the credit card with the amount is less than the average, in 1998", "evidence": "Operation = 'VYBER KARTOU' refers to credit card withdrawal", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.account_id FROM account AS t1 INNER JOIN order AS t2 ON t1.\"account\" = t2.\"accounts_id\" WHERE t1.amount = 'VYBER KARTOU' AND t3.amount < (SELECT AVG(amount) FROM account)", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN trans AS t2 ON t1.account_id = t2.account_id WHERE t2.occupation = 'VYBER KARTOU' AND STRFTIME('%Y', t1.amount) < '1998'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 146, @@ -1611,10 +2049,13 @@ "question": "Who are the female account holders who own credit cards and also have loans", "evidence": "Female refers to gender = 'F'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.gender FROM account AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"gender\" = 'F'", + "pred": "SELECT t1.first_name, t1.last_name FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'F'", "gold": "SELECT t1.client_id FROM client AS t1 INNER JOIN disp AS t2 ON t1.client_id = t2.client_id INNER JOIN account AS t5 ON t2.account_id = t5.account_id INNER JOIN loan AS t3 ON t5.account_id = t3.account_id INNER JOIN card AS t4 ON t2.disp_id = t4.disp_id WHERE t1.gender = 'F'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.4, + "table_f1": 0.5714285714285715 }, { "idx": 147, @@ -1622,10 +2063,13 @@ "question": "How many female clients' accounts are in the region of South Bohemia", "evidence": "Female refers to gender = 'F'; A3 contains the region 'south Bohemia'", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM client WHERE gender = 'F' AND region = 'south Bohemia'", + "pred": "SELECT COUNT(t1.client_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'F' AND t2.region = 'South Bohemia'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 148, @@ -1633,10 +2077,13 @@ "question": "Please list the accounts whose district is Tabor that are eligible for loans", "evidence": "District refers to column A2; when the account type = 'OWNER', it's eligible for loans", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.account_id FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\" WHERE t1.\"area\" = 'A2'", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.type = 'OWNER' AND t2.tabloid = 'A2'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 149, @@ -1644,10 +2091,13 @@ "question": "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", "evidence": "A11 represents the average salary; Salary and income share the similar meanings; when the account type = 'OWNER', it's eligible for loans", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.type, t2.income FROM account AS t1 INNER JOIN district AS t2 ON t1.\"district\" = t2._district_id WHERE t2.\"account type\" = 'OWNER' AND income > (SELECT AVG(income) FROM district)", + "pred": "SELECT t1.name, t1.salary FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.type = 'OWNER' AND t2.amount <= 9000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 150, @@ -1655,10 +2105,13 @@ "question": "How many accounts in North Bohemia has made a transaction with the partner's bank being AB", "evidence": "A3 contains the region names; North Bohemia is a region.", "difficulty": "moderate", - "pred": "SELECT COUNT(account_id) FROM account WHERE region = 'North Bohemia' AND bank = 'AB'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN trans AS t2 ON t1.account_id = t2.account_id INNER JOIN region AS t3 ON t2.district_id = t3.district_id WHERE t3.region = 'North Bohemia' AND t2.bank = 'AB'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 151, @@ -1666,10 +2119,13 @@ "question": "Please list the name of the districts with accounts that made withdrawal transactions", "evidence": "A2 refers to district name; type = 'VYDAJ' stands for withdrawal transactions", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_name FROM account AS t1 INNER JOIN district AS t2 ON t1.\"district\"_id = t2\"id WHERE t1.type = 'VYDAJ'", + "pred": "SELECT t1.district_id FROM district AS t1 INNER JOIN account AS t2 ON t1.district_id = t2.district_id WHERE t2.type = 'VYDAJ'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 152, @@ -1677,10 +2133,13 @@ "question": "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", "evidence": "A3 refers to region names; A15 stands for the average number of crimes commited in 1995.", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.region_name = 4000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM account AS t1 INNER JOIN region AS t2 ON t1.region = t2.\"region\" WHERE t1.\"date\" = '1995' AND t1\"region = 'A15'", + "pred": "SELECT AVG(CASE WHEN t2.region names = 'A3' THEN 1 ELSE 0 END) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE STRFTIME('%Y', t1.date) = '1995'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 153, @@ -1688,10 +2147,13 @@ "question": "How many 'classic' cards are eligible for loan", "evidence": "when the account type = 'OWNER', it's eligible for loan", "difficulty": "simple", - "pred": "SELECT COUNT(card_id) FROM card WHERE type = 'OWNER'", + "pred": "SELECT COUNT(*) FROM card WHERE type = 'OWNER'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 154, @@ -1699,10 +2161,13 @@ "question": "How many male clients in 'Hl.m. Praha' district", "evidence": "District data appears in the A2; Male means that gender = 'M'", "difficulty": "simple", - "pred": "SELECT COUNT(client_id) FROM client WHERE gender = 'M' AND district_id = 'Hl.m. Praha'", + "pred": "SELECT COUNT(t1.gender) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.a2 = 'Hl.m. Praha' AND t1.gender = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 155, @@ -1710,10 +2175,13 @@ "question": "How many percent of 'Gold' cards were issued prior to 1998", "evidence": "Percent of Gold = [ count(type = 'gold' and issued date < 1998) / count(all cards)] * 100%", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM card WHERE type = 'gold' AND issued = '1998'", + "pred": "SELECT CAST(SUM(CASE WHEN type = 'Gold' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM card WHERE issued = 1998", "gold": "SELECT CAST(SUM(type = 'gold' AND STRFTIME('%Y', issued) < '1998') AS REAL) * 100 / COUNT(card_id) FROM card", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 156, @@ -1721,10 +2189,13 @@ "question": "Who is the owner of the account with the largest loan amount", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.owner FROM account AS t1 INNER JOIN loan AS t2 ON t1.\"account_id\" = t2.\"account\" WHERE t1.amount = (SELECT MAX(amount) FROM account)", + "pred": "SELECT t1.owner FROM account AS t1 INNER JOIN lending AS t2 ON t1.account_id = t2.account_id ORDER BY t2.amount DESC LIMIT 1", "gold": "SELECT t1.client_id FROM disp AS t1 INNER JOIN account AS t3 ON t1.account_id = t3.account_id INNER JOIN loan AS t2 ON t3.account_id = t2.account_id WHERE t1.type = 'OWNER' ORDER BY t2.amount DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 157, @@ -1732,10 +2203,13 @@ "question": "What is the number of committed crimes in 1995 in the district of the account with the id 532", "evidence": "A15 contains information about number of committed crimes in 1995", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t2.district_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.\"district\"id = t2.\"area\" WHERE t1.id = 532", + "pred": "SELECT COUNT(a15) FROM account WHERE account_id = 532 AND date = 1995", "gold": "SELECT t1.a15 FROM district AS t1 INNER JOIN \"account\" AS t2 ON t1.district_id = t2.district_id WHERE t2.account_id = 532", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 158, @@ -1743,10 +2217,13 @@ "question": "What is the district Id of the account that placed the order with the id 33333", "evidence": "", "difficulty": "simple", - "pred": "SELECT district_id FROM order WHERE id = 33333", + "pred": "SELECT t1.district_id FROM account AS t1 INNER JOIN order AS t2 ON t1.account_id = t2.account_id WHERE t2.account_id = 33333", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 159, @@ -1754,10 +2231,13 @@ "question": "List all the withdrawals in cash transactions that the client with the id 3356 makes", "evidence": "operation = 'VYBER' refers to withdrawal in cash", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.drawal FROM client AS t1 INNER JOIN transaction AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"address\" = 3356", + "pred": "SELECT t1.amount FROM client AS t1 INNER JOIN trans AS t2 ON t1.client_id = t2.client_id WHERE t1.account_id = 3356 AND t2.occurrences = 'TRUE'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 160, @@ -1765,10 +2245,13 @@ "question": "Among the weekly issuance accounts, how many have a loan of under 200000", "evidence": "frequency = 'POPLATEK TYDNE' stands for weekly issuance", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE frequency = 'POPLATEK TYDNE'", + "pred": "SELECT COUNT(account_id) FROM account WHERE frequency = 'POPLATEK TYDNE' AND amount > 200000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 161, @@ -1776,10 +2259,13 @@ "question": "What type of credit card does the client with the id 13539 own", "evidence": "", "difficulty": "simple", - "pred": "SELECT type FROM client WHERE client_id = 13539", + "pred": "SELECT t2.type FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE t1.client_id = 13539", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 162, @@ -1787,10 +2273,13 @@ "question": "What is the region of the client with the id 3541 from", "evidence": "A3 refers to region", "difficulty": "simple", - "pred": "SELECT region FROM client WHERE client_id = 3541", + "pred": "SELECT t2.region FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.client_id = 3541", "gold": "SELECT t1.a3 FROM district AS t1 INNER JOIN client AS t2 ON t1.district_id = t2.district_id WHERE t2.client_id = 3541", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 163, @@ -1798,10 +2287,13 @@ "question": "Which district has the most accounts with loan contracts finished with no problems", "evidence": "status = 'A' refers to loan contracts finished with no problems", "difficulty": "moderate", - "pred": "SELECT district FROM account WHERE status = 'A'", + "pred": "SELECT t2.district_id FROM loan AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.status = 'A' GROUP BY t2.district_id ORDER BY COUNT(t1.account_id) DESC LIMIT 1", "gold": "SELECT t1.a2 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 164, @@ -1809,10 +2301,13 @@ "question": "Who placed the order with the id 32423", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.order_id FROM order AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"id\" = 32423", + "pred": "SELECT t2.first_name, t2.last_name FROM order AS t1 INNER JOIN customer AS t2 ON t1.account_id = t2.account_id WHERE t1.order_id = 32423", "gold": "SELECT t3.client_id FROM \"order\" AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id INNER JOIN disp AS t4 ON t4.account_id = t2.account_id INNER JOIN client AS t3 ON t4.client_id = t3.client_id WHERE t1.order_id = 32423", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 165, @@ -1820,10 +2315,13 @@ "question": "Please list all the transactions made by accounts from district 5", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.transaction FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\"", + "pred": "SELECT t1.transaction_id FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.district_id = 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 166, @@ -1831,10 +2329,13 @@ "question": "How many of the accounts are from Jesenik district", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM district WHERE district = 'Jesenik'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.district_id = 'Jesenik'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 167, @@ -1842,10 +2343,13 @@ "question": "List all the clients' IDs whose junior credit cards were issued after 1996", "evidence": "After 1996 means date > = '1997-01-01", "difficulty": "simple", - "pred": "SELECT client_id FROM card WHERE date > '1997-01-01'", + "pred": "SELECT t1.client_id FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE STRFTIME('%Y', t2.date) > '1997' AND t2.type = 'Junior'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 168, @@ -1853,10 +2357,13 @@ "question": "What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women", "evidence": "Female refers to gender = 'F'; Woman and female are closed; Average salary can be found in A11", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.gender) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.a11 > 10000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 169, @@ -1864,10 +2371,13 @@ "question": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997", "evidence": "Growth rate = (sum of amount_1997 - sum of amount_1996) / (sum of amount_1996) * 100%; Male refers to gender = 'M'", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.account_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client_name\" WHERE t1.\"amount\" = (SELECT SUM(t2.amount_1996) FROM account)", + "pred": "SELECT SUM(t1.amount_1996 - SUM(t1.amount_1996) * 100 / SUM(t1.amount_1996) FROM client AS t1 INNER JOIN lending AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 170, @@ -1875,10 +2385,13 @@ "question": "How many credit card withdrawals were recorded after 1995", "evidence": "Operation = 'VYBER KARTOU' means credit card withdrawals", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM card WHERE operation = 'VYBER KARTOU' AND date = '1995'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN trans AS t2 ON t1.account_id = t2.account_id WHERE t2.occupation = 'VYBER KARTOU' AND STRFTIME('%Y', t1.date) > 1995", "gold": "SELECT COUNT(account_id) FROM trans WHERE STRFTIME('%Y', date) > '1995' AND operation = 'VYBER KARTOU'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 171, @@ -1886,10 +2399,13 @@ "question": "What was the difference in the number of crimes committed in East and North Bohemia in 1996", "evidence": "Difference in no. of committed crimes between 2 regions = Total no. of committed crimes in 1996 in north Bohemia - Total no. of committed crimes in 1996 in e ast Bohemia. A3 refers to region. Data about no. of committed crimes 1996 appears in A16", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.region = 'East' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.region) FROM region AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.\"district\" WHERE t1.\"region\" = 'North Bohemia'", + "pred": "SELECT SUM(CASE WHEN region = 'East' THEN 1 ELSE 0 END), SUM(CASE WHEN region = 'North Bohemia' THEN 1 ELSE 0 END), SUM(CASE WHEN region = 'East' THEN 1 ELSE 0 END), SUM(CASE WHEN region = 'North Bohemia' THEN 1 ELSE 0 END), SUM(CASE WHEN region = 'North Bohemia' THEN 1 ELSE 0 END) FROM district WHERE a2 = 'East' AND a3 = 'North Bohemia' AND a4 = 'A5'", "gold": "SELECT SUM(IIF(a3 = 'east Bohemia', a16, 0)) - SUM(IIF(a3 = 'north Bohemia', a16, 0)) FROM district", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 172, @@ -1897,10 +2413,13 @@ "question": "How many owner and disponent dispositions are there from account number 1 to account number 10", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(disp_id) FROM account WHERE account number 1 AND account number 10", + "pred": "SELECT COUNT(t1.owner) FROM disp AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE t2.account_id IN (1, 2)", "gold": "SELECT SUM(type = 'OWNER'), SUM(type = 'DISPONENT') FROM disp WHERE account_id BETWEEN 1 AND 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 173, @@ -1908,10 +2427,13 @@ "question": "How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total", "evidence": "k_symbol refers to the purpose of payments", "difficulty": "challenging", - "pred": "SELECT COUNT(account_id) FROM account WHERE account_id = 3 AND amount = 3539", + "pred": "SELECT t2.date, t1.rate, t1.amount FROM payment AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE t2.account_id = 3", "gold": "SELECT t1.frequency, t2.k_symbol FROM account AS t1 INNER JOIN (SELECT account_id, k_symbol, SUM(amount) AS total_amount FROM \"order\" GROUP BY account_id, k_symbol) AS t2 ON t1.account_id = t2.account_id WHERE t1.account_id = 3 AND t2.total_amount = 3539", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 174, @@ -1919,10 +2441,13 @@ "question": "What year was account owner number 130 born", "evidence": "", "difficulty": "simple", - "pred": "SELECT year FROM account WHERE account_id = 130 born", + "pred": "SELECT birth_date FROM client WHERE account_id = 130", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 175, @@ -1933,7 +2458,10 @@ "pred": "SELECT COUNT(account_id) FROM account WHERE frequency = 'POPLATEK PO OBRATU'", "gold": "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'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 176, @@ -1941,10 +2469,13 @@ "question": "What is the amount of debt that client number 992 has, and how is this client doing with payments", "evidence": "", "difficulty": "simple", - "pred": "SELECT SUM(amount) FROM client WHERE client_id = 992", + "pred": "SELECT t1.amount, t1.payment FROM loan AS t1 INNER JOIN client AS t2 ON t1.client_id = t2.client_id WHERE t2.client_id = 992", "gold": "SELECT t4.amount, t4.status 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 loan AS t4 ON t3.account_id = t4.account_id WHERE t1.client_id = 992", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 177, @@ -1952,10 +2483,13 @@ "question": "What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman", "evidence": "", "difficulty": "simple", - "pred": "SELECT sum FROM client WHERE transaction = 851 AND gender = '4'", + "pred": "SELECT SUM(t1.amount), t1.gender FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE t2.account_id = 851", "gold": "SELECT t4.balance, t1.gender 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 = 4 AND t4.trans_id = 851", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 178, @@ -1963,10 +2497,13 @@ "question": "Which kind of credit card does client number 9 possess", "evidence": "", "difficulty": "simple", - "pred": "SELECT type FROM client WHERE client_id = 9", + "pred": "SELECT t2.type FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE t1.client_id = 9", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 179, @@ -1974,10 +2511,13 @@ "question": "How much, in total, did client number 617 pay for all of the transactions in 1998", "evidence": "", "difficulty": "simple", - "pred": "SELECT SUM(CASE WHEN t2.client_id = 617 THEN 1 ELSE 0 END) FROM client AS t1 INNER JOIN disp AS t2 ON t1.district_name = t2.\"district\" WHERE t1.\"date\" = '1998'", + "pred": "SELECT SUM(t2.amount) FROM client AS t1 INNER JOIN transactionhistory AS t2 ON t1.client_id = t2.client_id WHERE t1.client_id = 617 AND STRFTIME('%Y', t2.date) = '1998'", "gold": "SELECT SUM(t3.amount) FROM client AS t1 INNER JOIN disp AS t4 ON t1.client_id = t4.client_id INNER JOIN account AS t2 ON t4.account_id = t2.account_id INNER JOIN trans AS t3 ON t2.account_id = t3.account_id WHERE STRFTIME('%Y', t3.date) = '1998' AND t1.client_id = 617", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 180, @@ -1985,10 +2525,13 @@ "question": "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", "evidence": "", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.client_id FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.\"client\" WHERE t1.\"birth_date\" BETWEEN 1983 AND 1987", + "pred": "SELECT t1.gender, t1.birth_date FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id WHERE t2.district_id = (SELECT district_id FROM district WHERE name = 'East Bohemia') AND STRFTIME('%Y', t1.birth_date) BETWEEN '1982' AND'1987'", "gold": "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 disp AS t4 ON t1.client_id = t4.client_id INNER JOIN account AS t3 ON t2.district_id = t3.district_id AND t4.account_id = t3.account_id WHERE t2.a3 = 'east Bohemia' AND STRFTIME('%Y', t1.birth_date) BETWEEN '1983' AND '1987'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 181, @@ -1996,10 +2539,13 @@ "question": "Please provide the IDs of the 3 female clients with the largest loans", "evidence": "Female refers to gender = 'F'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.client_id FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.\"client\" WHERE t1.\"gender\" = 'F'", + "pred": "SELECT client_id FROM client WHERE gender = 'F' ORDER BY amount DESC LIMIT 3", "gold": "SELECT t1.client_id FROM client AS t1 INNER JOIN disp AS t4 ON t1.client_id = t4.client_id INNER JOIN account AS t2 ON t4.account_id = t2.account_id INNER JOIN loan AS t3 ON t2.account_id = t3.account_id AND t4.account_id = t3.account_id WHERE t1.gender = 'F' ORDER BY t3.amount DESC LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.25, + "table_f1": 0.4 }, { "idx": 182, @@ -2007,10 +2553,13 @@ "question": "How many male customers who were born between 1974 and 1976 have made a payment on their home in excess of $4000", "evidence": "Man and male refers to gender = 'M'; 'SIPO' stands for household payment", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.customer_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.clientid WHERE t2.\"gender\" = 'M' AND t1.\"amount\" = $4000", + "pred": "SELECT COUNT(t1.customer_id) FROM client AS t1 INNER JOIN payment AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'M' AND t2.amount > 4000 AND t1.birth_date BETWEEN 1974 AND 1976", "gold": "SELECT COUNT(t1.account_id) FROM trans AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.account_id INNER JOIN disp AS t4 ON t2.account_id = t4.account_id INNER JOIN client AS t3 ON t4.client_id = t3.client_id WHERE STRFTIME('%Y', t3.birth_date) BETWEEN '1974' AND '1976' AND t3.gender = 'M' AND t1.amount > 4000 AND t1.k_symbol = 'SIPO'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 183, @@ -2018,10 +2567,13 @@ "question": "How many accounts in Beroun were opened after 1996", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE 1996 = 'Beroun'", + "pred": "SELECT COUNT(account_id) FROM account WHERE date > 1996", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 184, @@ -2029,10 +2581,13 @@ "question": "How many female customers have a junior credit card", "evidence": "Female refers to gender = 'F'", "difficulty": "simple", - "pred": "SELECT COUNT(customer_id) FROM client WHERE gender = 'F'", + "pred": "SELECT COUNT(*) FROM creditcard WHERE gender = 'F'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 185, @@ -2040,10 +2595,13 @@ "question": "What proportion of customers who have accounts at the Prague branch are female", "evidence": "Female refers to gender = 'F'; Percentage of female clients in Prague branch = count[female clients with accounts in Prague branch / count(clients with accounts in Prague branch)] * 100%; A3 may contain information about Prague", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.\"client_name\" WHERE t1.\"address\" = ' Prague'", + "pred": "SELECT CAST(SUM(IIF(t1.gender = 'F', 1, 0)) AS REAL) * 100 / COUNT(t1.gender) FROM client AS t1 INNER JOIN address AS t2 ON t1.account_id = t2.account_id WHERE t2.address = 'Czech Republic'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 186, @@ -2051,10 +2609,13 @@ "question": "What percentage of male clients request for weekly statements to be issued", "evidence": "Percentage of male clients = [count(male clients who requested weekly statements / count(clients who requested weekly statements)] * 100%; Male means gender = 'M'; 'POPLATEK TYDNE' stands for weekly issuance", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN account AS t2 ON t1.account_id = t2.\"client_name\" WHERE t1.\"gender\" = 'POPLATEK TYDNE'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.gender) FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id WHERE t2.issue = 'POPLATEK TYDNE'", "gold": "SELECT CAST(SUM(t1.gender = 'M') AS REAL) * 100 / COUNT(t1.client_id) FROM client AS t1 INNER JOIN district AS t3 ON t1.district_id = t3.district_id INNER JOIN account AS t2 ON t2.district_id = t3.district_id INNER JOIN disp AS t4 ON t1.client_id = t4.client_id AND t2.account_id = t4.account_id WHERE t2.frequency = 'POPLATEK TYDNE'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 187, @@ -2062,10 +2623,13 @@ "question": "How many clients who choose statement of weekly issuance are Owner", "evidence": "Frequency = 'POPLATEK TYDNE' refers to weekly issuance", "difficulty": "simple", - "pred": "SELECT COUNT(client_id) FROM account WHERE frequency = 'POPLATEK TYDNE'", + "pred": "SELECT COUNT(t1.account_id) FROM account AS t1 INNER JOIN card AS t2 ON t1.account_id = t2.account_id WHERE t2.frequency = 'POPLATEK TYDNE'", "gold": "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 = 'OWNER'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 188, @@ -2073,10 +2637,13 @@ "question": "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", "evidence": "", "difficulty": "moderate", - "pred": "SELECT t2.account_id FROM account AS t1 INNER JOIN loan AS t2 ON t1.\"account\"_id\" = t2.\"accountid\" WHERE t1.date LIKE '1997%'", + "pred": "SELECT t1.account_id FROM account AS t1 INNER JOIN lending AS t2 ON t1.account_id = t2.account_id WHERE t2.account_id IN (SELECT t1.account_id FROM account AS t1 INNER JOIN lending AS t2 ON t1.account_id = t2.account_id WHERE t2.rate = 5 AND t2.date < 1997 ORDER BY t2.rate LIMIT 1)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 189, @@ -2084,10 +2651,13 @@ "question": "Name the account numbers of female clients who are oldest and have lowest average salary", "evidence": "Female refers to 'F' in the gender; A11 contains information about average salary", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.account_id FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.\"client\" WHERE t1.\"gender\" = 'F' ORDER BY t1.'average salary DESC LIMIT 1", + "pred": "SELECT t1.account_id FROM client AS t1 INNER JOIN account AS t2 ON t1.client_id = t2.client_id WHERE t1.gender = 'F' ORDER BY t2.averagesalary ASC LIMIT 1", "gold": "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 INNER JOIN disp AS t4 ON t1.client_id = t4.client_id AND t4.account_id = t3.account_id WHERE t1.gender = 'F' ORDER BY t1.birth_date ASC, t2.a11 ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 190, @@ -2095,10 +2665,13 @@ "question": "How many clients who were born in 1920 stay in east Bohemia", "evidence": "East Bohemia appears in the column A3, which refers to the region.", "difficulty": "simple", - "pred": "SELECT COUNT(client_id) FROM client WHERE region = 'east Bohemia'", + "pred": "SELECT COUNT(t1.name) FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t2.region = 'East Bohemia' AND STRFTIME('%Y', t1.birth_date) = '1920'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 191, @@ -2106,10 +2679,13 @@ "question": "How many loan accounts are for pre-payment of duration of 24 months with weekly issuance of statement", "evidence": "Frequency = 'POPLATEK TYDNE' referes to weekly statement", "difficulty": "simple", - "pred": "SELECT COUNT(account_id) FROM account WHERE duration = 'POPLATEK TYDNE'", + "pred": "SELECT COUNT(t1.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'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 192, @@ -2117,10 +2693,13 @@ "question": "What is the average amount of loan which are still on running contract with statement issuance after each transaction", "evidence": "status = 'C' stands for running contract, OK so far; status = 'D' stands for running contract, client in debt. 'POPLATEK PO OBRATU' stands for issuance after transaction", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.status = 'C' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.account_id) FROM client AS t1 INNER JOIN loan AS t2 ON t1.client_id = t2.\"client_name\" WHERE t1.\"status\" = 'D' AND t1\"was 'POPLATEK PO OBRATU'", + "pred": "SELECT CAST(SUM(t1.amount) AS REAL) / COUNT(t1.account_id) FROM loan AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE t1.status = 'C' AND t1.marital = 'POPLATEK PO OBRATU'", "gold": "SELECT AVG(t2.amount) 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 193, @@ -2128,10 +2707,13 @@ "question": "List all ID and district for clients that can only have the right to issue permanent orders or apply for loans", "evidence": "Only the owner accounts have the right to issue permanent orders or apply for loans", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.district_id, t1.name FROM client AS t1 INNER JOIN order AS t2 ON t1.\"client_id\" = t2.\"client\" WHERE t1.'owner\" = 'transaction'", + "pred": "SELECT t1.client_id, t2.district_id FROM client AS t1 INNER JOIN district AS t2 ON t1.district_id = t2.district_id WHERE NOT t1.client_id IS NULL", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 194, @@ -2139,10 +2721,13 @@ "question": "Provide the IDs and age of the client with high level credit card, which is eligible for loans", "evidence": "the credit card is high-level refers to card.type = 'gold'; eligible for loans refers to disp.type = 'OWNER'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.id, t1.age FROM client AS t1 INNER JOIN card AS t2 ON t1.\"client_id\" = t2.\"client\" WHERE t1.'type\" = 'gold' AND t1\"type = 'OWNER'", + "pred": "SELECT t1.client_id, t1.age FROM client AS t1 INNER JOIN card AS t2 ON t1.client_id = t2.client_id INNER JOIN disp AS t3 ON t1.disp_id = t3.disp_id WHERE t2.type = 'Gold' AND t3.type = 'OWNER'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 195, @@ -2150,10 +2735,13 @@ "question": "What is the most common bond type", "evidence": "most common bond type refers MAX(COUNT(bond_type))", "difficulty": "simple", - "pred": "SELECT MAX(t2.bond_type) FROM bond AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.molecule_id ORDER BY COUNT(t1.biond_id) DESC LIMIT 1", + "pred": "SELECT bond_type FROM bond GROUP BY bond_type ORDER BY COUNT(bond_type) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 196, @@ -2161,10 +2749,13 @@ "question": "In the non-carcinogenic molecules, how many contain chlorine atoms", "evidence": "non-carcinogenic molecules refers to label = '-'; chlorine atoms refers to element = 'cl'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.biomain_id WHERE t1.\"label\" = '-' AND t2.\"element\" LIKE 'cl'", + "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '-' AND t2.element = 'cl'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 197, @@ -2172,10 +2763,13 @@ "question": "Calculate the average number of oxygen atoms in single-bonded molecules", "evidence": "single-bonded molecules refers to bond_type = '-' ; average number of oxygen atom = AVG(element = 'o')", "difficulty": "moderate", - "pred": "SELECT AVG(t2.element) FROM atom AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.atom_id GROUP BY t1.\"atom\" ORDER BY t2.\"element\" DESC LIMIT 1", + "pred": "SELECT AVG(t2.element) FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.atom_id WHERE t1.bond_type = '-'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 198, @@ -2183,10 +2777,13 @@ "question": "On average how many carcinogenic molecules are single bonded", "evidence": "carcinogenic molecules refers to label = '+'; single-bonded refers to bond_type = '-'; average = DIVIDE(SUM(bond_type = '-'), COUNT(atom_id))", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.biomolecule_id WHERE t1.\"label\" = '-'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.bond_type = '-' THEN 1 ELSE 0 END) AS REAL) / COUNT(t1.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.label = '+'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 199, @@ -2194,10 +2791,13 @@ "question": "In the molecule containing sodium atoms, how many are non-carcinogenic", "evidence": "non-carcinogenic refers to label = '-'; sodium atoms refers to element = 'na'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.biome_id WHERE t1.\"label\" = '-'", + "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '-' AND t2.element = 'na'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 200, @@ -2205,10 +2805,13 @@ "question": "Find the triple-bonded molecules which are carcinogenic", "evidence": "triple-bonded molecules refers to bond_type = '#'; carcinogenic refers to label = '+'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.label FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+'", + "pred": "SELECT t1.description FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#' AND t1.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 201, @@ -2216,10 +2819,13 @@ "question": "What is the percentage of carbon in double-bond molecules", "evidence": "carbon refers to element = 'c'; double-bond molecules refers to bond_type = '='; percentage = DIVIDE(SUM(element = 'c'), COUNT(atom_id))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN element = 'c' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.molecule_id", + "pred": "SELECT CAST(SUM(IIF(t2.element = 'c', 1, 0)) AS REAL) * 100 / COUNT(t1.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.bond_type = '='", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 202, @@ -2227,10 +2833,13 @@ "question": "How many triple type bonds are there", "evidence": "triple type bonds refers to bond_type = '#'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.atom_id WHERE t1.\"bondtype\" = '#'", + "pred": "SELECT COUNT(t1.bond_id) FROM bond AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#'", "gold": "SELECT COUNT(t.bond_id) FROM bond AS t WHERE t.bond_type = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 203, @@ -2238,10 +2847,13 @@ "question": "In how many atoms is there no bromine", "evidence": "atoms with no bromine refers to element ! = 'br'", "difficulty": "simple", - "pred": "SELECT COUNT(atom_id) FROM atom WHERE element ! = 'br'", + "pred": "SELECT COUNT(atom_id) FROM atom WHERE element <> 'br'", "gold": "SELECT COUNT(DISTINCT t.atom_id) FROM atom AS t WHERE t.element <> 'br'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 204, @@ -2252,7 +2864,10 @@ "pred": "SELECT COUNT(*) FROM molecule WHERE label = '+' AND molecule_id BETWEEN 'TR000' AND 'TR099'", "gold": "SELECT COUNT(t.molecule_id) FROM molecule AS t WHERE molecule_id BETWEEN 'TR000' AND 'TR099' AND t.label = '+'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 205, @@ -2260,10 +2875,13 @@ "question": "Identify by their ID the molecules in which there is carbon", "evidence": "carbon refers to element = 'c';", "difficulty": "simple", - "pred": "SELECT molecule_id FROM molecule WHERE element = 'c'", + "pred": "SELECT molecule_id FROM atom WHERE element = 'c'", "gold": "SELECT t.molecule_id FROM atom AS t WHERE t.element = 'c'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 206, @@ -2271,10 +2889,13 @@ "question": "What elements are in the TR004_8_9 bond atoms", "evidence": "TR004_8_9 bond atoms refers to bond_id = 'TR004_8_9';", "difficulty": "challenging", - "pred": "SELECT element FROM atom WHERE bond_id = 'TR004_8_9'", + "pred": "SELECT 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'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 207, @@ -2282,10 +2903,13 @@ "question": "What elements are in a double type bond", "evidence": "double type bond refers to bond_type = '=';", "difficulty": "challenging", - "pred": "SELECT element FROM bond WHERE bond_type = '='", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '='", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 208, @@ -2293,10 +2917,13 @@ "question": "Which type of label is the most numerous in atoms with hydrogen", "evidence": "with hydrogen refers to element = 'h'; label most numerous in atoms refers to MAX(COUNT(label)); ", "difficulty": "moderate", - "pred": "SELECT label FROM molecule WHERE element = 'h' GROUP BY label ORDER BY COUNT(label) DESC LIMIT 1", + "pred": "SELECT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element = 'h' GROUP BY t2.label ORDER BY COUNT(t2.label) DESC LIMIT 1", "gold": "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) AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 209, @@ -2304,10 +2931,13 @@ "question": "Chlorine is in what type of bond", "evidence": "type of bond refers to bond_type; chlorine refers to element = 'cl'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_type FROM atom AS t1 INNER JOIN bond AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"element\" = 'cl'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t2.element = 'cl'", "gold": "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 = 'cl'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 210, @@ -2315,10 +2945,13 @@ "question": "What atoms are connected in single type bonds", "evidence": "single type bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM connected AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2._id WHERE t1.\"bondtype\" = '-'", + "pred": "SELECT t2.atom_id FROM bond AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 211, @@ -2326,10 +2959,13 @@ "question": "Indicate which atoms are connected in non-carcinogenic type molecules", "evidence": "label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = 'Non-carcinogenic'", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 212, @@ -2337,10 +2973,13 @@ "question": "Which element is the least numerous in non-carcinogenic molecules", "evidence": "label = '-' means molecules are non-carcinogenic; least numerous refers to MIN(COUNT(element));", "difficulty": "challenging", - "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = 'Non-carcinogenic' ORDER BY COUNT(t1.element) DESC LIMIT 1", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '-' GROUP BY t2.element ORDER BY COUNT(t2.element) ASC LIMIT 1", "gold": "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 1) AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 213, @@ -2348,10 +2987,13 @@ "question": "What type of bond is there between the atoms TR004_8 and TR004_20", "evidence": "type of bond refers to bond_type; between the atoms TR004_8 and TR004_20 refers to atom_id = 'TR004_8' AND atom_id2 = 'TR004_20' OR another way around", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_type FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atom\"id WHERE t1.\" atom_id\" = 'TR004_8'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t2.atom_id2 = 'TR004_8' OR t2.atom_id2 = 'TR004_20'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 214, @@ -2359,10 +3001,13 @@ "question": "What type of label is not on molecules with atoms with tin", "evidence": "tin refers to element ! = 'sn'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"element\" = 'sn'", + "pred": "SELECT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element <>'sn' AND t1.category = 'carcinogenic'", "gold": "SELECT DISTINCT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element <> 'sn'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 215, @@ -2370,10 +3015,13 @@ "question": "How many atoms with iodine and with sulfur type elements are there in single bond molecules", "evidence": "with iodine element refer to element = 'i'; with sulfur element refers to element = 's'; single type bond refers to bond_type = '-'; Should consider the distinct atoms when counting;", "difficulty": "challenging", - "pred": "SELECT COUNT(atom_id) FROM atom WHERE element = 'i' AND bond_type = 's'", + "pred": "SELECT COUNT(t1.atom_id) FROM atom AS t1 INNER JOIN relation 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 t1.element IN ('i','s')", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 216, @@ -2381,10 +3029,13 @@ "question": "Identify all connected atoms with a triple bond", "evidence": "triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM connected AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = '#'", + "pred": "SELECT t2.atom_id FROM bond AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 217, @@ -2392,10 +3043,13 @@ "question": "Identify all the atoms that are connected to the atoms of the TR181 molecule", "evidence": "TR181 molecule refers to molecule_id = 'TR181'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"molecules_id\" = 'TR181'", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR181'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 218, @@ -2403,10 +3057,13 @@ "question": "What percentage of carcinogenic-type molecules does not contain fluorine", "evidence": "label = '+' mean molecules are carcinogenic; contain fluorine refers to element = 'f'; percentage = DIVIDE(SUM(element = 'f') * 100, COUNT(molecule_id)) where label = '+'; Should consider the distinct atoms when counting;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.element = 'f' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"label\" = '+'", + "pred": "SELECT CAST(SUM(IIF(t2.element = 'f', 1, 0)) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 219, @@ -2414,10 +3071,13 @@ "question": "What is the percentage of carcinogenic molecules in triple type bonds", "evidence": "label = '+' mean molecules are carcinogenic; triple bond refers to bond_type = '#'; percentage = DIVIDE(SUM(bond_type = '#') * 100, COUNT(bond_id)) as percent where label = '+'", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.atom_id", + "pred": "SELECT CAST(SUM(CASE WHEN t1.bond_type = '#' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.label = '+'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 220, @@ -2425,10 +3085,13 @@ "question": "Please list top three elements of the toxicology of the molecule TR000 in alphabetical order", "evidence": "TR000 is the molecule id;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id ORDER BY COUNT(t2.atom_id) DESC LIMIT 3", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR000' ORDER BY t2.element DESC LIMIT 3", "gold": "SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR000' ORDER BY t.element LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 221, @@ -2436,10 +3099,13 @@ "question": "What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6", "evidence": "TR001 is the molecule id; TR001_2_6 is the bond id", "difficulty": "simple", - "pred": "SELECT t2.atom_id2 FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond id\" = 'TR001_2_6'", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_id = 'TR001_2_6'", "gold": "SELECT SUBSTRING(t.bond_id, 1, 7) AS atom_id1, t.molecule_id || SUBSTRING(t.bond_id, 8, 2) AS atom_id2 FROM bond AS t WHERE t.molecule_id = 'TR001' AND t.bond_id = 'TR001_2_6'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 222, @@ -2447,10 +3113,13 @@ "question": "What is the difference between the number of molecules that are carcinogenic and those that are not", "evidence": "label = '+' means molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; difference = SUBTRACT(SUM(label = '+'), SUM(label = '-'))", "difficulty": "moderate", - "pred": "SELECT SUM(CASE WHEN label = '+' THEN label ELSE NULL END) AS difference FROM molecule", + "pred": "SELECT SUM(IIF(label = '+', 1, 0)) - SUM(IIF(label = '-', 1, 0)) FROM molecule", "gold": "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 AS t", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 223, @@ -2458,10 +3127,13 @@ "question": "What are the atom IDs of the bond TR000_2_5", "evidence": "TR000_2_5 is the bond id", "difficulty": "simple", - "pred": "SELECT t2.atom_id2 FROM atom AS t1 INNER JOIN bonded AS t2 ON t1.bond_id = t2._id WHERE t1.\"bond id\" = 'TR000_2_5'", + "pred": "SELECT atom_id FROM connected WHERE bond_id = 'TR000_2_5'", "gold": "SELECT t.atom_id FROM connected AS t WHERE t.bond_id = 'TR000_2_5'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 224, @@ -2469,10 +3141,13 @@ "question": "What are the bond IDs that have the same atom ID 2 of TR000_2", "evidence": "TR000_2 is the atom id; atom ID 2 refers to atom_id2", "difficulty": "simple", - "pred": "SELECT t2.bond_id2 FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atomid2\" WHERE t1.\"atom id\" = 'TR000_2'", + "pred": "SELECT t1.bond_id FROM connected AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id2 WHERE t2.atom_id = 2", "gold": "SELECT t.bond_id FROM connected AS t WHERE t.atom_id2 = 'TR000_2'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 225, @@ -2480,10 +3155,13 @@ "question": "Please list top five molecules that have double bonds in alphabetical order", "evidence": "double bond refers to bond_type = ' = ';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = ''", + "pred": "SELECT t2.name FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = 'double' GROUP BY t2.name ORDER BY COUNT(t2.name) DESC LIMIT 5", "gold": "SELECT DISTINCT t.molecule_id FROM bond AS t WHERE t.bond_type = '=' ORDER BY t.molecule_id LIMIT 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 226, @@ -2491,10 +3169,13 @@ "question": "What is the percentage of double bonds in the molecule TR008? Please provide your answer as a percentage with five decimal places", "evidence": "double bond refers to bond_type = '='; TR008 is the molecule id; percentage = DIVIDE(SUM(bond_type = '='), COUNT(bond_id)) as percent where molecule_id = 'TR008'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.bond_type = '=' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.biond_id) FROM molecule", + "pred": "SELECT CAST(SUM(CASE WHEN t2.bond_type = '=' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR008'", "gold": "SELECT ROUND(CAST(COUNT(CASE WHEN t.bond_type = '=' THEN t.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(t.bond_id), 5) FROM bond AS t WHERE t.molecule_id = 'TR008'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 227, @@ -2502,10 +3183,13 @@ "question": "What is the percentage of molecules that are carcinogenic? Please provide your answer as a percentage with three decimal places", "evidence": "label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+'), COUNT(molecule_id)) as percent", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN label AS t2 ON t1.label = t2.label", + "pred": "SELECT CAST(SUM(IIF(label = '+', 1, 0)) AS REAL) * 100 / COUNT(*) FROM molecule", "gold": "SELECT ROUND(CAST(COUNT(CASE WHEN t.label = '+' THEN t.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(t.molecule_id), 3) FROM molecule AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 228, @@ -2513,10 +3197,13 @@ "question": "How much of the hydrogen in molecule TR206 is accounted for? Please provide your answer as a percentage with four decimal places", "evidence": "hydrogen refers to element = 'h'; TR206 is the molecule id; percentage = DIVIDE(SUM(element = 'h'), COUNT(atom_id)) as percent where molecule_id = 'TR206'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN element = 'h' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.biominer_id WHERE t1.\"t2.\"element\" = 'TR206'", + "pred": "SELECT CAST(SUM(IIF(t2.element = 'h', 1, 0)) AS REAL) * 100 / COUNT(t1.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.atom_id WHERE t2.molecule_id = 'TR206'", "gold": "SELECT ROUND(CAST(COUNT(CASE WHEN t.element = 'h' THEN t.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(t.atom_id), 4) FROM atom AS t WHERE t.molecule_id = 'TR206'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 229, @@ -2524,10 +3211,13 @@ "question": "What is the type of bond that molecule TR000 has when involved in any bonds", "evidence": "type of bond refers to bond_type; TR000 is the molecule id", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_type FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR000'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.molecule_id = 'TR000'", "gold": "SELECT DISTINCT t.bond_type FROM bond AS t WHERE t.molecule_id = 'TR000'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 230, @@ -2535,10 +3225,13 @@ "question": "What are the elements of the toxicology and label of molecule TR060", "evidence": "TR060 is the molecule id; ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = 'TR060'", + "pred": "SELECT t2.element, t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR060'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 231, @@ -2546,10 +3239,13 @@ "question": "Which bond type accounted for the majority of the bonds found in molecule TR010 and state whether or not this molecule is carcinogenic", "evidence": "TR010 is the molecule id; majority of the bond found refers to MAX(COUNT(bond_type)); ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.bond_type FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR010' ORDER BY COUNT(t1.t2.biominee_id) DESC LIMIT 1", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.molecule_id = 'TR010' GROUP BY t1.bond_type ORDER BY COUNT(t1.bond_type) DESC LIMIT 1", "gold": "SELECT t.bond_type FROM (SELECT t1.bond_type, COUNT(t1.molecule_id) FROM bond AS t1 WHERE t1.molecule_id = 'TR010' GROUP BY t1.bond_type ORDER BY COUNT(t1.molecule_id) DESC LIMIT 1) AS t", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 232, @@ -2557,10 +3253,13 @@ "question": "Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order", "evidence": "label = '-' means molecules are not carcinogenic; single type bond refers to bond_type = '-'; list top three molecules refers to return molecule_id and order by molecule_id;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.molecule_id, t2.bond_type FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.\"atom_id\" = t2.\"atomid\" WHERE t3.label = '-' AND t3.\"single type\" = '-'", + "pred": "SELECT t2.molecule_id, t2.label FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '-' GROUP BY t2.molecule_id ORDER BY t2.label", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 233, @@ -2568,10 +3267,13 @@ "question": "Please list top two bonds that happened with the molecule TR006 in alphabetical order", "evidence": "TR006 is the molecule id", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_id FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR006'", + "pred": "SELECT t1.bond_id FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.molecule_id = 'TR006' ORDER BY t1.bond_id ASC LIMIT 2", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 234, @@ -2579,10 +3281,13 @@ "question": "How many bonds which involved atom 12 does molecule TR009 have", "evidence": "TR009 is the molecule id; involved atom 12 refers to atom_id = 'TR009_12' or atom_id2 = 'TR009_12'", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atomid WHERE t1.\"atom_name\" = 'TR009_12' AND t2.\" atom_id2\" = 12", + "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.atom_id = 'TR009_12' OR t1.atom_id2 = 'TR009_12'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 235, @@ -2590,10 +3295,13 @@ "question": "How many molecules are carcinogenic and have the bromine element", "evidence": "label = '+' mean molecules are carcinogenic; have bromine element refers to element = 'br'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM molecule WHERE label = '+' AND element = 'br'", + "pred": "SELECT COUNT(t2.molecule_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'br' AND t2.label = '+'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 236, @@ -2601,10 +3309,13 @@ "question": "What are the bond type and the atoms of the bond ID of TR001_6_9", "evidence": "atoms refer to atom_id or atom_id2", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.atom_id, t1. atom_id2 FROM atom AS t1 INNER JOIN bond AS t2 ON t1.\"atom_type\" = t2.\"atomid\" WHERE t1\"id\" = 'TR001_6_9'", + "pred": "SELECT t1.bond_type, t2.atom_id2 FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_id = 'TR001_6_9'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 237, @@ -2612,10 +3323,13 @@ "question": "Which molecule does the atom TR001_10 belong to? Please state whether this molecule is carcinogenic or not", "evidence": "TR001_10 is the atom id; label = '+' mean molecules are carcinogenic", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+'", + "pred": "SELECT t2.description FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.atom_id = 'TR001_10'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 238, @@ -2623,10 +3337,13 @@ "question": "How many molecules have a triple bond type", "evidence": "triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.biome_id WHERE t1.\"bondtype\" = '#'", + "pred": "SELECT COUNT(t2.molecule_id) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#'", "gold": "SELECT COUNT(DISTINCT t.molecule_id) FROM bond AS t WHERE t.bond_type = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 239, @@ -2634,10 +3351,13 @@ "question": "How many connections does the atom 19 have", "evidence": "connections refers to bond_id; atom 19 refers to atom_id like 'TR%_19';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM connected AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atomid WHERE t1.\"atom_name\" LIKE 'TR%_19'", + "pred": "SELECT COUNT(t2.bond_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id2 WHERE t1.atom_id = 19", "gold": "SELECT COUNT(t.bond_id) FROM connected AS t WHERE SUBSTRING(t.atom_id, -2) = '19'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 240, @@ -2645,10 +3365,13 @@ "question": "List all the elements of the toxicology of the molecule \"TR004\"", "evidence": "TR004 is the molecule id;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR004'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR004'", "gold": "SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR004'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 241, @@ -2656,10 +3379,13 @@ "question": "How many of the molecules are not carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM molecule WHERE label = 'Non-carcinogenic'", + "pred": "SELECT COUNT(*) FROM molecule WHERE label = '-'", "gold": "SELECT COUNT(t.molecule_id) FROM molecule AS t WHERE t.label = '-'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 242, @@ -2667,10 +3393,13 @@ "question": "Among all the atoms from 21 to 25, list all the molecules that are carcinogenic", "evidence": "atoms from 21 to 25 refers to SUBSTR(atom_id, 7, 2) between '21' and '25'; label = '+' mean molecules are carcinogenic", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._atom_id WHERE SUBSTRING(t1.atom_name, 7, 2) BETWEEN '21' AND '25'", + "pred": "SELECT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.atom_id WHERE t1.atom_id BETWEEN 21 AND 25 GROUP BY t2.label", "gold": "SELECT DISTINCT t2.molecule_id FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE SUBSTRING(t1.atom_id, -2) BETWEEN '21' AND '25' AND t2.label = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 243, @@ -2678,10 +3407,13 @@ "question": "What are the bonds that have phosphorus and nitrogen as their atom elements", "evidence": "have phosphorus as atom elements refers to element = 'p'; have nitrogen as atom elements refers to element = 'n'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_id FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._id WHERE t1.\"element\" = 'p'", + "pred": "SELECT t2.bond_id FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element IN ('p', 'n')", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 244, @@ -2689,10 +3421,13 @@ "question": "Is the molecule with the most double bonds carcinogenic", "evidence": "double bond refers to bond_type = ' = '; label = '+' mean molecules are carcinogenic", "difficulty": "moderate", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.\"molecules_id\" WHERE t1.\"label\" = ' carcinogenic' AND t3.label = '+'", + "pred": "SELECT t2.label FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '' GROUP BY t2.label ORDER BY COUNT(t2.label) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 245, @@ -2700,10 +3435,13 @@ "question": "What is the average number of bonds the atoms with the element iodine have", "evidence": "atoms with the element iodine refers to element = 'i'; average = DIVIDE(COUND(bond_id), COUNT(atom_id)) where element = 'i'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN element = 'i' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom", + "pred": "SELECT CAST(COUNT(t2.bond_id) AS REAL) / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element = 'i'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 246, @@ -2711,10 +3449,13 @@ "question": "List the bond type and the bond ID of the atom 45", "evidence": "bond ID of atom 45 refers to SUBSTR(atom_id, 7, 2) + 0 = 45; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.bond_type, t2.atom_id2 FROM atom AS t1 INNER JOIN connected AS t2 ON t1.\"atom_name\" = t2.\"atomid\" WHERE t2\" = 45", + "pred": "SELECT t2.bond_type, t1.atom_id FROM connected AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.bond_id WHERE t1.atom_id = 7 AND t1.atom_id = 2 AND t2.bond_type = '#'", "gold": "SELECT t1.bond_type, t1.bond_id FROM bond AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE SUBSTRING(t2.atom_id, 7, 2) = '45'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 247, @@ -2722,10 +3463,13 @@ "question": "List all the elements of atoms that can not bond with any other atoms", "evidence": " atoms cannot bond with other atoms means atom_id NOT in connected table;", "difficulty": "challenging", - "pred": "SELECT DISTINCT element FROM atom WHERE atom_id = (SELECT atom FROM atom)", + "pred": "SELECT t1.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE NOT t2.included table IS NULL", "gold": "SELECT DISTINCT t.element FROM atom AS t WHERE NOT t.element IN (SELECT DISTINCT t1.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 248, @@ -2733,10 +3477,13 @@ "question": "What are the atoms of the triple bond with the molecule \"TR041\"", "evidence": "TR041 is the molecule id; triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = '#'", + "pred": "SELECT t2.atom_id FROM bond AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '#' AND t1.molecule_id = 'TR041'", "gold": "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 = 'TR041'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 249, @@ -2744,10 +3491,13 @@ "question": "What are the elements of the atoms of TR144_8_19", "evidence": "TR144_8_19 is the bond id; ", "difficulty": "challenging", - "pred": "SELECT element FROM atom WHERE bond_id = 'TR144_8_19'", + "pred": "SELECT t1.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t2.bond_id = 'TR144_8_19'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 250, @@ -2755,10 +3505,13 @@ "question": "Of all the carcinogenic molecules, which one has the most double bonds", "evidence": "label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';", "difficulty": "moderate", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+' AND t2.\"bond_type\"' = ''", + "pred": "SELECT t1.name FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.bond_type = 'C carcinogenic' GROUP BY t1.name ORDER BY COUNT(t1.name) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 251, @@ -2766,10 +3519,13 @@ "question": "What is the least common element of all carcinogenic molecules", "evidence": "label = '+' mean molecules are carcinogenic", "difficulty": "moderate", - "pred": "SELECT element FROM molecule WHERE label = '+'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+' GROUP BY t2.element", "gold": "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) AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 252, @@ -2777,10 +3533,13 @@ "question": "What are the atoms that can bond with the atom that has the element lead", "evidence": "atom that has the element lead refers to atom_id where element = 'pb'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM atom AS t1 INNER JOIN connected AS t2 ON t1.\"atom\"_id\" = t2.\"atomid\" WHERE t1.element = 'pb'", + "pred": "SELECT t2.atom_id FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element = 'pb'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 253, @@ -2788,10 +3547,13 @@ "question": "List the elements of all the triple bonds", "evidence": "triple bond refers to bond_type = '#';", "difficulty": "challenging", - "pred": "SELECT DISTINCT element FROM bond WHERE bond_type = '#'", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 254, @@ -2799,10 +3561,13 @@ "question": "What percentage of bonds have the most common combination of atoms' elements", "evidence": "DIVIDE(COUNT(bond_id), COUNT(atom_id where MAX(COUNT(atom_id)) ))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.element = 'Element' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2._id GROUP BY t1.\"atom\"", + "pred": "SELECT CAST(COUNT(t2.bond_id) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id GROUP BY t2.bond_id ORDER BY COUNT(t2.bond_id) DESC LIMIT 1", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 255, @@ -2810,10 +3575,13 @@ "question": "What proportion of single bonds are carcinogenic? Please provide your answer as a percentage with five decimal places", "evidence": "single bond refers to bond_type = '-'; label = '+' mean molecules are carcinogenic; proportion = DIVIDE(SUM(label = '+') * 100, COUNT(bond_id)) where bond_type = '-'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.atom_id", + "pred": "SELECT CAST(SUM(CASE WHEN t1.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.label) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.biolecule_id = t2.biolecule_id WHERE t2.bond_type = '-'", "gold": "SELECT ROUND(CAST(COUNT(CASE WHEN t2.label = '+' THEN t1.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(t1.bond_id), 5) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 256, @@ -2821,10 +3589,13 @@ "question": "Calculate the total atoms consisting of the element carbon and hydrogen", "evidence": "consisting of element carbon and hydrogen refers to element in('c', 'h')", "difficulty": "simple", - "pred": "SELECT COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.bond_id WHERE t1.\"element\" IN ('c', 'h')", + "pred": "SELECT COUNT(atom_id) FROM atom WHERE element IN ('c', 'h')", "gold": "SELECT COUNT(t.atom_id) FROM atom AS t WHERE t.element = 'c' OR t.element = 'h'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 257, @@ -2832,10 +3603,13 @@ "question": "List down atom id2 for atoms with element sulfur", "evidence": "element sulfur refers to element = 's'", "difficulty": "simple", - "pred": "SELECT atom_id2 FROM atom WHERE element = 's'", + "pred": "SELECT t2.atom_id2 FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element ='s'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 258, @@ -2843,10 +3617,13 @@ "question": "What are the bond type for atoms with element Tin", "evidence": "element Tin refers to element = 'sn'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_type FROM atom AS t1 INNER JOIN bond AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"element\" = 'sn'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t2.element ='sn' AND t1.bond_type = '#'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 259, @@ -2854,10 +3631,13 @@ "question": "How many elements are there for single bond molecules", "evidence": "single bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.element) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.bond_id", + "pred": "SELECT COUNT(DISTINCT t2.element) FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '-'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 260, @@ -2865,10 +3645,13 @@ "question": "Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine", "evidence": "triple bond refers to bond_type = '#'; phosphorus refers to element = 'p'; bromine refers to element = 'br'", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.molecule_id WHERE t1.\"element\" = 'p' AND t2.\"bromine\"' = 'br'", + "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.indicant IN ('p', 'br') AND t3.bond_type = '#'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 261, @@ -2876,10 +3659,13 @@ "question": "Write down bond id for molecules that are carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+'", + "pred": "SELECT t1.bond_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+'", "gold": "SELECT DISTINCT t1.bond_id FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.label = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 262, @@ -2887,10 +3673,13 @@ "question": "Among the single bond molecule id, which molecules are not carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.label FROM molecule AS t1 INNER JOIN bonded AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '-' AND t2.\"carcinogenic\"", + "pred": "SELECT t1.description FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.bond_type = '-' AND t3.description = 'Non-carcinogenic'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 263, @@ -2898,10 +3687,13 @@ "question": "What is the composition of element chlorine in percentage among the single bond molecules", "evidence": "element chlorine refers to element = 'cl'; single bond refers to bond_type = '-'; percentage = DIVIDE(SUM(element = 'cl'), COUNT(atom_id)) as percent where bond_type = '-'", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN element = 'cl' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.bond_id", + "pred": "SELECT CAST(SUM(IIF(t2.element = 'cl', 1, 0)) AS REAL) * 100 / COUNT(t2.bond_id) FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.molecule_id WHERE t1.bond_type = '-'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 264, @@ -2909,10 +3701,13 @@ "question": "What are the labels for TR000, TR001 and TR002", "evidence": "TR000, TR001 and TR002 are molecule id; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE molecule_id = 'TR000, TR001 and TR002'", + "pred": "SELECT label FROM molecule WHERE molecule_id IN ('TR001', 'TR002')", "gold": "SELECT molecule_id, t.label FROM molecule AS t WHERE t.molecule_id IN ('TR000', 'TR001', 'TR002')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 265, @@ -2920,10 +3715,13 @@ "question": "List down the molecule id for non carcinogenic molecules", "evidence": "label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT molecule_id FROM molecule WHERE label = 'Non-carcinogenic'", + "pred": "SELECT t2.molecule_id FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '-'", "gold": "SELECT t.molecule_id FROM molecule AS t WHERE t.label = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 266, @@ -2931,10 +3729,13 @@ "question": "Calculate the total carcinogenic molecules for molecule id from TR000 to TR030", "evidence": "label = '+' mean molecules are carcinogenic", "difficulty": "simple", - "pred": "SELECT SUM(CASE WHEN label = '+' THEN label ELSE NULL END) FROM molecule WHERE molecule_id = TR000", + "pred": "SELECT COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+' AND t2. molecule_id BETWEEN TR000 AND TR030", "gold": "SELECT COUNT(t.molecule_id) FROM molecule AS t WHERE t.molecule_id BETWEEN 'TR000' AND 'TR030' AND t.label = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 267, @@ -2942,10 +3743,13 @@ "question": "List down the bond type for molecules from molecule id TR000 to TR050", "evidence": "double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_type FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE STRFTIME('%Y', t1.\"quantity\") = 'TR000'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.molecule_id WHERE t2.molecule_id = TR000 AND t1.bond_type = '#'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 268, @@ -2953,10 +3757,13 @@ "question": "What are the elements for bond id TR001_10_11", "evidence": "TR001_10_11 is the bond id;", "difficulty": "challenging", - "pred": "SELECT element FROM atom WHERE bond_id = TR001_10_11", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.bond_id = 'TR001_10_11'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 269, @@ -2964,10 +3771,13 @@ "question": "How many bond id have element iodine", "evidence": "iodine refers to element = 'i'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM atom WHERE element = 'i'", + "pred": "SELECT COUNT(t2.bond_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'i'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 270, @@ -2975,10 +3785,13 @@ "question": "Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic", "evidence": "calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; MAX(label)", "difficulty": "moderate", - "pred": "SELECT t1.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t2.molecule_id = t3.atom_id WHERE t4.element = 'ca' GROUP BY t1.\"label\" ORDER BY COUNT(t3.label) DESC LIMIT 1", + "pred": "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", "gold": "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", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 271, @@ -2986,10 +3799,13 @@ "question": "Does bond id TR001_1_8 have both element of chlorine and carbon", "evidence": "chlorine refers to element = 'cl'; carbon refers to element = 'c'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN bond AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"element\" = 'cl'", + "pred": "SELECT CASE WHEN element IN ('cl', 'c') THEN 'yes' ELSE 'no' END FROM bond WHERE bond_id = 'TR001_1_8'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 272, @@ -2997,10 +3813,13 @@ "question": "List down two molecule id of triple bond non carcinogenic molecules with element carbon", "evidence": "carbon refers to element = 'c'; triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic", "difficulty": "moderate", - "pred": "SELECT t2.molecule_id FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2._id WHERE t1.\"element\" = 'c' AND t2.\"label\" LIKE 'Non-carcinogenic'", + "pred": "SELECT t1.molecule_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.indicant = 'c' AND t3.bond_type = '#' AND t3.description = 'Non-carcinogenic'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 273, @@ -3008,10 +3827,13 @@ "question": "What is the percentage of element chlorine in carcinogenic molecules", "evidence": "chlorine refers to element = 'cl'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(element = 'pb'); COUNT(molecule_id)) as percentage where label = '+'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.element = 'cl' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.\"molecules_id\" WHERE t1.\"label\" = '+'", + "pred": "SELECT CAST(SUM(IIF(t2.element = 'cl', 1, 0)) AS REAL) * 100 / COUNT(t1.molecule_id) FROM molecule AS t1 INNER JOIN contact AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 274, @@ -3019,10 +3841,13 @@ "question": "List the toxicology elements associated with molecule TR001", "evidence": "TR001 is the molecule id", "difficulty": "simple", - "pred": "SELECT element FROM molecule WHERE molecule_id = 'TR001'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR001'", "gold": "SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR001'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 275, @@ -3030,10 +3855,13 @@ "question": "Give me the molecule ID of the double bond type", "evidence": "double bond refers to bond_type = ' = ';", "difficulty": "simple", - "pred": "SELECT molecule_id FROM bond WHERE bond_type = ''", + "pred": "SELECT molecule_id FROM bond WHERE bond_type = 'double'", "gold": "SELECT DISTINCT t.molecule_id FROM bond AS t WHERE t.bond_type = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 276, @@ -3041,10 +3869,13 @@ "question": "Write down the atom IDs of the first and second atoms of triple bond type molecules", "evidence": "first atom refers to atom_id; second atom refers to atom_id2; triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT atom_id2 FROM atom WHERE bond_type = '#'", + "pred": "SELECT t2.atom_id2 FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.atom_id WHERE t1.bond_type = '#'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 277, @@ -3052,10 +3883,13 @@ "question": "What are the toxicology elements associated with bond ID TR000_1_2", "evidence": "TR000_1_2 is the bond id;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond id\" = 'TR000_1_2'", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.bond_id = 'TR000_1_2'", "gold": "SELECT t1.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t2.bond_id = 'TR000_1_2'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 278, @@ -3063,10 +3897,13 @@ "question": "How many of the single bond type molecules are non-carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.mulecule_name WHERE t1.\"label\" = '-' AND t2.\"bond\"type = 'Non-carcinogenic'", + "pred": "SELECT COUNT(t2.bond_id) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 279, @@ -3074,10 +3911,13 @@ "question": "What is the label for bond ID TR001_10_11", "evidence": "label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+' AND molecule_id = TR001_10_11", + "pred": "SELECT t2.label FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_id = 'TR001_10_11'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 280, @@ -3085,10 +3925,13 @@ "question": "Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not", "evidence": "triple bond refers to bond_type = '#'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_id FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bondtype\" = '#' AND t2.\"label\" LIKE 'Non-carcinogenic'", + "pred": "SELECT t1.bond_id, t2.label FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '#' AND t1.label = '+'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 281, @@ -3096,10 +3939,13 @@ "question": "Tally the toxicology element of the 4th atom of each molecule that was carcinogenic", "evidence": "label = '+' means molecules are carcinogenic; 4th atom of each molecule refers to substr(atom_id, 7, 1) = '4'; ", "difficulty": "challenging", - "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._atom_id WHERE t1.\"label\" = '+' AND t2.\"t2.atom_name\" = 7 AND t1\"label\" LIKE '4%'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '+' AND t2.atom_id IN (7, 1) = 4", "gold": "SELECT DISTINCT t1.element FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.label = '+' AND SUBSTRING(t1.atom_id, -1) = '4' AND LENGTH(t1.atom_id) = 7", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 282, @@ -3107,10 +3953,13 @@ "question": "What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label", "evidence": "hydrogen refers to element = 'h'; ratio = DIVIDE(SUM(element = 'h'), count(element)) where molecule_id = 'TR006' ; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.element = 'h' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.label) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = 'TR006'", + "pred": "SELECT CAST(SUM(IIF(t1.element = 'h', 1, 0)) AS REAL) / SUM(IIF(t1.label = 'Non-carcinogenic', 1, 0)) FROM molecule AS t1 INNER JOIN relation AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1. molecule_id = 'TR006'", "gold": "WITH subquery AS (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') SELECT CAST(COUNT(CASE WHEN element = 'h' THEN atom_id ELSE NULL END) AS REAL) / (CASE WHEN COUNT(atom_id) = 0 THEN NULL ELSE COUNT(atom_id) END) AS ratio, label FROM subquery GROUP BY label", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 283, @@ -3118,10 +3967,13 @@ "question": "Identify whether the chemical compound that contains Calcium is carcinogenic", "evidence": "calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.\"atom\" WHERE t1.\"element\" = 'ca'", + "pred": "SELECT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'ca' AND t2.label = 'Non-carcinogenic'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 284, @@ -3129,10 +3981,13 @@ "question": "Determine the bond type that is formed in the chemical compound containing element Carbon", "evidence": "Carbon refers to element = 'c'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_type FROM atom AS t1 INNER JOIN bond AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"element\" = 'c'", + "pred": "SELECT t1.bond_type FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t2.element = 'c' AND t1.bond_type = '-'", "gold": "SELECT DISTINCT t2.bond_type FROM atom AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'c'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 285, @@ -3140,10 +3995,13 @@ "question": "Name chemical elements that form a bond TR001_10_11", "evidence": "element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium; TR001_10_11 is the bond id; molecule id refers to SUBSTR(bond_id, 1, 5); atom 1 refers to SUBSTR(bond_id, 7, 2); atom 2 refers to SUBSTR(bond_id, 10, 2)", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._id WHERE SUBSTRING(t1.bond_id) = 'TR001_10_11'", + "pred": "SELECT t2.name FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_id = 'TR001_10_11'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 286, @@ -3151,10 +4009,13 @@ "question": "Among all chemical compounds identified in the database, what percent of compounds form a triple-bond", "evidence": "triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.bond_type = '#' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE STRFTIME('%Y', t1.\"date\") = '2016'", + "pred": "SELECT CAST(SUM(IIF(t1.bond_type = '#', 1, 0)) AS REAL) * 100 / COUNT(t1.bond_id) FROM bond AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 287, @@ -3162,10 +4023,13 @@ "question": "Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond", "evidence": "TR047 is the molecule id; double bond refers to bond_type = ' = '; percentage = DIVIDE(SUM(bond_type = ' = '), COUNT(all bond_id)) as percent where molecule_id = 'TR047'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.bond_type = 'TR047' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bonds_id = t2.\"bondid\"", + "pred": "SELECT CAST(SUM(IIF(t2.bond_type = '2', 1, 0)) AS REAL) * 100 / COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR047'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 288, @@ -3173,10 +4037,13 @@ "question": "Identify whether the molecule that contains atom TR001_1 is carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+' AND molecule_id = TR001_1", + "pred": "SELECT t2.label FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.atom_id = TR001_1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 289, @@ -3184,10 +4051,13 @@ "question": "Is molecule TR151 carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+'", + "pred": "SELECT t1.label FROM molecule AS t1 INNER JOIN disease AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+' AND t2.molecule_id = TR151", "gold": "SELECT t.label FROM molecule AS t WHERE t.molecule_id = 'TR151'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 290, @@ -3195,10 +4065,13 @@ "question": "Which toxic element can be found in the molecule TR151", "evidence": "element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.\"atom\" WHERE t1.\"name\" = 'TR151'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = TR151", "gold": "SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR151'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 291, @@ -3209,7 +4082,10 @@ "pred": "SELECT COUNT(*) FROM molecule WHERE label = '+'", "gold": "SELECT COUNT(t.molecule_id) FROM molecule AS t WHERE t.label = '+'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 292, @@ -3217,10 +4093,13 @@ "question": "Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon", "evidence": "carbon refers to element = 'c'; between TR010 to TR050 refers to substr(molecule_id, 3, 3)>=10 AND substr(molecule_id, 3, 3) <= 50", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._id WHERE t1.\"element\" = 'c' AND t2.\"sucur(t2.\"molecules_id\", 3, 3) <= 50", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN atom AS t3 ON t3.atom_id = t2.atom_id WHERE t3.molecule_id BETWEEN 10 AND 3 AND 3 AND t3.element = 'c'", "gold": "SELECT t.atom_id FROM atom AS t WHERE t.molecule_id BETWEEN 'TR010' AND 'TR050' AND t.element = 'c'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 1.0, + "table_f1": 0.5 }, { "idx": 293, @@ -3228,10 +4107,13 @@ "question": "How many atoms belong to the molecule labeled with carcinogenic compounds", "evidence": "label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT COUNT(atom_id) FROM molecule WHERE label = '+'", + "pred": "SELECT COUNT(t1.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.label = '+'", "gold": "SELECT COUNT(t1.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.label = '+'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 294, @@ -3239,10 +4121,13 @@ "question": "Which bond ids are double-bond with carcinogenic compound", "evidence": "label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_id FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+'", + "pred": "SELECT t1.bond_id FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.bond_id WHERE t2.label = '+' AND t1.bond_type = 'Double-bond'", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 295, @@ -3250,10 +4135,13 @@ "question": "How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound", "evidence": "label = '+' mean molecules are carcinogenic; hydrogen refers to element = h'", "difficulty": "simple", - "pred": "SELECT COUNT(t1.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.atomid WHERE t2.\"label\" = '+' AND t3.element = h'", + "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.indicant = 'h' AND t1.label = '+'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 296, @@ -3261,10 +4149,13 @@ "question": "Indicate the molecule id is belonging to the TR000_1_2 bond that has the first atom named TR000_1", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"atom\" = 'TR000_1_2'", + "pred": "SELECT t1. molecule_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN atom AS t3 ON t2.atom_id = t3.atom_id WHERE t3.atom_id = 'TR000_1_2'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 297, @@ -3272,10 +4163,13 @@ "question": "Among the atoms that contain element carbon, which one does not contain compound carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic; carbon refers to element = 'c'", "difficulty": "simple", - "pred": "SELECT t2.name FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._atom_id WHERE t3.element = 'c' AND t1.\"label\" = 'Non-carcinogenic'", + "pred": "SELECT t1.atom_id FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.atom_id WHERE t2.element IN ('c', 'c')", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 298, @@ -3283,10 +4177,13 @@ "question": "Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen", "evidence": "hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'h'), COUNT(molecule_id)) * 100.0", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN element = 'h' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atomid WHERE t1.\"label\" = '+'", + "pred": "SELECT CAST(SUM(IIF(t2.label = '+', 1, 0)) AS REAL) * 100 / COUNT(t1.molecule_id) FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'h'", "gold": "SELECT CAST(COUNT(CASE WHEN t1.element = 'h' AND t2.label = '+' 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 299, @@ -3294,10 +4191,13 @@ "question": "Is molecule TR124 carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+'", + "pred": "SELECT t1.label FROM molecule AS t1 INNER JOIN disease AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+' AND t2.molecule_id = 'TR124'", "gold": "SELECT t.label FROM molecule AS t WHERE t.molecule_id = 'TR124'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 300, @@ -3305,10 +4205,13 @@ "question": "What atoms comprise TR186", "evidence": "TR186 is a molecule id", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR186'", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1. molecule_id = 'TR186'", "gold": "SELECT t.atom_id FROM atom AS t WHERE t.molecule_id = 'TR186'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 301, @@ -3316,10 +4219,13 @@ "question": "What is the bond type of TR007_4_19", "evidence": "double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.bond_type FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.\"atom_id\" WHERE t1.\"name\" = 'TR007_4_19'", + "pred": "SELECT bond_type FROM bond WHERE bond_type = 'TR007_4_19'", "gold": "SELECT t.bond_type FROM bond AS t WHERE t.bond_id = 'TR007_4_19'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 302, @@ -3327,10 +4233,13 @@ "question": "Name the elements that comprise the atoms of bond TR001_2_4", "evidence": "element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"is\" = 'TR001_2_4'", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.bond_id = 'TR001_2_4'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 303, @@ -3338,10 +4247,13 @@ "question": "How many double bonds does TR006 have and is it carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; double bond refers to bond_type = ' = ';", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.atom_id WHERE t1.\"label\" = 'TR006'", + "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.label = '+' AND t1.bond_type = 'TR006'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 304, @@ -3349,10 +4261,13 @@ "question": "List all carcinogenic molecules and their elements", "evidence": "label = '+' mean molecules are carcinogenic; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.\"atom\" WHERE t1.\"label\" = '+'", + "pred": "SELECT t1.name, t3.element FROM molecule AS t1 INNER JOIN organization AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN element AS t3 ON t3.element = t1.molecule_id WHERE t1.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 305, @@ -3360,10 +4275,13 @@ "question": "Name all bonds with single bond types and what atoms are connected to the molecules", "evidence": "single bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id, t2.\"atom\" FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = '-'", + "pred": "SELECT t1.bond_id, t2.atom_id FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 306, @@ -3371,10 +4289,13 @@ "question": "Which molecules have triple bonds and list all the elements they contain", "evidence": "triple bond refers to bond_type = '#'; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = '#'", + "pred": "SELECT t1.name FROM molecule AS t1 INNER JOIN bonded AS t2 ON t1.molecule_id = t2.molecule_id WHERE t2.bond_type = '#'", "gold": "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 = '#'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 307, @@ -3382,10 +4303,13 @@ "question": "Name the atoms' elements that form bond TR000_2_3", "evidence": "element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"name\" = 'Bond' AND t3.element = 't2.indicate'", + "pred": "SELECT t2.element FROM bond AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.bond_id = 'TR000_2_3'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 308, @@ -3393,10 +4317,13 @@ "question": "How many bonds are created by bonding atoms with chlorine element", "evidence": "chlorine refers to element = 'cl'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM atom AS t1 INNER JOIN bonded AS t2 ON t1.atom_id = t2.atomid WHERE t1.\"element\" = 'cl'", + "pred": "SELECT COUNT(t2.bond_id) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.atom_id WHERE t1.element = 'cl'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 309, @@ -3404,10 +4331,13 @@ "question": "List out the atom id that belongs to the TR346 molecule and how many bond type can be created by this molecule", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.atom_id, COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"name\" = 'TR346'", + "pred": "SELECT t2.atom_id, COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.name = 'TR346'", "gold": "SELECT t1.atom_id, COUNT(DISTINCT t2.bond_type), t1.molecule_id FROM atom AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR000' GROUP BY t1.atom_id, t2.bond_type", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 310, @@ -3415,10 +4345,13 @@ "question": "How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound", "evidence": "double bond refers to bond_type = ' = '; label = '+' mean molecules are carcinogenic;", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.biome_id WHERE t1.\"label\" = '+' AND t2.\"double bond\" LIKE '%%%'", + "pred": "SELECT COUNT(t1.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN drug AS t3 ON t2.bond_id = t3.bond_id WHERE t3.label = '+' AND t1.bond_type = 'Double'", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 311, @@ -3426,10 +4359,13 @@ "question": "How many molecules without sulphur element is not having double bond", "evidence": "double bond refers to bond_type = ' = '; bond_type ! = ' = '; sulphur refers to element = 's'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.biome_id WHERE t1.\"element\" = 's'", + "pred": "SELECT COUNT(t2.molecule_id) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type <>'s' AND t1.element ='s'", "gold": "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 <> '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 312, @@ -3437,10 +4373,13 @@ "question": "What is the carcinogenic label for bond TR001_2_4", "evidence": "label = '+' mean molecules are carcinogenic", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+' AND molecule_id = TR001_2_4", + "pred": "SELECT t1.label FROM molecule AS t1 INNER JOIN connected AS t2 ON t1. molecule_id = t2.molecule_id WHERE t2.bond_id = 'TR001_2_4'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 313, @@ -3448,10 +4387,13 @@ "question": "How many atoms belong to molecule id TR001", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(atom_id) FROM molecule WHERE molecule_id = TR001", + "pred": "SELECT COUNT(t2.atom_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.atom_id WHERE t1. molecule_id = 'TR001'", "gold": "SELECT COUNT(t.atom_id) FROM atom AS t WHERE t.molecule_id = 'TR001'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 314, @@ -3459,10 +4401,13 @@ "question": "How many single bonds are there in the list", "evidence": "single bond refers to bond_type = '-';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM bond WHERE bond_type = '-'", + "pred": "SELECT COUNT(bond_id) FROM bond WHERE bond_type = '-'", "gold": "SELECT COUNT(t.bond_id) FROM bond AS t WHERE t.bond_type = '-'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 315, @@ -3470,10 +4415,13 @@ "question": "Among the molecules which contain \"cl\" element, which of them are carcinogenic", "evidence": "label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"element\" = 'cl'", + "pred": "SELECT t1.name FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.inflation = 'cl' AND t2.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 316, @@ -3481,10 +4429,13 @@ "question": "Among the molecules which contain \"c\" element, which of them are not carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"c\" element = 'c'", + "pred": "SELECT t1.name FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.attribute = 'c' AND t2.label = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 317, @@ -3492,10 +4443,13 @@ "question": "Calculate the percentage of carcinogenic molecules which contain the Chlorine element", "evidence": "label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'cl'), COUNT(molecule_id)) as percentage", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.\"molecules_id\"", + "pred": "SELECT CAST(SUM(IIF(t1.label = '+', 1, 0)) AS REAL) * 100 / COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'cl'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 318, @@ -3503,10 +4457,13 @@ "question": "What is the molecule id of bond id TR001_1_7", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.molecule_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2._id WHERE t1.\"name\" = 'TR001_1_7'", + "pred": "SELECT molecule_id FROM bond WHERE bond_id = 'TR001_1_7'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 319, @@ -3514,10 +4471,13 @@ "question": "How many elements are contained in bond_id TR001_3_4", "evidence": "element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t2.element) FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"id\" = TR001_3_4", + "pred": "SELECT COUNT(t2.element) FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_id = 'TR001_3_4'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 320, @@ -3525,10 +4485,13 @@ "question": "What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2", "evidence": "type of bond refers to bond_type; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.bond_type FROM connected AS t1 INNER JOIN atom AS t2 ON t1.\"atom_id\" = t2.\"atom\" WHERE t1.atom_type = 'TR000_1' AND t3.biome_id = 2", + "pred": "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.bond_type = '#'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 321, @@ -3536,10 +4499,13 @@ "question": "What is the molecule of atom id \"TR000_2\" and atom id 2 \"TR000_4\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.molecule_id FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.atom_id = t2.\"molecules_id\" WHERE t1.\"atom id\" = 'TR000_2'", + "pred": "SELECT t2.description FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.atom_id = 'TR000_2' AND t1.atom_id = 2", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 322, @@ -3547,10 +4513,13 @@ "question": "What is the element of toxicology for the atom with the ID of TR000_1", "evidence": "atom with ID refers to atom_id; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN connected AS t2 ON t1.atom_id = t2.\"atom\" WHERE t1.\"id\" = 'TR000_1'", + "pred": "SELECT t2.element FROM atom AS t1 INNER JOIN toxicology AS t2 ON t1.atom_id = t2.atom_id WHERE t1.atom_id = 'TR000_1'", "gold": "SELECT t.element FROM atom AS t WHERE t.atom_id = 'TR000_1'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 323, @@ -3558,10 +4527,13 @@ "question": "Is molecule TR000 is carcinogenic or not", "evidence": "label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT label FROM molecule WHERE label = '+'", + "pred": "SELECT CASE WHEN t2.label = '+' THEN 'Yes' ELSE 'NO' END FROM molecule AS t1 INNER JOIN contact AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.molecule_id = 'TR000'", "gold": "SELECT label FROM molecule AS t WHERE t.molecule_id = 'TR000'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 324, @@ -3569,10 +4541,13 @@ "question": "Find the percentage of atoms with single bond", "evidence": "single bond refers to bond_type = '-'; percentage = DIVIDE(SUM(bond_type = '-'), COUNT(bond_id)) as percentage", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.bond_type = '-' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN bond AS t2 ON t1.bonds_id = t2._id", + "pred": "SELECT CAST(SUM(IIF(t1.bond_type = '-', 1, 0)) AS REAL) * 100 / COUNT(t1.bond_id) FROM atom AS t1 INNER JOIN relation AS t2 ON t1.atom_id = t2.atom_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 325, @@ -3580,10 +4555,13 @@ "question": "How many carcinogenic molecules that consisted of Nitrogen", "evidence": "nitrogen refers to element = 'n'; label = '+' mean molecules are carcinogenic;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM molecule WHERE element = 'n' AND label = '+'", + "pred": "SELECT COUNT(t2.molecule_id) FROM molecule AS t1 INNER JOIN product AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'n' AND t1.label = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 326, @@ -3591,10 +4569,13 @@ "question": "Which molecule consisted of Sulphur atom with double bond", "evidence": "sulphur refers to element - 's'; double bond refers to bond_type = ' = ';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.atom_id FROM atom AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2._id WHERE t1.\"element\" = 's' AND t2.\"date\" LIKE '%%'", + "pred": "SELECT t1.description FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.element -'s' AND t3.bond_type = 'TRUE'", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 327, @@ -3602,10 +4583,13 @@ "question": "Which non-carcinogenic molecules consisted more than 5 atoms", "evidence": "label = '-' means molecules are non-carcinogenic; molecules consisted more than 5 atoms refers to COUNT(molecule_id) > 5", "difficulty": "moderate", - "pred": "SELECT label FROM molecule WHERE COUNT(t2.molecule_id) > 5 AND label = 'Non-carcinogenic'", + "pred": "SELECT t2.name FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '-' GROUP BY t2.name HAVING COUNT(t2.molecule_id) > 5", "gold": "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) AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 328, @@ -3613,10 +4597,13 @@ "question": "List all the elements with double bond, consisted in molecule TR024", "evidence": "double bond refers to bond_type = '='; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2._id WHERE t1.\"bond_type\" = '='", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN bonded AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.bond_type = '='' AND t1.id = 'TR024'", "gold": "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 = '='", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 329, @@ -3624,10 +4611,13 @@ "question": "Which carcinogenic molecule have the highest number of atoms consisted in it", "evidence": "label = '+' mean molecules are carcinogenic; molecule that have the highest number of atoms consisted in in refers to MAX(COUNT(atom.molecule_id))", "difficulty": "moderate", - "pred": "SELECT t2.label FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"label\" = '+' ORDER BY COUNT(t2.atom_id) DESC LIMIT 1", + "pred": "SELECT t2.description FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t1.label = '+' GROUP BY t2.description ORDER BY COUNT(t2.molecule_id) DESC LIMIT 1", "gold": "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) AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 330, @@ -3635,10 +4625,13 @@ "question": "Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms", "evidence": "hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; triple bond refers to bond_type = '#'; percentage = DIVIDE(SUM(label = '+'), COUNT(molecule_id)) * 100.0 where element = 'h' AND bond_type = '#';", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.element = 'h' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.molecule_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2._id WHERE t1.\"label\" = '#' AND t2.\"indicative\"' = '%'", + "pred": "SELECT CAST(SUM(IIF(t1.label = '+', 1, 0)) AS REAL) * 100 / COUNT(t1.label) FROM molecule AS t1 INNER JOIN relation AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.bond_type = '#' AND t3.element = 'h'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 331, @@ -3649,7 +4642,10 @@ "pred": "SELECT COUNT(*) FROM molecule WHERE label = '+'", "gold": "SELECT COUNT(t.molecule_id) FROM molecule AS t WHERE t.label = '+'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 332, @@ -3657,10 +4653,13 @@ "question": "Among the molecules between TR004 to TR010, how many of them has single bonds", "evidence": "single bond refers to bond_type = '-'; molecules between TR004 to TR010 refers molecule_id BETWEEN 'TR004' and 'TR010';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.molecule_id = t2.mulecule_name WHERE t1.\"bondtype\" = '-' AND t2.\"molecules_id\" BETWEEN 'TR004' AND 'TR010'", + "pred": "SELECT COUNT(t1.bond_id) FROM bond AS t1 INNER JOIN molecule AS t2 ON t1.bond_id = t2.molecule_id WHERE t1.bond_type = '-' AND t2.molecule_id BETWEEN 'TR004' AND 'TR010'", "gold": "SELECT COUNT(DISTINCT t.molecule_id) FROM bond AS t WHERE t.molecule_id BETWEEN 'TR004' AND 'TR010' AND t.bond_type = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 333, @@ -3668,10 +4667,13 @@ "question": "In the molecule TR008, how many carbons are present", "evidence": "carbon refers to element = 'c'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.atom_id) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.bond_id WHERE t1 element = 'c'", + "pred": "SELECT COUNT(*) FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.element = 'c' AND t2.molecule_id = 'TR008'", "gold": "SELECT COUNT(t.atom_id) FROM atom AS t WHERE t.molecule_id = 'TR008' AND t.element = 'c'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 334, @@ -3679,10 +4681,13 @@ "question": "What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic", "evidence": "label = '-' means molecules are non-carcinogenic; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.element FROM atom AS t1 INNER JOIN molecule AS t2 ON t1.molecule_id = t2._atom_id WHERE t1.\"label\" = 'TR004_7'", + "pred": "SELECT t2.element FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.atom_id = t2.atom_id WHERE t2.atom_id = 'TR004_7' AND t1.label = 'Non-carcinogenic'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 335, @@ -3690,10 +4695,13 @@ "question": "What is the total number of molecules with double bonded oxygen", "evidence": "oxygen refers to element = 'o'; double bond refers to bond_type = ' = ';", "difficulty": "simple", - "pred": "SELECT SUM(CASE WHEN element = 'o' THEN 1 ELSE 0 END) FROM molecule AS t1 INNER JOIN bond AS t2 ON t1.bond_id = t2.molecule_id WHERE t1.\"element\" = 'O'", + "pred": "SELECT COUNT(t1.molecule_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id INNER JOIN bond AS t3 ON t2.bond_id = t3.bond_id WHERE t3.bond_type = 'Oxygen' AND t3.element = 'o'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 336, @@ -3701,10 +4709,13 @@ "question": "in molecules with triple bonds, how many of them are not carcinogenic", "evidence": "triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic", "difficulty": "simple", - "pred": "SELECT COUNT(t2.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.atom_id WHERE t1.\"label\" = '#' AND t2.\"bondtype\" LIKE '#%%%'", + "pred": "SELECT COUNT(t1.bond_id) FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.bond_id = t2.bond_id WHERE t1.bond_type = '#' AND t1.label = 'Non-carcinogenic'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 337, @@ -3712,10 +4723,13 @@ "question": "List the element and bond type included in the molecule with molecule ID of TR002", "evidence": "TR002 is the molecule id", "difficulty": "challenging", - "pred": "SELECT element, bond_type FROM molecule WHERE molecule_id = 'TR002'", + "pred": "SELECT t2.element, t2. bond_type FROM molecule AS t1 INNER JOIN bonded AS t2 ON t1.molecule_id = t2.bond_id WHERE t1.molecule_id = 'TR002'", "gold": "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 = 'TR002'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 338, @@ -3723,10 +4737,13 @@ "question": "What is the atom ID of double bonded carbon in TR012 molecule", "evidence": "carbon refers to element = 'c'; double bond refers to bond_type = ' = ';", "difficulty": "moderate", - "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN atom AS t2 ON t1.molecule_id = t2._id WHERE t1.\"element\" = 'c' AND t2.\"bond_type\"' = ''", + "pred": "SELECT t2.atom_id FROM bond AS t1 INNER JOIN atom AS t2 ON t1.bond_id = t2.bond_id WHERE t1.element = 'c' AND t1.bond_type = 'TR012'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 339, @@ -3734,10 +4751,13 @@ "question": "List the atom ID of the carcinogenic molecule that contains oxygen", "evidence": "label = '+' mean molecules are carcinogenic; oxygen refers to element = 'o'", "difficulty": "simple", - "pred": "SELECT atom_id FROM molecule WHERE label = '+' AND element = 'o'", + "pred": "SELECT t2.atom_id FROM molecule AS t1 INNER JOIN connected AS t2 ON t1.molecule_id = t2.molecule_id WHERE t1.label = '+' AND t1.element = 'o'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 340, @@ -3745,10 +4765,13 @@ "question": "Which are the cards that have incredibly powerful foils", "evidence": "incredibly poweful foils refers to cardKingdomFoilId is not null AND cardKingdomId is not null", "difficulty": "simple", - "pred": "SELECT cardkingdomfoilid FROM cards WHERE cardKingdomFoilid IS NULL AND cardKingdomsId IS NULL", + "pred": "SELECT cardkingdomfoilid FROM cards WHERE NOT cardfoilid IS NULL AND NOT cardkingdomfoilid IS NULL", "gold": "SELECT id FROM cards WHERE NOT cardkingdomfoilid IS NULL AND NOT cardkingdomid IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 341, @@ -3756,10 +4779,13 @@ "question": "What are the borderless cards available without powerful foils", "evidence": "borderless' refers to borderColor; poweful foils refers to cardKingdomFoilId paired with cardKingdomId AND cardKingdomId is not null", "difficulty": "simple", - "pred": "SELECT t2.bordercolor FROM cards AS t1 INNER JOIN \"cards\" AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"cardKingdomFoilId\" IS NULL AND t3.cardkingdomdomId IS NULL", + "pred": "SELECT DISTINCT cardkingdomfoilid FROM cards WHERE NOT cardcolor IS NULL AND NOT cardkingdomfoilid IS NULL", "gold": "SELECT id FROM cards WHERE bordercolor = 'borderless' AND (cardkingdomid IS NULL OR cardkingdomid IS NULL)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 342, @@ -3767,10 +4793,13 @@ "question": "List the card names with value that cost more converted mana for the face", "evidence": "more converted mana for the face refers to Max(faceConvertedManaCost);", "difficulty": "simple", - "pred": "SELECT name FROM cards WHERE value = (SELECT MAX(faceconvertedManaCost) FROM cards)", + "pred": "SELECT name FROM cards ORDER BY faceconvertedmanacost DESC LIMIT 1", "gold": "SELECT name FROM cards ORDER BY faceconvertedmanacost LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 343, @@ -3778,10 +4807,13 @@ "question": "Name all cards with 2015 frame style ranking below 100 on EDHRec", "evidence": "below 100 on EDHRec refers to EDHRec <100; with 2015 frame style refers to frameVersion = 2015;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN frames AS t2 ON t2.frameversion = t3.framevendor WHERE t1.\"frameversion\" = '100' AND t3.\"framevide\" < 100", + "pred": "SELECT DISTINCT t1.name FROM cards AS t1 INNER JOIN frame_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.frameversion = 2015 AND t1.framestyle < 100", "gold": "SELECT id FROM cards WHERE edhrecrank < 100 AND frameversion = 2015", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 344, @@ -3789,10 +4821,13 @@ "question": "List all the mythic rarity print cards banned in gladiator format", "evidence": "mythic rarity printing refers to rarity = 'mythic'; card banned refers to status = 'Banned'; in gladiator format refers to format = 'gladiator';", "difficulty": "moderate", - "pred": "SELECT name FROM cards WHERE status = 'Banned' AND format = 'Gladiator' AND rarity = 'mythic'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN documents AS t2 ON t1.uuid = t2.uuid WHERE t2.status = 'Banned' AND t1.format = 'Gladiator' AND t1. rarity ='mythic'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 345, @@ -3800,10 +4835,13 @@ "question": "For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format", "evidence": "Artifact type of cards refers to types = 'Artifact'; card does not have multiple faces on the same card refers to side is NULL'; vintage play format refers to format = 'vintage';", "difficulty": "moderate", - "pred": "SELECT status FROM cards WHERE type = 'Artifact' AND side IS NULL AND format = 'vintage'", + "pred": "SELECT t1.status FROM legalities AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2.uuid WHERE t2.type = 'Artifact' AND t2.format = 'vintage' AND t2.side IS NULL", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 346, @@ -3811,10 +4849,13 @@ "question": "List all the card id and artist with unknown power which are legal for commander play format", "evidence": "unknown power refers to power = '*' or POWER IS NULL; commander play format refers to format = 'commander'; legal for commander play format refers to format = 'commander' where status = 'Legal'", "difficulty": "moderate", - "pred": "SELECT id, artist FROM cards WHERE format = 'commander' AND power = '*'", + "pred": "SELECT cardid, artist FROM cards WHERE status = 'Legal' AND format = 'commander' AND power IN (SELECT MAX(power) FROM cards)", "gold": "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 = '*')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 347, @@ -3822,10 +4863,13 @@ "question": "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", "evidence": "cards have missing or degraded properties and value refers to hasContentWarning = 1; 'Stephen Daniele' is artist; Find all cards refers to return card id", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.title FROM cards AS t1 INNER JOIN rulings AS t2 ON t2.uuid = t1.\"uuid\" WHERE t2.\"artist\" = 'Stephen Daniele' AND hascontentwarning = 1", + "pred": "SELECT t1.cardid, t2.text FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.artist = 'Stephen Daniele' AND t1.hascontentwarning = 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 348, @@ -3833,10 +4877,13 @@ "question": "Describe the information about rulings for card named 'Sublime Epiphany' with number 74s", "evidence": "Sublime Epiphany' is name of cards; number 74s refers to number = '74s'; information refers to text;", "difficulty": "simple", - "pred": "SELECT text FROM rulings WHERE name = 'Sublime Epiphany' AND number = 74s", + "pred": "SELECT text FROM rulings WHERE cardname = 'Sublime Epiphany' AND number = 74s", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 349, @@ -3844,10 +4891,13 @@ "question": "Name the card and artist with the most ruling information. Also state if the card is a promotional printing", "evidence": "with the most ruling information refers to Max(count(rulings.uuid)); the card is the promotional printing refers to isPromo = 1;", "difficulty": "moderate", - "pred": "SELECT t2.artist FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.\"uuid\" GROUP BY t1.\"artist\" ORDER BY COUNT(t1.ispromo) DESC LIMIT 1", + "pred": "SELECT t1.card, t2.artist FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.ispromo = 1 GROUP BY t1.card, t2.artist ORDER BY COUNT(t2.uuid) DESC LIMIT 1", "gold": "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 AND t1.artist = (SELECT artist FROM cards WHERE ispromo = 1 GROUP BY artist HAVING COUNT(DISTINCT uuid) = (SELECT MAX(count_uuid) FROM (SELECT COUNT(DISTINCT uuid) AS count_uuid FROM cards WHERE ispromo = 1 GROUP BY artist))) LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 350, @@ -3855,10 +4905,13 @@ "question": "State the alternative languages available for card named Annul numbered 29", "evidence": "annul refers to name = 'annul'; numbered 29 refers to number = '29';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.language FROM cards AS t1 INNER JOIN language AS t2 ON t1.language = t2.\"language\" WHERE t1.\"name\" = 'annul' AND t1.'number\" = 29", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.number = 29 AND t1.name = 'annul'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 351, @@ -3866,10 +4919,13 @@ "question": "Name all the cards which have alternative language in Japanese", "evidence": "Japanese' is the language;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.language FROM cards AS t1 INNER JOIN language AS t2 ON t2.language = t3.language WHERE t3.\"language\" = 'Japanese'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Japanese'", "gold": "SELECT t1.name FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Japanese'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 352, @@ -3877,10 +4933,13 @@ "question": "Calculate the percentage of the cards availabe in Chinese Simplified", "evidence": "Chinese Simplified' is the language; percentage = Divide(Sum(id where language = 'Chinese Simplified'), Count(id)) *100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN language = 'Chinese Simplified' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN language AS t2 ON t1.language = t2.language", + "pred": "SELECT CAST(SUM(IIF(language = 'Chinese Simplified', 1, 0)) AS REAL) * 100 / COUNT(language) FROM \"set_translations\"", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 353, @@ -3888,10 +4947,13 @@ "question": "List all the sets available in Italian translation. State the total number of cards per set", "evidence": "Italian translation refers to language = 'Italian'; total number of card per set refers to totalSetSize;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM set_translations WHERE language = 'Italian'", + "pred": "SELECT SUM(t1.setsize) FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian'", "gold": "SELECT t1.name, t1.totalsetsize FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.code = t2.setcode WHERE t2.language = 'Italian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 354, @@ -3899,10 +4961,13 @@ "question": "How many types of cards does the artist Aaron Boyd illustrated about card art", "evidence": "Aaron Boyd' is artist;", "difficulty": "simple", - "pred": "SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'", + "pred": "SELECT COUNT(DISTINCT t2.type) FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.artist WHERE t2.artist = 'Aaron Boyd'", "gold": "SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'", - "em_norm": 1, - "ex": 0 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 355, @@ -3910,10 +4975,13 @@ "question": "What is the keyword found on card 'Angel of Mercy'", "evidence": "Angel of Mercy' is the name of card;", "difficulty": "simple", - "pred": "SELECT keyword FROM cards WHERE name = 'Angel of Mercy'", + "pred": "SELECT t2.keyword FROM cards AS t1 INNER JOIN keywords AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Angel of Mercy'", "gold": "SELECT DISTINCT keywords FROM cards WHERE name = 'Angel of Mercy'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 356, @@ -3924,7 +4992,10 @@ "pred": "SELECT COUNT(*) FROM cards WHERE power = '*'", "gold": "SELECT COUNT(*) FROM cards WHERE power = '*'", "em_norm": 1, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 357, @@ -3932,10 +5003,13 @@ "question": "What type of promotion is of card 'Duress'", "evidence": "card Duress refers to name = 'Duress'; type of promotion refers to promoTypes;", "difficulty": "simple", - "pred": "SELECT promoTypes FROM cards WHERE name = 'Duress'", + "pred": "SELECT t2.promo FROM cards AS t1 INNER JOIN promotions AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Duress'", "gold": "SELECT promotypes FROM cards WHERE name = 'Duress' AND NOT promotypes IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 358, @@ -3943,10 +5017,13 @@ "question": "What is the border color of card \"Ancestor's Chosen\"", "evidence": "name of card = 'Ancestor''s Chosen' ;", "difficulty": "simple", - "pred": "SELECT bordercolor FROM cards WHERE name = 'Ancestor's Chosen'", + "pred": "SELECT DISTINCT t1.colorindicator FROM cards AS t1 INNER JOIN borders AS t2 ON t1.uuid = t2.uuid WHERE t1.card = 'Ancestor''s Chosen'", "gold": "SELECT DISTINCT bordercolor FROM cards WHERE name = 'Ancestor''s Chosen'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 359, @@ -3954,10 +5031,13 @@ "question": "What is the type of the card \"Ancestor's Chosen\" as originally printed", "evidence": "Ancestor's Chosen' is the name of card; type of the card as originally printed refers to originaltype;", "difficulty": "simple", - "pred": "SELECT originaltype FROM cards WHERE name = 'Ancestor's Chosen'", + "pred": "SELECT originaltype FROM cards WHERE name = 'Ancestor''s Chosen'", "gold": "SELECT originaltype FROM cards WHERE name = 'Ancestor''s Chosen' AND NOT originaltype IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 360, @@ -3965,10 +5045,13 @@ "question": "cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question What are the languages available for the set that card 'Angel of Mercy' is in", "evidence": "Angel of Mercy' is the name of card;", "difficulty": "moderate", - "pred": "SELECT t2.language FROM set_translations AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2._uuid WHERE t1.\"name\" = 'Angel of Mercy'", + "pred": "SELECT t2.language, t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Angel of Mercy'", "gold": "SELECT language FROM set_translations WHERE id IN (SELECT id FROM cards WHERE name = 'Angel of Mercy')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 361, @@ -3976,10 +5059,13 @@ "question": "How many cards of legalities whose status is restricted have text boxes", "evidence": "restricted refers to status = 'restricted'; have text boxes refers to is Textless = 0;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE status = 'restricted' AND istextless = 0", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.istextless = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 362, @@ -3987,10 +5073,13 @@ "question": "What is the description about the ruling of card \"Condemn\"", "evidence": "Ancestor's Chosen' is the name of card; description about the ruling refers to text;", "difficulty": "simple", - "pred": "SELECT text FROM cards WHERE name = 'Condemn'", + "pred": "SELECT text FROM rulings WHERE card = 'Condemn'", "gold": "SELECT t2.text FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Condemn'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 363, @@ -3998,10 +5087,13 @@ "question": "How many cards of legalities whose status is restricted are found in a starter deck", "evidence": "restricted refers to status = 'restricted'; found in the starter deck refers to isStarter = 1;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE status = 'restricted' AND isstarter = 1", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.isstarter = 1 AND t2.status ='restricted'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 364, @@ -4012,7 +5104,10 @@ "pred": "SELECT status FROM cards WHERE name = 'Cloudchaser Eagle'", "gold": "SELECT DISTINCT t2.status FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Cloudchaser Eagle'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 365, @@ -4023,7 +5118,10 @@ "pred": "SELECT type FROM cards WHERE name = 'Benalish Knight'", "gold": "SELECT DISTINCT t1.type FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Benalish Knight'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 366, @@ -4034,7 +5132,10 @@ "pred": "SELECT format FROM cards WHERE name = 'Benalish Knight'", "gold": "SELECT t2.format FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Benalish Knight'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 367, @@ -4042,10 +5143,13 @@ "question": "Please provide the names of the artists who illustrated the card art in Phyrexian", "evidence": "Phyrexian' is the language; name of artists refers to artist;", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE language = 'Phyrexian'", + "pred": "SELECT t1.artist FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Phyrexian'", "gold": "SELECT t1.artist FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Phyrexian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 368, @@ -4053,10 +5157,13 @@ "question": "What is the percentage of borderless cards", "evidence": "borderless card refers to borderColor = 'borderless'; percentage = Divide(Count (id) where borderColor = 'borderless', Count(id)) *100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN bordercolor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.uuid) FROM cards AS t1 INNER JOIN borders AS t2 ON t1.uid = t2.isuid", + "pred": "SELECT CAST(SUM(CASE WHEN bordercolor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards", "gold": "SELECT CAST(SUM(CASE WHEN bordercolor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 369, @@ -4064,10 +5171,13 @@ "question": "How many cards that illusrtated in German have been reprinted", "evidence": "German' is the language; reprinted refers to isReprint = 1;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE language = 'German' AND isreprint = 1", + "pred": "SELECT COUNT(*) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Germans' AND t2.isreprint = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 370, @@ -4075,10 +5185,13 @@ "question": "How many borderless cards are illustrated in Russian", "evidence": "borderless card refers to borderColor = 'borderless'; 'Russian' is the language;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE language = 'Russian' AND bordercolor = 'borderless'", + "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Russian' AND t1.color = 'borderless'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 371, @@ -4086,10 +5199,13 @@ "question": "What is the percentage of cards whose language is French among the Story Spotlight cards", "evidence": "Story Spotlight card refers to isStorySpotlight = 1; French is the language; Percentage = Divide(Count(id) where language = 'French' and isStorySpotlight = 1, Count(id) where isStorySpotlight = 1)*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN language AS t2 ON t1.language = t2.language WHERE isstoryspotlight = 1", + "pred": "SELECT CAST(SUM(IIF(language = 'French', 1, 0)) AS REAL) * 100 / COUNT(language) FROM cards WHERE isstoryspotlight = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 372, @@ -4100,7 +5216,10 @@ "pred": "SELECT COUNT(*) FROM cards WHERE toughness = 99", "gold": "SELECT COUNT(id) FROM cards WHERE toughness = 99", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 373, @@ -4108,10 +5227,13 @@ "question": "Name the cards that were illustrated by Aaron Boyd", "evidence": "Aaron Boyd' is artist;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.colorid FROM cards AS t1 INNER JOIN artist AS t2 ON t2.artist = t3.artist", + "pred": "SELECT t1.cardid FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.uuid WHERE t2.artist = 'Aaron Boyd'", "gold": "SELECT DISTINCT name FROM cards WHERE artist = 'Aaron Boyd'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 374, @@ -4119,10 +5241,13 @@ "question": "How many black border cards are only available on mtgo", "evidence": "black border card refers to borderColor = black; available on mtgo refers to availability = mtgo;\n\nadd quotes for string = 'black' and = 'mtgo'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE bordercolor = black AND availability = 'mtgo'", + "pred": "SELECT COUNT(*) FROM cards WHERE bordercolor = black AND availability ='mtgo'", "gold": "SELECT COUNT(id) FROM cards WHERE availability = 'mtgo' AND bordercolor = 'black'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 375, @@ -4130,10 +5255,13 @@ "question": "List down all the card IDs with converted mana cost of 0", "evidence": "converted mana cost of 0 refers to covertedManaCost = 0;", "difficulty": "simple", - "pred": "SELECT cardid FROM cards WHERE covertedManaCost = 0", + "pred": "SELECT cardid FROM cards WHERE covertedManacost = 0", "gold": "SELECT id FROM cards WHERE convertedmanacost = 0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 376, @@ -4141,10 +5269,13 @@ "question": "What are the card layout of cards with keyword of flying", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT layout FROM cards WHERE keyword = 'Flying'", + "pred": "SELECT t1.layout FROM cards AS t1 INNER JOIN keyword AS t2 ON t1.uuid = t2.uuid WHERE t2.keyword = 'Flying'", "gold": "SELECT layout FROM cards WHERE keywords = 'Flying'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 377, @@ -4152,10 +5283,13 @@ "question": "How many cards with original type of \"Summon - Angel\" have subtype other than \"Angel\"", "evidence": "subtype other than Angel refers to subtypes is not 'Angel';", "difficulty": "simple", - "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN subtypes AS t2 ON t1.subtype = t2.subtypes WHERE t2.\"subtype\" = 'Summon - Angel'", + "pred": "SELECT COUNT(*) FROM cards WHERE originaltype = 'Summon - Angel' AND subtype <> 'Angel'", "gold": "SELECT COUNT(id) FROM cards WHERE originaltype = 'Summon - Angel' AND subtypes <> 'Angel'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 378, @@ -4163,10 +5297,13 @@ "question": "What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs", "evidence": "Incredibly powerful refers to both cardKingdomFoilId and cardKingdomId IS NOT Null;", "difficulty": "simple", - "pred": "SELECT cardkingdomfoilid FROM cards WHERE cardKingdomdomId IS NULL", + "pred": "SELECT cardkingdomfoilid, cardkingdomid FROM cards WHERE NOT cardfoilid IS NULL", "gold": "SELECT id FROM cards WHERE NOT cardkingdomid IS NULL AND NOT cardkingdomfoilid IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 379, @@ -4177,7 +5314,10 @@ "pred": "SELECT id FROM cards WHERE duelDeck = a", "gold": "SELECT id FROM cards WHERE dueldeck = 'a'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 380, @@ -4185,10 +5325,13 @@ "question": "List the edhrecRank for cards with frame version 2015", "evidence": "", "difficulty": "simple", - "pred": "SELECT edhrecrank FROM cards WHERE frameversion = '2015'", + "pred": "SELECT edhrecrank FROM cards WHERE frameversion = 2015", "gold": "SELECT edhrecrank FROM cards WHERE frameversion = 2015", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 381, @@ -4196,10 +5339,13 @@ "question": "List down the name of artists for cards in Chinese Simplified", "evidence": "Chinese Simplified' is the language;", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE language = 'Chinese Simplified'", + "pred": "SELECT t1.artist FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Chinese Simplified'", "gold": "SELECT t1.artist FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Chinese Simplified'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 382, @@ -4207,10 +5353,13 @@ "question": "What are the cards that only available in paper and Japanese language", "evidence": "available in paper refers to availability = 'paper'; 'Japanese is the language;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.language FROM cards AS t1 INNER JOIN language AS t2 ON t1.language = t2.\"language\" WHERE t1.\"available\" = 'paper'", + "pred": "SELECT t1.id FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Japanese' AND t1. availability = 'Paper'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 383, @@ -4218,10 +5367,13 @@ "question": "How many of the banned cards are white border", "evidence": "banned card refers to status = 'Banned'; white border refers to borderColor = 'white';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE status = 'Banned' AND bordercolor = 'white'", + "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.status = 'Banned' AND t1.color = 'white'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 384, @@ -4229,10 +5381,13 @@ "question": "List down the uuid for legacy cards and the foreign language of these cards", "evidence": "legacy card refers to format = 'legacy'; foreign language refers to language in foreign_data", "difficulty": "simple", - "pred": "SELECT uuid, language FROM cards WHERE format = 'legacy'", + "pred": "SELECT t1.uuid, t2.language FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t1.format = 'legacy'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 385, @@ -4240,10 +5395,13 @@ "question": "Write down the ruling of Beacon of Immortality", "evidence": "Beacon of Immortality' is the name of card;", "difficulty": "simple", - "pred": "SELECT DISTINCT CASE WHEN name = 'Beacon of Immortality'", + "pred": "SELECT t1.text FROM rulings AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Beacon of Immortality'", "gold": "SELECT t2.text FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Beacon of Immortality'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 386, @@ -4251,10 +5409,13 @@ "question": "How many cards are having future frame version and what are the legality status of these cards", "evidence": "future frame version refers to frameVersion = 'future'; legility status refers to status = 'legal';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE frameversion = 'future' AND status = 'legal'", + "pred": "SELECT COUNT(DISTINCT t1.uuid), status FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t1.frameversion = 'Future'", "gold": "SELECT COUNT(t1.id) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t1.frameversion = 'future'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 387, @@ -4262,10 +5423,13 @@ "question": "What are the cards for set OGW? State the colour for these cards", "evidence": "set OGW refers to setCode = 'OGW';", "difficulty": "simple", - "pred": "SELECT t2.color FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = 'OGW'", + "pred": "SELECT t1.color FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.setcode = 'OGW'", "gold": "SELECT id, colors FROM cards WHERE id IN (SELECT id FROM set_translations WHERE setcode = 'OGW')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 388, @@ -4273,10 +5437,13 @@ "question": "What are the cards in set 10E with converted mana of 5 have translation and what are the languages", "evidence": "set 10E refers to setCode = '10E'; converted mana of 5 refers to convertedManaCost = 5;", "difficulty": "simple", - "pred": "SELECT t2.language, t1.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.\"setcode\" = t2.\"setcodes\" WHERE t1.'reveredManaCost\" = 5", + "pred": "SELECT t2.language, t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t1.setcode = 10E AND t1.repurposedmacost = 5", "gold": "SELECT id, language FROM set_translations WHERE id = (SELECT id FROM cards WHERE convertedmanacost = 5) AND setcode = '10E'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 389, @@ -4284,10 +5451,13 @@ "question": "List down the name of cards with original types of Creature - Elf and the date of rulings for these cards", "evidence": "Creature - Elf is the originalType;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.name, t2.date FROM cards AS t1 INNER JOIN \"sets\" AS t2 ON t1.\"uid\" = t2.\"uuid\" WHERE t1.'originaltype\" = 'Creature - Elf'", + "pred": "SELECT t1.name, t2.date FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.originaltype ='Creature - Elf'", "gold": "SELECT t1.id, t2.date FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.originaltype = 'Creature - Elf'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 390, @@ -4295,10 +5465,13 @@ "question": "What are the colors of cards from ID 1-20? What are the format of these cards", "evidence": "ID 1-20 refers to id BETWEEN 1 and 20;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.colorid FROM cards AS t1 INNER JOIN color AS t2 ON t1.uuid = t2._uuid BETWEEN 1 AND 20", + "pred": "SELECT colors, format FROM cards WHERE id BETWEEN 1 AND 20", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 391, @@ -4306,10 +5479,13 @@ "question": "Among the Artifact cards, which are black color and comes with foreign languague translation", "evidence": "Artifact card refers to originalType = 'Artifact'; black color refers to colors = 'B'; foreign language refers to language in foreign_data", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.colorindicator FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2._uuid WHERE t1.\"originaltype\" = 'Artifact' AND t2.\"language\" = ''Foreign_data'", + "pred": "SELECT t1.colorindicator, t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.colorindicator = 'Black' AND t1.colorindicator = 'B' AND t2.language = 'foreign_data'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 392, @@ -4317,10 +5493,13 @@ "question": "Pick 3 cards with rarity of uncommon, list down name these cards according to ascending order of it's ruling date", "evidence": "uncommon refers to rarity = 'uncommon';", "difficulty": "simple", - "pred": "SELECT DISTINCT CASE WHEN rarity = 'uncommon' THEN 1 ELSE 0 END FROM rulings AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2.uid WHERE STRFTIME('%Y', t1.\"date\") = '2018'", + "pred": "SELECT name FROM cards WHERE rarity = 'uncommon' ORDER BY date DESC LIMIT 3", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 393, @@ -4328,10 +5507,13 @@ "question": "On how many cards designed by John Avon is its foil non-powerful", "evidence": "John Avon refer to artist; foil poweful foils refers to cardKingdomId and cardKingdomFoildId is NOT NULL \n", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'John Avon' AND cardKingdomFoildId IS NULL", + "pred": "SELECT COUNT(DISTINCT cardkingdomfoilid) FROM cards WHERE artist = 'John Avon' AND NOT cardkingdomfoilid IS NULL", "gold": "SELECT COUNT(id) FROM cards WHERE (cardkingdomid IS NULL OR cardkingdomfoilid IS NULL) AND artist = 'John Avon'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 394, @@ -4339,10 +5521,13 @@ "question": "How many white bordered cards are powerful", "evidence": "white bordered cards refer to borderColor = 'white'; powerful cards refers to cardKingdomFoilId is not null AND cardKingdomId is not null (replace)", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE bordercolor = 'white' AND cardKingdomFoilId IS NULL", + "pred": "SELECT COUNT(DISTINCT cardkingdomfoilid) FROM cards WHERE bordercolor = 'white' AND NOT replacement IS NULL", "gold": "SELECT COUNT(id) FROM cards WHERE bordercolor = 'white' AND NOT cardkingdomid IS NULL AND NOT cardkingdomfoilid IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 395, @@ -4350,10 +5535,13 @@ "question": "How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1", "evidence": "UDON refer to artist; availabe in mtgo refers to availability = 'mtgo'; starting maximum hand size of -1 refers to hand = -1", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN \"sets\" AS t2 ON t1.\"uuid\" = t2.\"uid\" WHERE t2.appearance = 'mtgo' AND t1.'hand\" = -1", + "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'UDON' AND availability ='mtgo' AND hand = -1", "gold": "SELECT COUNT(id) FROM cards WHERE hand = '-1' AND artist = 'UDON' AND availability = 'mtgo'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 396, @@ -4361,10 +5549,13 @@ "question": "How many cards with a 1993 frame version and available on paper have a sensitive content warning", "evidence": "sensitive content warning refer to hasContentWarning = 1; available on paper refer to availability = 'paper' 1993 refer to frameVersion", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE hascontentwarning = 1 AND availability = 'paper' AND hascontentWarning = 1", + "pred": "SELECT COUNT(*) FROM cards WHERE hascontentwarning = 1 AND availability = 'paper' AND hascontentwarning = 1", "gold": "SELECT COUNT(id) FROM cards WHERE frameversion = 1993 AND availability = 'paper' AND hascontentwarning = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 397, @@ -4372,10 +5563,13 @@ "question": "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", "evidence": "available in paper and mtgo refers to availability = 'mtgo,paper'; frameVersion = 2003;borderColor = 'black'", "difficulty": "moderate", - "pred": "SELECT t2.cost FROM cards AS t1 INNER JOIN \"sets\" AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"frameversion\" = '2003' AND t3.bordercolor = 'black'", + "pred": "SELECT t2.manacost FROM cards AS t1 INNER JOIN master_translations AS t2 ON t1.uuid = t2.uuid WHERE t1.frameversion = '2003' AND t1.color = 'black' AND t1.releasability ='mtgo,paper'", "gold": "SELECT manacost FROM cards WHERE availability = 'mtgo,paper' AND bordercolor = 'black' AND frameversion = 2003 AND layout = 'normal'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 398, @@ -4383,10 +5577,13 @@ "question": "What is the unconverted mana do all the cards created by Rob Alexander cost in total", "evidence": "unconverted mana refer to manaCost; Rob Alexander refer to artist", "difficulty": "simple", - "pred": "SELECT manacost FROM cards WHERE artist = 'Rob Alexander' ORDER BY manacost DESC LIMIT 1", + "pred": "SELECT SUM(t1. manacost) FROM cards AS t1 INNER JOIN artists AS t2 ON t1.uuid = t2.uuid WHERE t2.artist = 'Rob Alexander'", "gold": "SELECT manacost FROM cards WHERE artist = 'Rob Alexander'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 399, @@ -4394,10 +5591,13 @@ "question": "Lists all types of cards available in arena", "evidence": "all types refer to subtypes and supertypes\n\navailble in arena refers to availability = 'arena'", "difficulty": "simple", - "pred": "SELECT subtypes, supertypes FROM cards WHERE availability = 'arena'", + "pred": "SELECT DISTINCT subtypes, supertypes FROM cards WHERE availability = 'arena'", "gold": "SELECT DISTINCT subtypes, supertypes FROM cards WHERE availability = 'arena' AND NOT subtypes IS NULL AND NOT supertypes IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 400, @@ -4405,10 +5605,13 @@ "question": "Lists the set code of all cards translated into Spanish", "evidence": "Spanish refer to language; set code refers to setCode", "difficulty": "simple", - "pred": "SELECT t2.setcode FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2._uuid WHERE language = 'Spanish'", + "pred": "SELECT t1.setcode FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Spanish'", "gold": "SELECT setcode FROM set_translations WHERE language = 'Spanish'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 401, @@ -4416,10 +5619,13 @@ "question": "What percentage of legendary frame effect cards that are only available in online game variations", "evidence": "only available in online game variationsrefer to isOnlineOnly =1 ; legendary frame effect cards refer to frameEffects = 'legendary'; percentage refer to DIVIDE(COUNT(isOnlineOnly=1), COUNT(id)) from cards where frameEffects = 'legendary'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN isonlineonly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.uuid) FROM cards AS t1 INNER JOIN \"game cards\" AS t2 ON t1.uid = t2.uuids WHERE t1.\"frameeffects\" = 'legendary'", + "pred": "SELECT CAST(SUM(IIF(isonlineonly = 1, 1, 0)) AS REAL) * 100 / COUNT(id) FROM cards WHERE frameeffects = 'legendary'", "gold": "SELECT SUM(CASE WHEN isonlineonly = 1 THEN 1.0 ELSE 0 END) / COUNT(id) * 100 FROM cards WHERE frameeffects = 'legendary'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 402, @@ -4427,10 +5633,13 @@ "question": "What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID", "evidence": "Story Spotlight cards that do not have a text box refers to isStorylight = 1 and isTextless = 0; Percentage = DIVIDE(SUM(count(id) where isStorylight = 1 AND isTextless = 0 ), SUM(count(id))) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN isstorylight = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN isstoryspotlight", + "pred": "SELECT CAST(SUM(CASE WHEN istextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isstorylight = 1", "gold": "SELECT CAST(SUM(CASE WHEN istextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isstoryspotlight = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 403, @@ -4438,10 +5647,13 @@ "question": "Calculate the percentage of cards in Spanish. List them by name", "evidence": "Spanish refer to language; Percentage refer to DIVIDE(SUM(ID where language = 'Spanish'), COUNT(id))*100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN language = 'Spanish' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN language AS t2 ON t1.language = t2.language", + "pred": "SELECT CAST(SUM(IIF(t2.language = 'Spanish', 1, 0)) AS REAL) * 100 / COUNT(t1.uuid) FROM cards AS t1 INNER JOIN language_translations AS t2 ON t1.uuid = t2.language", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 404, @@ -4449,10 +5661,13 @@ "question": "Indicates the name of all the languages into which the set whose number of cards is 309 is translated", "evidence": "set refer to setCode; number of cards refers to baseSetSize; baseSetsize = 309\n\n", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"baseSetsize\" = 309", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.basesetsize = 309", "gold": "SELECT t2.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.code = t2.setcode WHERE t1.basesetsize = 309", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 405, @@ -4460,10 +5675,13 @@ "question": "How many Brazilian Portuguese translated sets are inside the Commander block", "evidence": "Commander block refer to block = 'Commander'; sets refer to code = setCode; Portuguese refer to language = 'Portuguese (Brasil)'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM sets WHERE block = 'Commander' AND language = 'Portuguese (Brasil)'", + "pred": "SELECT COUNT(t1.id) FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.block = 'Commander' AND t2.language = 'Portuguese (Brasil)'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 406, @@ -4471,10 +5689,13 @@ "question": "Lists by ID all Creature-type cards with legal status", "evidence": "legal status refer to status = 'legal'; Goblin-type cards refer to types = 'Creature';", "difficulty": "simple", - "pred": "SELECT id FROM cards WHERE status = 'legal' AND types = 'Creature'", + "pred": "SELECT id FROM cards WHERE type = 'Creature' AND status = 'legal'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 407, @@ -4482,10 +5703,13 @@ "question": "Lists all types of cards in German", "evidence": "German refer to language; all types refer to the subtypes, supertypes; subtypes is not null AND supertypes is not null", "difficulty": "moderate", - "pred": "SELECT subtypes, supertypes FROM cards WHERE language = 'German' AND subtypes IS NULL", + "pred": "SELECT DISTINCT t1.type FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'German'", "gold": "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 NOT t1.subtypes IS NULL AND NOT t1.supertypes IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 408, @@ -4493,10 +5717,13 @@ "question": "How many unknown power cards contain info about the triggered ability", "evidence": "unknown power cards refers to power is null or power = '*';contain info about the triggered ability refers to text contains 'triggered ability'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE power IS NULL AND power = '*'", + "pred": "SELECT COUNT(text) FROM cards WHERE power IS NULL OR power = '*'", "gold": "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 = '*') AND t2.text LIKE '%triggered ability%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 409, @@ -4504,10 +5731,13 @@ "question": "Indicates the number of cards with pre-modern format, ruling text \"This is a triggered mana ability.\" that do not have multiple faces", "evidence": "pre-modern format refers to format = 'premodern' ;do not have multiple faces refers to side IS NULL", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE format = 'premodern' AND side IS NULL AND text = 'This is a triggered mana ability.'", + "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t2.text = 'This is a triggered mana ability.' AND t1.format = 'premodern'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 410, @@ -4515,10 +5745,13 @@ "question": "Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID", "evidence": "available in paper refers to availability = 'paper'", "difficulty": "simple", - "pred": "SELECT id FROM cards WHERE artist = Erica Yang AND availability = 'paper'", + "pred": "SELECT id FROM cards WHERE artist = 'Erica Yang' AND availability = 'paper'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 411, @@ -4526,10 +5759,13 @@ "question": "To which artist does the card with the text \"Das perfekte Gegenmittel zu einer dichten Formation\" belong", "evidence": "", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE text = 'Das perfekte Gegenmittel zu einer dichten Formation'", + "pred": "SELECT t2.artist FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.artist WHERE t1.text = 'Das perfekte Gegenmittel zu einer dichten Formation'", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 412, @@ -4537,10 +5773,13 @@ "question": "What is the foreign name of the card in French of type Creature, normal layout and black border color, by artist Matthew D. Wilson", "evidence": "in French refers to language = 'French'; black border color refers to borderColor = 'black'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.name FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2._uuid WHERE t1.\"language\" = 'French' AND t2.\"bordercolor\" LIKE 'black'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'French' AND t2.type ='Creature' AND t1.color = 'black' AND t2.artist = 'Matthew D. Wilson'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 413, @@ -4548,10 +5787,13 @@ "question": "How many cards with print rarity have ruling text printed on 01/02/2007", "evidence": "with print rarity refers to rarity = 'rare'; on 01/02/2007 refers to date = '2007-02-01'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM rulings WHERE text = 'rare' AND date = '2007-02-01'", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t2.date = '2007-02-01' AND t2. rarity = 'rare'", "gold": "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 = '2007-02-01'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 414, @@ -4559,10 +5801,13 @@ "question": "What language is the set of 180 cards that belongs to the Ravnica block translated into", "evidence": "set of 180 cards refers to baseSetSize = 180", "difficulty": "simple", - "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"block\" = 'Ravnica'", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.block = 'Ravnica' AND t1.basesetsize = 180", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 415, @@ -4573,7 +5818,10 @@ "pred": "SELECT CAST(SUM(CASE WHEN hascontentwarning = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards WHERE format = 'commander' AND status = 'legal'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 416, @@ -4581,10 +5829,13 @@ "question": "What percentage of cards without power are in French", "evidence": "in French refers to language = 'French'; cards without power refers to power IS NULL OR power = '*'; percentage = DIVIDE(COUNT(language = 'French' and power is NULL or power = '*'), COUNT( power is NULL or power = '*'))*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.language) FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.\"uuid\"", + "pred": "SELECT CAST(SUM(CASE WHEN t2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode", "gold": "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 = '*'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 417, @@ -4592,10 +5843,13 @@ "question": "What percentage of Japanese translated sets are expansion sets", "evidence": "Japanese translated refers to language = 'Japanese'; expansion sets refers to type = 'expansion'; percentage = DIVIDE(COUNT(language = 'Japanese'),COUNT(language))*100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.language) FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.setcode = t2.\"setcode\"", + "pred": "SELECT CAST(SUM(IIF(t2.language = 'Japanese', 1, 0)) AS REAL) * 100 / COUNT(t1.language) FROM sets_translations AS t1 INNER JOIN language AS t2 ON t1.language = t2.language", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 418, @@ -4603,10 +5857,13 @@ "question": "What kind of printing is on the card that Daren Bader created", "evidence": "kind of printing refers to availability; Daren Bader created refers to artist = 'Daren Bader'", "difficulty": "simple", - "pred": "SELECT availability FROM cards WHERE artist = 'Daren Bader'", + "pred": "SELECT t1.available FROM cards AS t1 INNER JOIN artists AS t2 ON t1.uuid = t2.uuid WHERE t2.artist = 'Daren Bader'", "gold": "SELECT DISTINCT availability FROM cards WHERE artist = 'Daren Bader'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 419, @@ -4614,10 +5871,13 @@ "question": "How many color cards with no borders have been ranked higher than 12000 on EDHRec", "evidence": "color cards with no borders refers to borderColor = 'borderless'; ranked higher than 12000 on EDHRec refers to edhrecRank > 12000", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE bordercolor = 'borderless' AND edhrecRank > 12000", + "pred": "SELECT COUNT(DISTINCT colorid) FROM cards WHERE edhrecrank > 12000 AND bordercolor = 'borderless'", "gold": "SELECT COUNT(id) FROM cards WHERE edhrecrank > 12000 AND bordercolor = 'borderless'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 420, @@ -4625,10 +5885,13 @@ "question": "How many cards are oversized, reprinted, and printed for promotions", "evidence": "are oversized refers to isOversized = 1; reprinted refers to isReprint = 1; printed for promotions refers to isPromo = 1", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE isoversized = 1 AND isreprint = 1", + "pred": "SELECT COUNT(isoversized) FROM cards WHERE isreprint = 1 AND ispromo = 1", "gold": "SELECT COUNT(id) FROM cards WHERE isoversized = 1 AND isreprint = 1 AND ispromo = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 421, @@ -4636,10 +5899,13 @@ "question": "Please list top three unknown power cards that have promotional types for arena league in alphabetical order", "evidence": "unknown power cards refers to power is null or power = '*'; promotional types for arena league refers to promoTypes = 'arenaleague'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.power FROM cards AS t1 INNER JOIN \"sets\" AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"ispromo\" = 'arenaleague' AND STRFTIME('%Y', t2.'power\") = '%Y' AND t1.'promo' = '*'", + "pred": "SELECT cardnumber FROM cards WHERE ispromo IN ('arenaleague', 'power') ORDER BY ispromo DESC LIMIT 3", "gold": "SELECT name FROM cards WHERE (power IS NULL OR power LIKE '%*%') AND promotypes = 'arenaleague' ORDER BY name LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 422, @@ -4647,10 +5913,13 @@ "question": "What is the language of the card with the multiverse number 149934", "evidence": "multiverse number 149934 refers to multiverseid = 149934;", "difficulty": "simple", - "pred": "SELECT language FROM cards WHERE multiverseid = 149934", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.multiverseid = 149934", "gold": "SELECT language FROM foreign_data WHERE multiverseid = 149934", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 423, @@ -4658,10 +5927,13 @@ "question": "Please provide the ids of top three powerful pairs of Kingdom Foil and Kingdom Cards sorted by Kingdom Foil id in alphabetical order", "evidence": "poweful refers to cardKingdomFoilId is not null AND cardKingdomId is not null", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id FROM cards AS t1 INNER JOIN cardkingdomfoilid AS t2 ON t2.id = t3.uuid ORDER BY t4.cardKingdomdomId DESC LIMIT 3", + "pred": "SELECT cardkingdomfoilid FROM cards WHERE cardkingdomid = (SELECT cardKingdomFoilid FROM cards WHERE NOT cardKingdomFoilid IS NULL AND NOT cardKingdomdomdomid IS NULL ORDER BY cardkingdomdomid DESC LIMIT 3)", "gold": "SELECT cardkingdomfoilid, cardkingdomid FROM cards WHERE NOT cardkingdomfoilid IS NULL AND NOT cardkingdomid IS NULL ORDER BY cardkingdomfoilid LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 424, @@ -4669,10 +5941,13 @@ "question": "What proportion of cards do not have a text box with a normal layout", "evidence": "do not have a text box refers to isTextless = 1; proportion refers to DIVIDE(COUNT(Textless = 1 and layout = 'normal'),COUNT(Textless))*100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN istextless = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards WHERE layout = 'normal'", + "pred": "SELECT CAST(SUM(IIF(textless = 1 AND layout = 'normal', 1, 0)) AS REAL) * 100 / COUNT(textless) FROM cards", "gold": "SELECT CAST(SUM(CASE WHEN istextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 425, @@ -4680,10 +5955,13 @@ "question": "What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard", "evidence": "don't have multiple faces on a single card side is null", "difficulty": "simple", - "pred": "SELECT DISTINCT number FROM cards WHERE side = 'Angel and Wizard'", + "pred": "SELECT cardnumber FROM cards WHERE type = 'Angel' AND subtypes = 'Wizard'", "gold": "SELECT id FROM cards WHERE subtypes = 'Angel,Wizard' AND side IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 426, @@ -4691,10 +5969,13 @@ "question": "Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order", "evidence": "don't appear in Magic: The Gathering Online refers to mtgoCode is NULL or mtgoCode = ''", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.name FROM sets AS t1 INNER JOIN \"set\" AS t2 ON t2.setcode = t3.code WHERE t1.\"mtgocode\" = 'Magic: The Gathering Online'", + "pred": "SELECT name FROM sets WHERE mtgocode IS NULL OR mtgocode = '' ORDER BY name DESC LIMIT 3", "gold": "SELECT name FROM sets WHERE mtgocode IS NULL ORDER BY name LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 427, @@ -4702,10 +5983,13 @@ "question": "What languages are available in the set known as Archenemy on the magic card market and having the code ARC", "evidence": "known as Archenemy refers to mcmName = 'Archenemy'; having the code ARC refers to setCode = 'ARC'", "difficulty": "moderate", - "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.setcode = 'setcode' WHERE t1.\"mcmname\" = 'Archenemy' AND t2.\"setcode\" LIKE 'ARC'", + "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.mcmname = 'Archenemy' AND t2.setcode = 'ARC'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 428, @@ -4713,10 +5997,13 @@ "question": "What is the name of set number 5 and its translation", "evidence": "set number 5 refers to id = 5", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.name, t2.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.\"id\" = t2.\"setcode\"", + "pred": "SELECT name, translation FROM \"set_translations\" WHERE id = 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 429, @@ -4724,10 +6011,13 @@ "question": "What is the language and expansion type of set number 206", "evidence": "set number 206 refers to id = 206", "difficulty": "simple", - "pred": "SELECT t2.language, t1.expansiontype FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.\"id\" = t2.\"setcode\" WHERE id = 206", + "pred": "SELECT t2.language, t2.type FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.id = 206", "gold": "SELECT t2.language, t1.type FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.code = t2.setcode WHERE t2.id = 206", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 430, @@ -4735,10 +6025,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM cards AS t1 INNER JOIN sets AS t2 ON t1.uuid = t2._uuid ORDER BY t2.\"language\" DESC LIMIT 2", + "pred": "SELECT t1.id FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian' AND t1.block = 'Shadowmoor' ORDER BY t1.id DESC LIMIT 2", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 431, @@ -4746,10 +6039,13 @@ "question": "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", "evidence": "available outside of the United States refers to isForeignOnly = 1; has foil cards refers to isFoilOnly = 1; with Japanese writing on them refers to language = 'Japanese'", "difficulty": "challenging", - "pred": "SELECT t2.setcode FROM sets AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.\"setcode\" WHERE t1.\"isforeignonly\" = 1 AND islanguage = 'Japanese'", + "pred": "SELECT t1.setcode FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Japanese' AND t1.isfoilonly = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 432, @@ -4757,10 +6053,13 @@ "question": "Which Russian set of cards contains the most cards overall", "evidence": "Russian refers to language = 'Russian'; contains the most cards overall refers to MAX(baseSetSize)", "difficulty": "moderate", - "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2._uuid ORDER BY COUNT(t1.baseSetSize) DESC LIMIT 1", + "pred": "SELECT t1.id FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Russian' GROUP BY t1.id ORDER BY SUM(t1.basesetsize) DESC LIMIT 1", "gold": "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 t1.basesetsize DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 433, @@ -4768,10 +6067,13 @@ "question": "What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games", "evidence": "are only available for online games refers to isOnlineOnly = 1; percentage = DIVIDE(COUNT(isOnlineOnly = 1),COUNT(isOnlineOnly))*100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN isonlineonly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN sets_translations AS t2 ON t1.uuid = t2.setcode WHERE t1 language = 'Chinese Simplified'", + "pred": "SELECT CAST(SUM(IIF(isonlineonly = 1, 1, 0)) AS REAL) * 100 / COUNT(*) FROM cards WHERE language = 'Chinese Simplified'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 434, @@ -4779,10 +6081,13 @@ "question": "How many sets are available just in Japanese and not in Magic: The Gathering Online", "evidence": "Japanese refers to language = 'Japanese'; not in Magic: The Gathering Online refers to mtgoCode is null or mtgoCode = ''", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM sets WHERE language = 'Japanese' AND mtgocode = ''", + "pred": "SELECT COUNT(t1.id) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Japanese' AND t2.mtgocode IS NULL OR t2.mtgocode = ''", "gold": "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 = '')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 435, @@ -4790,10 +6095,13 @@ "question": "How many card border with black color ? List out the card id", "evidence": "border with black color refers to borderColor = 'black'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE bordercolor = 'black'", + "pred": "SELECT COUNT(DISTINCT cardid) FROM cards WHERE bordercolor = 'black'", "gold": "SELECT id FROM cards WHERE bordercolor = 'black' GROUP BY id", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 436, @@ -4801,10 +6109,13 @@ "question": "How many cards have frame effect as extendedart? List out the id of those cards", "evidence": "\nframe effect as extendedart refers to frameEffects = 'extendedart'\n", "difficulty": "simple", - "pred": "SELECT id FROM cards WHERE frameeffects = 'extendedart'", + "pred": "SELECT COUNT(id) FROM cards WHERE frameeffects = 'extendedart'", "gold": "SELECT id FROM cards WHERE frameeffects = 'extendedart' GROUP BY id", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 437, @@ -4812,10 +6123,13 @@ "question": "Among black card borders, which card has full artwork", "evidence": "white card borders refers to borderColor = 'white'; has full artwork refers to isFullArt = 1", "difficulty": "simple", - "pred": "SELECT isfullart FROM cards WHERE bordercolor = 'white'", + "pred": "SELECT t1.card FROM cards AS t1 INNER JOIN borders AS t2 ON t1.uuid = t2.uuid WHERE t2.isfullart = 1 AND t2.color = 'white'", "gold": "SELECT id FROM cards WHERE bordercolor = 'black' AND isfullart = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 438, @@ -4823,10 +6137,13 @@ "question": "Point out the language of set id \"174\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"id\" = 174", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.setcode = 174", "gold": "SELECT language FROM set_translations WHERE id = 174", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 439, @@ -4834,10 +6151,13 @@ "question": "List out the set name of the set code \"ALL\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.setcode FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.code = t2.\"setcode\" WHERE t1.\"code\" = 'ALL'", + "pred": "SELECT t1.name FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.setcode = 'ALL'", "gold": "SELECT name FROM sets WHERE code = 'ALL'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 440, @@ -4845,10 +6165,13 @@ "question": "Which foreign language used by \"A Pedra Fellwar\"", "evidence": "\"A Pedra Fellwar\" refers to name = 'A Pedra Fellwar'", "difficulty": "simple", - "pred": "SELECT t2.language FROM foreign_data AS t1 INNER JOIN \"language\" AS t2 ON t1.language = t2.\"language\" WHERE t1.\"name\" = 'A Pedra Fellwar'", + "pred": "SELECT t2.language FROM foreign_data AS t1 INNER JOIN language AS t2 ON t1.language = t2.language WHERE t1.name = 'A Pedra Fellwar'", "gold": "SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 441, @@ -4856,10 +6179,13 @@ "question": "State the set code of the set with release date of 07/13/2007", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.setcode FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.code = t2.\"setcode\" WHERE t1.\"releasedate\" = 07/13/2007", + "pred": "SELECT t1.setcode FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.releaseate = '2007-07-13'", "gold": "SELECT t2.setcode FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t1.releasedate = '2007-07-13'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 442, @@ -4867,10 +6193,13 @@ "question": "Mention the base set size and set code of the set that was in block named \"Masques\" and \"Mirage\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.base, t1.setcode FROM sets AS t1 INNER JOIN sets_translations AS t2 ON t1.\"setcode\" = t2.\"sets\"", + "pred": "SELECT t1.basesetsize, t1.setcode FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.block = 'Masques' OR t1.block = 'Mirage'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 443, @@ -4878,10 +6207,13 @@ "question": "Give the code of sets have expansion type of 'expansion'", "evidence": "code of sets refers to setCode", "difficulty": "simple", - "pred": "SELECT setcode FROM sets WHERE type = 'expansion'", + "pred": "SELECT t1.setcode FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.type = 'expansion'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 444, @@ -4889,10 +6221,13 @@ "question": "Name the foreign name of the card that has boros watermark? List out the type of this card", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.type FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"watermark\" = 'Boros watermark'", + "pred": "SELECT t1.name, t2.type FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t1.watermark = 'Boros watermark'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 445, @@ -4900,10 +6235,13 @@ "question": "What is the language and flavor text of the card that has colorpie watermark? List out the type of this card", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.language, t1.colorindicator FROM cards AS t1 INNER JOIN colorpie watermark AS t2 ON t1.\"id\" = t2.\"uuid\"", + "pred": "SELECT t2.language, t2.color, t2.type FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.colorpie watermark = 'colorpie watermark'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 446, @@ -4911,10 +6249,13 @@ "question": "What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror", "evidence": "set of Abyssal Horror refers to name = 'Abyssal Horror'; percentage refers to DIVIDE(COUNT(convertedManaCost = 16),COUNT(convertedManaCost))*100", "difficulty": "moderate", - "pred": "SELECT CAST((SUM(CASE WHEN t2.convertedManaCost = 16 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.uuid) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"name\" = 'Abyssal Horror'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.convertedmanacost = 16 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN sets_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Abyssal Horror'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 447, @@ -4922,10 +6263,13 @@ "question": "Give the code of sets have expansion commander type", "evidence": "code of sets refers to setCode", "difficulty": "simple", - "pred": "SELECT setcode FROM sets WHERE type = 'expansion commander'", + "pred": "SELECT t1.setcode FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.type = 'expansion commander'", "gold": "SELECT t2.setcode FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t1.type = 'commander'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 448, @@ -4933,10 +6277,13 @@ "question": "Name the foreign name of the card that has abzan watermark? List out the type of this card", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.type FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"watermark\" = 'Abzan watermark'", + "pred": "SELECT t1.name, t2.type FROM cards AS t1 INNER JOIN foreign_data AS t2 ON t1.uuid = t2.uuid WHERE t1.watermark = 'abzan watermark'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 449, @@ -4944,10 +6291,13 @@ "question": "What is the language of the card that has azorius watermark? List out the type of this card", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"watermark\" = ' azorius watermark'", + "pred": "SELECT t2.language, t1.type FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.watermark = 'Azorius'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 450, @@ -4955,10 +6305,13 @@ "question": "Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful", "evidence": "designed by Aaron Miller refers to artist = 'Aaron Miller'; are icredibily powerful refers to cardKingdomFoilId is not null AND cardKingdomId is not null", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'Aaron Miller' AND cardKingdomFoilId IS NULL AND cardkingdomid IS NULL", + "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'Aaron Miller' AND NOT cardkingdomfoilid IS NULL AND NOT cardkingdomid IS NULL", "gold": "SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND NOT cardkingdomfoilid IS NULL AND NOT cardkingdomid IS NULL THEN 1 ELSE 0 END) FROM cards", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 451, @@ -4969,7 +6322,10 @@ "pred": "SELECT COUNT(*) FROM cards WHERE availability LIKE '%paper%' AND hand = 3", "gold": "SELECT SUM(CASE WHEN availability = 'paper' AND hand = '3' THEN 1 ELSE 0 END) FROM cards", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 452, @@ -4980,7 +6336,10 @@ "pred": "SELECT name FROM cards WHERE istextless = 0", "gold": "SELECT DISTINCT name FROM cards WHERE istextless = 0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 453, @@ -4988,10 +6347,13 @@ "question": "What's the unconverted mana cost of the card \"Ancestor's Chosen\"", "evidence": "card \"Ancestor's Chosen\" refers to name = 'Ancestor`s Chosen'", "difficulty": "simple", - "pred": "SELECT unconverted mana cost FROM cards WHERE name = 'Ancestor's Chosen'", + "pred": "SELECT unconverted manacost FROM cards WHERE name = 'Ancestor%s Chosen'", "gold": "SELECT DISTINCT manacost FROM cards WHERE name = 'Ancestor''s Chosen'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 454, @@ -4999,10 +6361,13 @@ "question": "Among the cards with a white border color, how many of them have unknown power", "evidence": "unknown power refers to power = '*' or power is null", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM cards WHERE coloridentity = 'white border' AND power = '*'", + "pred": "SELECT COUNT(*) FROM cards WHERE color = 'white' AND power IS NULL", "gold": "SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE bordercolor = 'white'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 455, @@ -5010,10 +6375,13 @@ "question": "Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names", "evidence": "are a promotional painting refers to isPromo = 1; have multiple faces on the same card refers to side is not Null", "difficulty": "simple", - "pred": "SELECT name FROM cards WHERE ispromo = 1 AND side is not Null", + "pred": "SELECT t1.artist FROM cards AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2.uuid WHERE t2.ispromo = 1 AND NOT t1.side IS NULL", "gold": "SELECT DISTINCT name FROM cards WHERE ispromo = 1 AND NOT side IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 456, @@ -5021,10 +6389,13 @@ "question": "What's the list of all types for the card \"Molimo, Maro-Sorcerer\"", "evidence": "card \"Molimo, Maro-Sorcerer\" refers to name = 'Molimo, Maro-Sorcerer'; list of all types refers to subtypes,supertypes", "difficulty": "simple", - "pred": "SELECT subtypes,supertypes FROM cards WHERE name = 'Molimo, Maro-Sorcerer'", + "pred": "SELECT t2.subtypes, t2.supertypes FROM cards AS t1 INNER JOIN subtypes AS t2 ON t1.uuid = t2.subtypes WHERE t1.name = 'Molimo, Maro-Sorcerer'", "gold": "SELECT DISTINCT subtypes, supertypes FROM cards WHERE name = 'Molimo, Maro-Sorcerer'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 457, @@ -5032,10 +6403,13 @@ "question": "Please list the websites where I can purchase the cards that have the promotional type of \"bundle\"", "evidence": "promotional type of \"bundle\" refers to promoTypes = 'bundle'; websites refers to purchaseUrls", "difficulty": "simple", - "pred": "SELECT purchaseurls FROM cards WHERE promoTypes = 'bundle'", + "pred": "SELECT t1.purchaseurls FROM cards AS t1 INNER JOIN purchaseurls AS t2 ON t1.uuid = t2.uuid WHERE t1.ispromo = 'bundle'", "gold": "SELECT DISTINCT purchaseurls FROM cards WHERE promotypes = 'bundle'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 458, @@ -5043,10 +6417,13 @@ "question": "How many artists have designed a card with a black border color and is available in both \"arena\" and \"mtgo\" printing type", "evidence": "available in both \"arena\" and \"mtgo\" refers to availability like '%arena,mtgo%'", "difficulty": "simple", - "pred": "SELECT COUNT(artist) FROM cards WHERE coloridentity = 'black' AND availability LIKE '%arena,mtgo%'", + "pred": "SELECT COUNT(DISTINCT artist) FROM cards WHERE color = 'black' AND type ='mtgo'", "gold": "SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' AND bordercolor = 'black' THEN 1 ELSE NULL END) FROM cards", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 459, @@ -5054,10 +6431,13 @@ "question": "Which card costs more converted mana, \"Serra Angel\" or \"Shrine Keeper\"", "evidence": "\"Serra Angel\" refers to name = 'Serra Angel'; \"Shrine Keeper\" refers to name = 'Shrine Keeper'; card costs more converted mana when the value of convertedManaCost is greater", "difficulty": "moderate", - "pred": "SELECT name FROM cards WHERE name = 'Serra Angel' AND convertedManaCost is greater", + "pred": "SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedmanacost DESC LIMIT 1", "gold": "SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedmanacost DESC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 460, @@ -5065,10 +6445,13 @@ "question": "Which artist designed the card whose promotional name is \"Battra, Dark Destroyer\"", "evidence": "promotional name is \"Battra, Dark Destroyer\" refers to flavorName = 'Battra, Dark Destroyer'", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE flavorname = 'Battra, Dark Destroyer'", + "pred": "SELECT t2.artist FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.artist WHERE t1.color = 'Battra, Dark Destroyer'", "gold": "SELECT artist FROM cards WHERE flavorname = 'Battra, Dark Destroyer'", - "em_norm": 1, - "ex": 0 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 461, @@ -5076,10 +6459,13 @@ "question": "Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style", "evidence": "name of cards refers to name; 2003 card frame style refers to frameVersion = '2003'", "difficulty": "simple", - "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t2.uuid = t3.uuids WHERE t1.\"frameversion\" = '2003' AND t2.\"reconvertedmanacost\" = 3", + "pred": "SELECT name FROM cards WHERE frameversion = '2003' ORDER BY convertedmanacost DESC LIMIT 3", "gold": "SELECT name FROM cards WHERE frameversion = 2003 ORDER BY convertedmanacost DESC LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 462, @@ -5087,10 +6473,13 @@ "question": "What's the Italian name of the set of cards with \"Ancestor's Chosen\" is in", "evidence": "Italian is a language which refers to language = 'Italian'; with \"Ancestor's Chosen\" in the card set refers to name = 'Ancestor''s Chosen'", "difficulty": "moderate", - "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"name\" = 'Ancestor''s Chosen'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian' AND t1.name = 'Ancestor''s Chosen'", "gold": "SELECT translation FROM set_translations WHERE setcode IN (SELECT setcode FROM cards WHERE name = 'Ancestor''s Chosen') AND language = 'Italian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 463, @@ -5098,10 +6487,13 @@ "question": "How many translations are there for the set of cards with \"Angel of Mercy\" in it", "evidence": "set of cards with \"Angel of Mercy\" in it refers to name = 'Angel of Mercy'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM sets WHERE name = 'Angel of Mercy'", + "pred": "SELECT COUNT(t2.translated) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Angel of Mercy'", "gold": "SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setcode IN (SELECT setcode FROM cards WHERE name = 'Angel of Mercy') AND NOT translation IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 464, @@ -5109,10 +6501,13 @@ "question": "Please list the names of the cards in the set \"Hauptset Zehnte Edition\"", "evidence": "card set \"Hauptset Zehnte Edition\" refers to translation = 'Hauptset Zehnte Edition'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"translated\" = 'Hauptset Zehnte Edition'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.translated = 'Hauptset Zehnte Edition'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 465, @@ -5120,10 +6515,13 @@ "question": "For the set of cards with \"Ancestor's Chosen\" in it, is there a Korean version of it", "evidence": "set of cards with \"Ancestor''s Chosen\" in it refers to name = 'Ancestor''s Chosen'; Korean version refers to language = 'Korean'", "difficulty": "moderate", - "pred": "SELECT language FROM cards WHERE name = 'Ancestor''s Chosen'", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Ancestor''s Chosen' AND t2.language = 'Korean'", "gold": "SELECT IIF(SUM(CASE WHEN t2.language = 'Korean' AND NOT t2.translation IS 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 466, @@ -5131,10 +6529,13 @@ "question": "Among the cards in the set \"Hauptset Zehnte Edition\", how many of them are designed by Adam Rex", "evidence": "card set \"Hauptset Zehnte Edition\" refers to translation = 'Hauptset Zehnte Edition'; designed by Adam refers to artist = 'Adam Rex'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'Adam Rex' AND translation = 'Hauptset Zehnte Edition'", + "pred": "SELECT COUNT(t1.id) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.artist = 'Adam Rex' AND t2.language = 'Hauptset Zehnte Edition'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 467, @@ -5142,10 +6543,13 @@ "question": "How many cards are there in the base set of \"Hauptset Zehnte Edition\"", "evidence": "\"Hauptset Zehnte Edition\" refers to translation = 'Hauptset Zehnte Edition'; number of cards refers to baseSetSize", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM sets WHERE translation = 'Hauptset Zehnte Edition'", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'Hauptset Zehnte Edition'", "gold": "SELECT t1.basesetsize FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t2.translation = 'Hauptset Zehnte Edition'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 468, @@ -5153,10 +6557,13 @@ "question": "What is the Simplified Chinese translation of the name of the set \"Eighth Edition\"", "evidence": "Eighth Edition is the name of card set which refers to name = 'Eighth Edition'; Simplified Chinese refers to language = 'Chinese Simplified'; translation of the name refers to translation", "difficulty": "moderate", - "pred": "SELECT t2.translated FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"name\" = 'Eighth Edition'", + "pred": "SELECT t2.translated FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Eighth Edition' AND t2.language = 'Chinese Simplified'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 469, @@ -5164,10 +6571,13 @@ "question": "Did the set of cards with \"Angel of Mercy\" appear on Magic: The Gathering Online", "evidence": "card set \"Angel of Mercy\" refers to name = 'Angel of Mercy'; appear on Magic: The Gathering Online refers to mtgoCode is NOT NULL and vice versa", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.setcode FROM cards AS t1 INNER JOIN sets AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"name\" = 'Angel of Mercy' AND t1.'mtgocode\" IS NULL", + "pred": "SELECT CASE WHEN t2.name = 'Angel of Mercy' THEN 'YES' ELSE 'NO' END FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE NOT t2.mtgocode IS NULL", "gold": "SELECT IIF(NOT t2.mtgocode IS NULL, 'YES', 'NO') FROM cards AS t1 INNER JOIN sets AS t2 ON t2.code = t1.setcode WHERE t1.name = 'Angel of Mercy'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 470, @@ -5175,10 +6585,13 @@ "question": "When was the set of cards with \"Ancestor's Chosen\" released", "evidence": "card set \"Ancestor's Chosen\" refers to name = 'Ancestor''s Chosen'; when released refers to releaseDate", "difficulty": "simple", - "pred": "SELECT releasedate FROM cards WHERE name = 'Ancestor''s Chosen'", + "pred": "SELECT t1.releasedate FROM cards AS t1 INNER JOIN sets AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Ancestor''s Chosen'", "gold": "SELECT DISTINCT t2.releasedate FROM cards AS t1 INNER JOIN sets AS t2 ON t2.code = t1.setcode WHERE t1.name = 'Ancestor''s Chosen'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 471, @@ -5186,10 +6599,13 @@ "question": "What is the expansion type of the set \"Hauptset Zehnte Edition\"", "evidence": "card set \"Hauptset Zehnte Edition\" refers to translation = ' Hauptset Zehnte Edition'; expansion type refers to type", "difficulty": "simple", - "pred": "SELECT type FROM set_translations WHERE translation = 'Hauptset Zehnte Edition'", + "pred": "SELECT t2.type FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.translated = 'Hauptset Zehnte Edition'", "gold": "SELECT t1.type FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t2.translation = 'Hauptset Zehnte Edition'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 472, @@ -5197,10 +6613,13 @@ "question": "Among the sets in the block \"Ice Age\", how many of them have an Italian translation", "evidence": "sets in the block \"Ice Age\" refers to block = 'Ice Age'; Italian translation refers to language = 'Italian' and translation is not null", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM sets WHERE language = 'Italian' AND block = 'Ice Age'", + "pred": "SELECT SUM(IIF(t2.language = 'Italian', 1, 0)) FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.block = 'Ice Age'", "gold": "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 NOT t2.translation IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 473, @@ -5208,10 +6627,13 @@ "question": "Is the set of cards with Adarkar Valkyrie only available outside the United States", "evidence": "card set Adarkar Valkyrie refers to name = 'Adarkar Valkyrie'; isForeignOnly = 1 means only available outside the United States;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.name FROM cards AS t1 INNER JOIN \"set\" AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"name\" = 'Adarkar Valkyrie' AND isforeignonly = 1", + "pred": "SELECT IIF(isforeignonly = 1, availability, 'YES') FROM cards WHERE name = 'Adarkar Valkyrie'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 474, @@ -5219,10 +6641,13 @@ "question": "Among the sets of cards that have an Italian translation, how many of them have a base set number of under 100", "evidence": "Italian translation refers to language = 'Italian'; have a translation means translation is not null; base set number of under 100 refers to baseSetSize < 10", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM sets WHERE language = 'Italian' AND baseSetSize < 10", + "pred": "SELECT COUNT(t1.id) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian' AND t1.basesetsize < 10", "gold": "SELECT COUNT(t1.id) FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE NOT t2.translation IS NULL AND t1.basesetsize < 100 AND t2.language = 'Italian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 475, @@ -5233,7 +6658,10 @@ "pred": "SELECT COUNT(*) FROM cards WHERE name = 'Coldsnap' AND bordercolor = 'black'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 476, @@ -5241,10 +6669,13 @@ "question": "Please list the name of the cards in the set Coldsnap with the highest converted mana cost", "evidence": "card set Coldsnap refers to name = 'Coldsnap'", "difficulty": "simple", - "pred": "SELECT name FROM cards WHERE name = 'Coldsnap'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Coldsnap' ORDER BY t2. convertedmanacost DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 477, @@ -5252,10 +6683,13 @@ "question": "Which of these artists have designed a card in the set Coldsnap, Jeremy Jarvis, Aaron Miller or Chippy", "evidence": "card set Coldsnap refers to name = 'Coldsnap'; Jeremy Jarvis, Aaron Miller or Chippy are the name of artists which refers to artist IN ('Jeremy Jarvis', 'Aaron Miller','Chippy');", "difficulty": "challenging", - "pred": "SELECT artist FROM cards WHERE name = 'Coldsnap' AND artist IN ('Jeremy Jarvis', 'Aaron Miller','Chippy')", + "pred": "SELECT artist FROM cards WHERE name IN ('Coldsnap', 'Aaron Miller', 'Chippy')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 478, @@ -5266,7 +6700,10 @@ "pred": "SELECT cardnumber FROM cards WHERE name = 'Coldsnap'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 479, @@ -5274,10 +6711,13 @@ "question": "Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power", "evidence": "card set Coldsnap refers to name = 'Coldsnap'; converted mana cost higher than 5 refers to convertedManaCost > 5; unknown power refers to power = '*' or T1.power is null", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE name = 'Coldsnap' AND convertedManaCost > 5", + "pred": "SELECT COUNT(*) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Coldsnap' AND t1. convertedmacost > 5 AND t2.power IS NULL", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 480, @@ -5285,10 +6725,13 @@ "question": "What is the Italian flavor text of the card \"Ancestor's Chosen\"", "evidence": "Italian refers to language = 'Italian'; flavor text refers to flavorText; \"Ancestor''s Chosen\" refers to name = 'Ancestor''s Chosen'", "difficulty": "moderate", - "pred": "SELECT t1.colortext FROM cards AS t1 INNER JOIN \"language\" AS t2 ON t2.language = t3.language WHERE t1.\"name\" = 'Ancestor''s Chosen'", + "pred": "SELECT t2.colortext FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian' AND t1.name = 'Ancestor''s Chosen'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 481, @@ -5296,10 +6739,13 @@ "question": "Please list all the foreign languages in which the card \"Ancestor's Chosen\" has a flavor text", "evidence": "\"Ancestor''s Chosen\" refers to name = 'Ancestor''s Chosen'; has a flavor text refers to flavorText is not null", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.language FROM foreign_data AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2._uuid WHERE t1.\"name\" = 'Ancestor''s Chosen'", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN \"foreign_data\" AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Ancestor''s Chosen' AND NOT t2.text IS NULL", "gold": "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 NOT t2.flavortext IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 482, @@ -5307,10 +6753,13 @@ "question": "What's the German type of the card \"Ancestor's Chosen\"", "evidence": "German refers to language = 'German'; \"Ancestor's Chosen\" refers to name = 'Ancestor''s Chosen'", "difficulty": "simple", - "pred": "SELECT DISTINCT type FROM cards WHERE language = 'German' AND name = 'Ancestor''s Chosen'", + "pred": "SELECT t2.type FROM cards AS t1 INNER JOIN language_translations AS t2 ON t1.uuid = t2.language WHERE t2.language = 'German' AND t1.name = 'Ancestor''s Chosen'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 483, @@ -5318,10 +6767,13 @@ "question": "Please list the Italian text ruling of all the cards in the set Coldsnap", "evidence": "card set Coldsnap refers to name = 'Coldsnap'; Italian refers to language = 'Italian'", "difficulty": "moderate", - "pred": "SELECT text FROM sets WHERE name = 'Coldsnap'", + "pred": "SELECT t2.text FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Coldsnap' AND t2.language = 'Italian'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 484, @@ -5329,10 +6781,13 @@ "question": "Please list the Italian names of the cards in the set Coldsnap with the highest converted mana cost", "evidence": "card set Coldsnap refers to name = 'Coldsnap'; Italian refers to language = 'Italian'; highest converted mana cost refers to MAX(convertedManaCost)", "difficulty": "moderate", - "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2._uuid ORDER BY t1.\"converted mana cost\" DESC LIMIT 1", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Italian' AND t1.name = 'Coldsnap' ORDER BY t2.convertedmacost DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 485, @@ -5340,10 +6795,13 @@ "question": "When was the ruling for the card 'Reminisce' created", "evidence": "Reminisce refers to name = 'Reminisce'; when created is the date", "difficulty": "simple", - "pred": "SELECT date FROM rulings WHERE name = 'Reminisce'", + "pred": "SELECT t2.date FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Reminisce'", "gold": "SELECT t2.date FROM cards AS t1 INNER JOIN rulings AS t2 ON t2.uuid = t1.uuid WHERE t1.name = 'Reminisce'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 486, @@ -5351,10 +6809,13 @@ "question": "What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap", "evidence": "converted mana cost of 7 refers to convertedManaCost = 7; card set Coldsnap refers to name = 'Coldsnap'; percentage = DIVIDE(SUM(convertedManaCost = 7), SUM(convertedManaCost))*100", "difficulty": "moderate", - "pred": "SELECT CAST((SUM(CASE WHEN convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards WHERE name = 'Coldsnap'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.convertedManacost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards AS t1 INNER JOIN sets_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Coldsnap'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 487, @@ -5362,10 +6823,13 @@ "question": "What is the percentage of incredibly powerful cards in the set Coldsnap", "evidence": "card set Coldsnap refers to name = 'Coldsnap'; foil is incredibly powerful refers to cardKingdomFoilId is not null AND cardKingdomId is not null; the percentage of incredibly powerful cards in the set refers to DIVIDE(SUM(incredibly powerful), SUM(name = 'Coldsnap'))*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN name = 'Coldsnap' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.uuid) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.setcode = t2.zipcode WHERE t3.cardkingdomfoilid IS NULL AND t1.\"name\" = 'CardKingdomId'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.name = 'Coldsnap' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN NOT t2.name IS NULL THEN 1 ELSE 0 END) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.uuid = t2.uuid", "gold": "SELECT CAST(SUM(CASE WHEN NOT t1.cardkingdomfoilid IS NULL AND NOT t1.cardkingdomid IS 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 488, @@ -5376,7 +6840,10 @@ "pred": "SELECT code FROM sets WHERE releasedate = '2017-07-14'", "gold": "SELECT code FROM sets WHERE releasedate = '2017-07-14' GROUP BY releasedate, code", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 489, @@ -5384,10 +6851,13 @@ "question": "List the keyrune code for the set whose code is 'PKHC'", "evidence": "keyrune code refers to keyruneCode", "difficulty": "simple", - "pred": "SELECT keyrunecode FROM sets WHERE code = 'PKHC'", + "pred": "SELECT t1.keyrunecode FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.code = 'PKHC'", "gold": "SELECT keyrunecode FROM sets WHERE code = 'PKHC'", - "em_norm": 1, - "ex": 0 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 490, @@ -5398,7 +6868,10 @@ "pred": "SELECT mcmid FROM sets WHERE code = 'SS2'", "gold": "SELECT mcmid FROM sets WHERE code = 'SS2'", "em_norm": 1, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 491, @@ -5406,10 +6879,13 @@ "question": "What's the magic card market name for the set which was released on 2017/6/9", "evidence": "magic card market name refers to mcmName", "difficulty": "simple", - "pred": "SELECT mcmname FROM sets WHERE releasedate = '2017/6/9'", + "pred": "SELECT mcmname FROM sets WHERE releasedate = '2017-06-09'", "gold": "SELECT mcmname FROM sets WHERE releasedate = '2017-06-09'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 492, @@ -5420,7 +6896,10 @@ "pred": "SELECT type FROM sets WHERE name = 'From the Vault: Lore'", "gold": "SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 493, @@ -5428,10 +6907,13 @@ "question": "For the set \"Commander 2014 Oversized\" , give its parent code", "evidence": "the set \"Commander 2014 Oversized\" refers to name = 'Commander 2014 Oversized';", "difficulty": "simple", - "pred": "SELECT parentcode FROM sets WHERE name = 'Commander 2014 Oversized'", + "pred": "SELECT t1.code FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Commander 2014 Oversized'", "gold": "SELECT parentcode FROM sets WHERE name = 'Commander 2014 Oversized'", - "em_norm": 1, - "ex": 0 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 494, @@ -5439,10 +6921,13 @@ "question": "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", "evidence": "all cards illustrated by Jim Pavelec refers to artist = 'Jim Pavelec'; the text of the ruling refers to text; cards have missing or degraded properties and values if hasContentWarning = 1 else it doesn't have;", "difficulty": "challenging", - "pred": "SELECT t2.text FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"artist\" = 'Jim Pavelec' AND hascontentwarning = 1", + "pred": "SELECT t1.text FROM cards AS t1 INNER JOIN rulings AS t2 ON t1.uuid = t2.uuid WHERE t2.artist = 'Jim Pavelec' AND t1.hascontentwarning = 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 495, @@ -5450,10 +6935,13 @@ "question": "What was the release date for the set which card \"Evacuation\" in it", "evidence": "\"Evacuation\" refers to name = 'Evacuation'; release date refers to releaseDate", "difficulty": "simple", - "pred": "SELECT releasedate FROM cards WHERE name = 'Evacuation'", + "pred": "SELECT t1.releaseate FROM sets AS t1 INNER JOIN cards AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Evacuation'", "gold": "SELECT t2.releasedate FROM cards AS t1 INNER JOIN sets AS t2 ON t2.code = t1.setcode WHERE t1.name = 'Evacuation'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 496, @@ -5461,10 +6949,13 @@ "question": "What is the number of cards are there in the set of \"Rinascita di Alara\"", "evidence": "number of cards refers to baseSetSize; set of \"Rinascita di Alara\" refers to translation = 'Rinascita di Alara'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM sets WHERE translation = 'Rinascita di Alara'", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.translated = 'Rinascita di Alara'", "gold": "SELECT t1.basesetsize FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t2.translation = 'Rinascita di Alara'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 497, @@ -5472,10 +6963,13 @@ "question": "List the expansion type of the set \"Huitième édition\"", "evidence": "the set \"Huitième édition\" refers to translation = 'Huitième édition'; expansion type refers to type", "difficulty": "simple", - "pred": "SELECT type FROM set_translations WHERE translation = 'Huitième édition'", + "pred": "SELECT t1.type FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Huitième édition'", "gold": "SELECT type FROM sets WHERE code IN (SELECT setcode FROM set_translations WHERE translation = 'Huitième édition')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 498, @@ -5483,10 +6977,13 @@ "question": "What's the French name of the set of cards with \"Tendo Ice Bridge\" is in", "evidence": "French refers to language = 'French'; \"Tendo Ice Bridge\" is a translated name of a card; translated name refers to translation", "difficulty": "moderate", - "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"language\" = 'French' AND t3.name = 'Tendo Ice Bridge'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'French' AND t1.name = 'Tendo Ice Bridge'", "gold": "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 NOT t2.translation IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 499, @@ -5494,10 +6991,13 @@ "question": "How many translations of the name of the set \"Tenth Edition\"", "evidence": "translations of the name refers to translation; translation is not NULL; set \"Salvat 2011\" refers to name = 'Tenth Edition'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM set_translations WHERE name = 'Tenth Edition'", + "pred": "SELECT COUNT(t2.language) FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Tenth Edition'", "gold": "SELECT COUNT(DISTINCT t2.translation) FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t1.name = 'Tenth Edition' AND NOT t2.translation IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 500, @@ -5505,10 +7005,13 @@ "question": "Tell the Japanese name of the set which card \"Fellwar Stone\" is in it", "evidence": "Japanese name refers to language = 'Japanese'; card \"Fellwar Stone\" refers to name = 'Fellwar Stone'", "difficulty": "moderate", - "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"name\" = 'Fellwar Stone'", + "pred": "SELECT t2.language FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Fellwar Stone' AND t2.language = 'Japanese'", "gold": "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 NOT t2.translation IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 501, @@ -5516,10 +7019,13 @@ "question": "Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost", "evidence": "set 'Journey into Nyx Hero's Path' refers to name = 'Journey into Nyx Hero''s Path'", "difficulty": "moderate", - "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t3.code WHERE t1.\"name\" = 'Journey into Nyx Hero's Path'", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.name = 'Journey into Nyx Hero''s Path' ORDER BY t2.releasability DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 502, @@ -5527,10 +7033,13 @@ "question": "What is the release date for the set \"Ola de frío\"", "evidence": "release date is the date of card set being released; set \"Ola de frío\" refers to translation = 'Ola de frío'", "difficulty": "simple", - "pred": "SELECT t2.releasedate FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"translated\" = 'Ola de frío'", + "pred": "SELECT t1.releaseate FROM cards AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t2.language = 'Ola de frío'", "gold": "SELECT t1.releasedate FROM sets AS t1 INNER JOIN set_translations AS t2 ON t2.setcode = t1.code WHERE t2.translation = 'Ola de frío'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 503, @@ -5538,10 +7047,13 @@ "question": "What was the expansion type for the set which card \"Samite Pilgrim\" in it", "evidence": "expansion type refers to type; card \"Samite Pilgrim\" refers to name = 'Samite Pilgrim'", "difficulty": "simple", - "pred": "SELECT type FROM cards WHERE name = 'Samite Pilgrim'", + "pred": "SELECT t2.type FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t1.name = 'Samite Pilgrim'", "gold": "SELECT type FROM sets WHERE code IN (SELECT setcode FROM cards WHERE name = 'Samite Pilgrim')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 504, @@ -5549,10 +7061,13 @@ "question": "How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'", "evidence": "the set 'World Championship Decks 2004' refers to name = 'World Championship Decks 2004'", "difficulty": "simple", - "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.setcode = t2.code WHERE t2.\"name\" = 'World Championship Decks 2004'", + "pred": "SELECT COUNT(*) FROM cards WHERE name = 'World Championship Decks 2004' AND convertedmanacost = 3", "gold": "SELECT COUNT(id) FROM cards WHERE setcode IN (SELECT code FROM sets WHERE name = 'World Championship Decks 2004') AND convertedmanacost = 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 505, @@ -5560,10 +7075,13 @@ "question": "Show the Simplified Chinese translation of the name of the set \"Mirrodin\"", "evidence": "Simplified Chinese translation refers to language = 'Chinese Simplified'; name of the set \"Mirrodin\" refers to name = 'Mirrodin'", "difficulty": "moderate", - "pred": "SELECT t2.language FROM \"set_translations\" AS t1 INNER JOIN language AS t2 ON t1.language = 'Chinese Simplified'", + "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Mirrodin' AND t2.language = 'Chinese Simplified'", "gold": "SELECT translation FROM set_translations WHERE setcode IN (SELECT code FROM sets WHERE name = 'Mirrodin') AND language = 'Chinese Simplified'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 506, @@ -5571,10 +7089,13 @@ "question": "For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil", "evidence": "Japanese translation refers to language = 'Japanese'; in non-foil refers to isNonFoilOnly = 1; percentage of Japanese non foil in Japanese cards refers to DIVIDE(SUM(isNonFoilOnly = 1), SUM(language = 'Japanese'))*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.uuid) FROM sets AS t1 INNER JOIN cards AS t2 ON t1.setcode = t2.\"setcode\" WHERE isnonfoilonly = 1", + "pred": "SELECT CAST(SUM(IIF(isnonfoilonly = 1, 1, 0)) AS REAL) * 100 / SUM(IIF(isnonfoilonly = 1, 1, 0)) FROM cards WHERE language = 'Japanese'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 507, @@ -5582,10 +7103,13 @@ "question": "For all the set of cards that has Brazil Portuguese translation, what is the percentage of them are only available online", "evidence": "Brazil Portuguese translation refers to language = 'Portuguese (Brazil)'; only available online refers to isOnlineOnly = 1; percentage of online only Brazil Portuguese in all Brazil Portuguese cards refers to DIVIDE(SUM(isOnlineOnly = 1), SUM(language = 'Portuguese (Brazil)))*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN isonlineonly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM sets WHERE language = 'Portuguese (Brazil)'", + "pred": "SELECT CAST(SUM(IIF(isonlineonly = 1, 1, 0)) AS REAL) * 100 / SUM(IIF(isonlineonly = 1, 1, 0)) FROM cards", "gold": "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)')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 508, @@ -5593,10 +7117,13 @@ "question": "What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot", "evidence": "created by Aleksi Briclot refers to artist = 'Aleksi Briclot'; doesn't have a text box refers to isTextless = 1; available printing types refers to availability", "difficulty": "moderate", - "pred": "SELECT t2.istextless FROM cards AS t1 INNER JOIN availability AS t2 ON t1.uuid = t2.\"uuid\" WHERE t1.\"artist\" = 'Aleksi Briclot' AND istextless = 1", + "pred": "SELECT t2.available FROM cards AS t1 INNER JOIN printing AS t2 ON t1.uuid = t2.uuid WHERE t1.artist = 'Aleksi Briclot' AND t1.istextless = 1", "gold": "SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND istextless = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 509, @@ -5604,10 +7131,13 @@ "question": "What is the unique id of the set that has the highest number of cards", "evidence": "the highest number of cards refers to MAX(baseSetSize); unique id refers to id", "difficulty": "simple", - "pred": "SELECT id FROM sets ORDER BYbaseSetSize DESC LIMIT 1", + "pred": "SELECT id FROM sets ORDER BY basesetsize DESC LIMIT 1", "gold": "SELECT id FROM sets ORDER BY basesetsize DESC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 510, @@ -5615,10 +7145,13 @@ "question": "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", "evidence": "doesn't have multiple faces refers to side IS NULL; illustrator refers to artist", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE side IS NULL AND cost = (SELECT MAX(cost) FROM cards)", + "pred": "SELECT t2.artist FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.artist WHERE t1.cost = (SELECT MAX(cost) FROM cards)", "gold": "SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedmanacost DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 511, @@ -5626,10 +7159,13 @@ "question": "What is the most common visual frame effects among the incredibly powerful foils", "evidence": "when both cardKingdomFoilId and cardKingdomId are not null, this foil is incredibly powerful; most common visual frame effects refers to MAX(frameEffects)", "difficulty": "moderate", - "pred": "SELECT MAX(frameeffects) FROM cards AS t1 INNER JOIN frames AS t2 ON t1.isuid = t2.uuid WHERE t3.cardkingdomdomid = 'cardKingdomId' ORDER BY t4.frameeffects DESC LIMIT 1", + "pred": "SELECT t2.frameeffects FROM cards AS t1 INNER JOIN frames AS t2 ON t1.uuid = t2.frameeffects WHERE NOT t1.cardkingdomfoilid IS NULL ORDER BY t2.frameeffects DESC LIMIT 1", "gold": "SELECT frameeffects FROM cards WHERE NOT cardkingdomfoilid IS NULL AND NOT cardkingdomid IS NULL GROUP BY frameeffects ORDER BY COUNT(frameeffects) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 512, @@ -5637,10 +7173,13 @@ "question": "How many cards with unknown power that can't be found in foil is in duel deck A", "evidence": "unknown power refers to power IS NULL or power = '*'; can't be found in foil refers to hasFoil = 0; duel deck A refers to duelDeck = 'a'", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN sets AS t2 ON t1.\"uuid\" = t2.\"uid\" WHERE t2.hasfoil = 0 AND t1.'sfoil' = 0", + "pred": "SELECT COUNT(*) FROM cards WHERE hasfoil = 0 AND power IN (SELECT MAX(power) FROM cards)", "gold": "SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasfoil = 0 AND dueldeck = 'a'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 513, @@ -5648,10 +7187,13 @@ "question": "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", "evidence": "expansion type refers to type where type = 'commander'; totalSetSize: The total number of cards in the set, including promotional and related supplemental products but excluding Alchemy modifications; highest total number of cards refers to MAX(totalSetSize)", "difficulty": "challenging", - "pred": "SELECT MAX(t1.totalSetSize) FROM sets AS t1 INNER JOIN cards AS t2 ON t1.setcode = t2.setid WHERE t2.\"type\" = 'commander' AND t1.\"type' = 'alchemy'", + "pred": "SELECT t1.id FROM cards AS t1 INNER JOIN sets_translations AS t2 ON t1.uuid = t2.uuid WHERE t2.type = 'commander' GROUP BY t1.id ORDER BY SUM(t1.totalSetsize) DESC LIMIT 1", "gold": "SELECT id FROM sets WHERE type = 'commander' ORDER BY totalsetsize DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 514, @@ -5659,10 +7201,13 @@ "question": "In duels, what are the top 10 cards with the highest uncoverted mana cost", "evidence": "duels refer to format = 'duel'; the highest uncoverted mana cost refers to MAX(manaCost)", "difficulty": "simple", - "pred": "SELECT MAX(manacost) FROM cards WHERE format = 'duel' ORDER BY manacost DESC LIMIT 10", + "pred": "SELECT t1.name FROM cards AS t1 INNER JOIN \"duels\" AS t2 ON t1.uuid = t2.uuid WHERE t2.format = 'duel' ORDER BY t1.manacost DESC LIMIT 10", "gold": "SELECT DISTINCT name FROM cards WHERE uuid IN (SELECT uuid FROM legalities WHERE format = 'duel') ORDER BY manacost DESC LIMIT 10 OFFSET 0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 515, @@ -5670,10 +7215,13 @@ "question": "When was the oldest mythic card released and what are its legal play formats", "evidence": "the oldest card refers to MIN(originalReleaseDate); mythic card refers to rarity = 'mythic'; legal play refers to status = 'legal'; play format refers to format", "difficulty": "moderate", - "pred": "SELECT MIN(releasedate) FROM cards WHERE rarity = 'mythic' AND status = 'legal'", + "pred": "SELECT MIN(releasedate), format FROM cards WHERE rarity ='mythic' AND status = 'legal'", "gold": "SELECT t1.originalreleasedate, t2.format FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t1.rarity = 'mythic' AND NOT t1.originalreleasedate IS NULL AND t2.status = 'Legal' ORDER BY t1.originalreleasedate LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 516, @@ -5681,10 +7229,13 @@ "question": "How many cards did Volkan Baǵa illustrated whose foreign language is in French", "evidence": "Volkan Baǵa refers to artist = 'Volkan Baǵa'; foreign language is in French refers to language = 'French'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'Volkan Baǵa' AND language = 'French'", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN \"language\" AS t2 ON t1.uuid = t2.uuid WHERE t2.language = 'French' AND t1.artist = 'Volkan Baõa'", "gold": "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ǵa' AND t2.language = 'French' GROUP BY t1.id) AS t3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 517, @@ -5692,10 +7243,13 @@ "question": "How many rare enchantment Abundance cards are there whose play format status are all legal", "evidence": "rare refers to rarity = 'rare'; enchantment card refers to types = 'Enchantment'; Abundance cards refers to name = 'Abundance'; format status are all legal refers to status = 'Legal'", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.uuid) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.\"uuid\" = t2.\"uid\" WHERE t2.name = 'Abundance' AND t1.'status\" = 'Legal'", + "pred": "SELECT COUNT(t1.uuid) FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.status = 'Legal' AND t1.type = 'Enchantment' AND t1.name = 'Abundance'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 518, @@ -5703,10 +7257,13 @@ "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition", "evidence": "play format refers to format; banned status refers to status = 'Banned'; the highest number of banned status refers to MAX(COUNT(status = 'Banned'))", "difficulty": "moderate", - "pred": "SELECT format, name FROM cards WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(name) DESC LIMIT 1", + "pred": "SELECT format, name FROM cards WHERE status = 'Banned' GROUP BY format, name ORDER BY COUNT(name) DESC LIMIT 1", "gold": "WITH maxbanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT t2.format, t1.name FROM cards AS t1 INNER JOIN legalities AS t2 ON t2.uuid = t1.uuid INNER JOIN maxbanned AS mb ON mb.format = t2.format WHERE t2.status = 'Banned'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 519, @@ -5714,10 +7271,13 @@ "question": "What is the language of the \"Battlebond\" set", "evidence": "\"Battlebond\" set refers to name = 'Battlebond'", "difficulty": "simple", - "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"name\" = 'Battlebond'", + "pred": "SELECT t2.language FROM sets AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.id = t2.setcode WHERE t1.name = 'Battlebond'", "gold": "SELECT language FROM set_translations WHERE id IN (SELECT id FROM sets WHERE name = 'Battlebond')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 520, @@ -5725,10 +7285,13 @@ "question": "Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated", "evidence": "format of the cards refers to format; illustrator refers to artist; the least amount of cards refers to MIN(artist)", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.artist FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2._uuid ORDER BY COUNT(t1.artist) DESC LIMIT 1", + "pred": "SELECT t2.artist, t2.format FROM cards AS t1 INNER JOIN artist AS t2 ON t1.uuid = t2.artist GROUP BY t2.artist ORDER BY COUNT(t1.uuid) LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 521, @@ -5736,10 +7299,13 @@ "question": "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", "evidence": "version of frame style is 1997 refers to frameVersion = '1997'; illustrated by D. Alexander Gregory refers to artist = 'D. Alexander Gregory'; sensitive content refers to hasContentWarning = 1; legacy play format refers to format = 'legacy'; status of the card refers to status", "difficulty": "challenging", - "pred": "SELECT t2.status FROM cards AS t1 INNER JOIN \"legacy play format\" AS t2 ON t1.uuid = t2._uuid WHERE t1.\"artist\" = 'D. Alexander Gregory' AND t2.\"hascontentwarning\" = 1", + "pred": "SELECT t1.status FROM cards AS t1 INNER JOIN documents AS t2 ON t1.uuid = t2.uuid WHERE t1.frameversion = 1997 AND t2.artist = 'D. Alexander Gregory' AND t2.format = 'legacy' AND t1.hascontentwarning = 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 522, @@ -5750,7 +7316,10 @@ "pred": "SELECT name, format FROM cards WHERE edhrecrank = 1 AND status = 'Banned'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 523, @@ -5758,10 +7327,13 @@ "question": "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", "evidence": "AVG(id); releaseDate BETWEEN 1/1/2012 AND 12/31/2015; the common language refers to MAX(COUNT(language))", "difficulty": "challenging", - "pred": "SELECT AVG(t2.language) FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.id = t2.setcode WHERE t1.\"releasedate\" BETWEEN 1/1/2012 AND 12/31/2015", + "pred": "SELECT CAST(SUM(CASE WHEN t2.language = 'Common' THEN 1 ELSE 0 END) AS REAL) / COUNT(t2.language) FROM cards AS t1 INNER JOIN \"set_translations\" AS t2 ON t1.uuid = t2.uuid WHERE t2.releasedate BETWEEN '2012-01-01' AND '2015-12-31'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 524, @@ -5769,10 +7341,13 @@ "question": "List the artists who illustrated cards with black borders which are available only in arena", "evidence": "black borders refers to BorderColor = 'black'; available only in arena refers to availability = 'arena'", "difficulty": "simple", - "pred": "SELECT artist FROM cards WHERE bordercolor = 'black' AND availability = 'arena'", + "pred": "SELECT t1.artist FROM cards AS t1 INNER JOIN artists AS t2 ON t1.uuid = t2.uuid WHERE t1.color = 'black' AND t1. availability = 'arena'", "gold": "SELECT DISTINCT artist FROM cards WHERE availability = 'arena' AND bordercolor = 'black'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 525, @@ -5780,10 +7355,13 @@ "question": "Find the uuid of cards in which the old school format is restricted or banned", "evidence": "old school format refers to format = 'oldschool'; restricted or banned refers to status = 'banned' or 'restricted'", "difficulty": "simple", - "pred": "SELECT uuid FROM cards WHERE format = 'oldschool' AND status = 'restricted'", + "pred": "SELECT t1.uuid FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.status IN ('Banned','restricted')", "gold": "SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 526, @@ -5794,7 +7372,10 @@ "pred": "SELECT COUNT(*) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'", "gold": "SELECT COUNT(id) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 527, @@ -5802,10 +7383,13 @@ "question": "What are the rulings for the card named and designed by Kev Walker? List them in descending order of dates", "evidence": "rulings refers to text; card named and designed by Kev Walker refers to artist = 'Kev Walker'; descending order of dates refers to MAX(date);", "difficulty": "moderate", - "pred": "SELECT MAX(date) FROM cards WHERE artist = 'Kev Walker' ORDER BY date DESC LIMIT 1", + "pred": "SELECT text FROM cards WHERE artist = 'Kev Walker' ORDER BY date DESC", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 528, @@ -5813,10 +7397,13 @@ "question": "List the names of all the cards in the set Hour of Devastation and find the formats in which these cards are legal", "evidence": "the set Hour of Devastation refers to set.name = 'Hour of Devastation'; names of all the cards in the set refers to cards.name; legal cards refers to status = 'Legal'; the formats refers to format", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.name FROM cards AS t1 INNER JOIN \"sets\" AS t2 ON t1.uuid = t2.\"set\" WHERE t1.\"name\" = 'Hour of Devastation'", + "pred": "SELECT t1.name, t2.format FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.status = 'Legal' AND t1.name = 'Hour of Devastation'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 529, @@ -5824,10 +7411,13 @@ "question": "Find and list the names of sets which doesn't have Japanese translation but have Korean translation", "evidence": "names of sets refers to name; doesn't have Japanese translation refers to language not like '%Japanese%'; have Korean translation refers to language = 'Korean'", "difficulty": "moderate", - "pred": "SELECT t2.name FROM sets AS t1 INNER JOIN set_translations AS t2 ON t1.setcode = t2.\"setcode\" WHERE t1.\"language\" LIKE '%Japanese%' AND t1.'language' LIKE 'Korean%'", + "pred": "SELECT name FROM sets WHERE language IN ('Japanese', 'Korean')", "gold": "SELECT name FROM sets WHERE code IN (SELECT setcode FROM set_translations WHERE language = 'Korean' AND language NOT LIKE '%Japanese%')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 530, @@ -5835,10 +7425,13 @@ "question": "List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any", "evidence": "frame styles refers to frameVersion; cards Allen Williams worked on refers to artist = 'Allen Williams'; banned cards refers to status = 'Banned'", "difficulty": "moderate", - "pred": "SELECT frameversion, cards FROM cards WHERE artist = 'Allen Williams' AND status = 'Banned'", + "pred": "SELECT t1.frameversion, t1.color FROM cards AS t1 INNER JOIN legalities AS t2 ON t1.uuid = t2.uuid WHERE t2.artist = 'Allen Williams' AND t2.status = 'Banned'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 531, @@ -5846,10 +7439,13 @@ "question": "Which user has a higher reputation, Harlan or Jarrod Dixon", "evidence": "\"Harlan\" and \"Jarrod Dixon\" are both DisplayName; highest reputation refers to Max(Reputation)", "difficulty": "simple", - "pred": "SELECT t2.userdisplayname FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.userid = t2.\"userid\" ORDER BY COUNT(t1.postid) DESC LIMIT 1", + "pred": "SELECT t1.userid FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.userid WHERE t1.displayname IN ('Harlan', 'Jarrod') ORDER BY t2.reputation DESC LIMIT 1", "gold": "SELECT displayname FROM users WHERE displayname IN ('Harlan', 'Jarrod Dixon') AND reputation = (SELECT MAX(reputation) FROM users WHERE displayname IN ('Harlan', 'Jarrod Dixon'))", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 532, @@ -5857,10 +7453,13 @@ "question": "Please list the display names of all the users whose accounts were created in the year 2011", "evidence": "account created in the year 2011 refers to year(CreationDate) = 2011", "difficulty": "simple", - "pred": "SELECT t1.userdisplayname FROM users AS t1 INNER JOIN posthistory AS t2 ON t2.userid = t3.id WHERE STRFTIME('%Y', t4.creationdate) = '2011'", + "pred": "SELECT DISTINCT t1.displayname FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.userid WHERE STRFTIME('%Y', t2.creationdate) = '2011'", "gold": "SELECT displayname FROM users WHERE STRFTIME('%Y', creationdate) = '2011'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 533, @@ -5868,10 +7467,13 @@ "question": "How many users last accessed the website after 2014/9/1", "evidence": "last accessed after 2014/9/1 refers to LastAccessDate > '2014-09-01'", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE lastaccessdate > '2014-09-01'", + "pred": "SELECT COUNT(id) FROM users WHERE lastaccessdate > '2014-09-01'", "gold": "SELECT COUNT(id) FROM users WHERE DATE(lastaccessdate) > '2014-09-01'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 534, @@ -5879,10 +7481,13 @@ "question": "What is the display name of the user who has the most number of views", "evidence": "user who has the most number of view refers to Max(Views)", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users ORDER BY views DESC LIMIT 1", + "pred": "SELECT displayname FROM users ORDER BY views DESC LIMIT 1", "gold": "SELECT displayname FROM users WHERE views = (SELECT MAX(views) FROM users)", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 535, @@ -5890,10 +7495,13 @@ "question": "Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes", "evidence": "more than 100 upvotes refers to Upvotes > 100; more than 1 downvotes refers to Downvotes > 1", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE upvotes > 100 AND downvotes > 1", + "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE upvotes > 100 AND downvotes > 1", "gold": "SELECT COUNT(id) FROM users WHERE upvotes > 100 AND downvotes > 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 536, @@ -5901,10 +7509,13 @@ "question": "How many users with more than 10 views created their account after the year 2013", "evidence": "more than 10 views refers to Views > 10; created after the year 2013 refers to year (CreationDate) > 2013", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE year (year) > 2013 AND views > 10", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid WHERE STRFTIME('%Y', t2.creationdate) > '2013' AND t2.view > 10", "gold": "SELECT COUNT(id) FROM users WHERE STRFTIME('%Y', creationdate) > '2013' AND views > 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 537, @@ -5912,10 +7523,13 @@ "question": "How many posts does the user csgillespie own", "evidence": "\"csgillespie\" is the DisplayName of user", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE userdisplayname = 'csgillespie'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userdisplayname = 'csgillespie'", "gold": "SELECT COUNT(t1.id) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 538, @@ -5923,10 +7537,13 @@ "question": "Please list the titles of the posts owned by the user csgillespie", "evidence": "\"csgillespie\" is the DisplayName of user", "difficulty": "simple", - "pred": "SELECT title FROM users WHERE userdisplayname = 'csgillespie'", + "pred": "SELECT t1.title FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.userdisplayname = 'csgillespie'", "gold": "SELECT t1.title FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 539, @@ -5934,10 +7551,13 @@ "question": "Who is the owner of the post \"Eliciting priors from experts\"", "evidence": "\"Eliciting priors from experts\" is the Title of post; owner refers to DisplayName", "difficulty": "simple", - "pred": "SELECT ownerdisplayname FROM posts WHERE title = 'Eliciting priors from experts'", + "pred": "SELECT t1.ownerdisplayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.title = 'Eliciting priors FROM posts AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t1.title = 'Eliciting priors FROM posts AS t3", "gold": "SELECT t2.displayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.title = 'Eliciting priors from experts'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 540, @@ -5945,10 +7565,13 @@ "question": "What is the title of the post that is owned by csgillespie and has the highest popularity", "evidence": "\"csgillespie\" is the DisplayName of user; highest popularity refers to Max(ViewCount)", "difficulty": "simple", - "pred": "SELECT title FROM posts WHERE userdisplayname = 'csgillespie' ORDER BY viewcount DESC LIMIT 1", + "pred": "SELECT t1.title FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userdisplayname = 'csgillespie' ORDER BY t1.viewcount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 541, @@ -5956,10 +7579,13 @@ "question": "What is the display name of the user who is the owner of the most valuable post", "evidence": "most valuable post refers to Max(FavoriteCount)", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.userdisplayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.\"userid\" = t2.userid ORDER BY t2.\"favoritecount\" DESC LIMIT 1", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id ORDER BY t2.Favoritecount DESC LIMIT 1", "gold": "SELECT t2.displayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id ORDER BY t1.favoritecount DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 542, @@ -5967,10 +7593,13 @@ "question": "What is the total number of comments of all the posts owned by csgillespie", "evidence": "\"csgillespie\" is the DisplayName of user; total number of comments refers to Sum(CommentCount)", "difficulty": "simple", - "pred": "SELECT SUM(t2.commentcount) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t1.\"userdisplayname\" = 'csgillespie'", + "pred": "SELECT SUM(t2.commentscount) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t1.userdisplayname = 'csgillespie'", "gold": "SELECT SUM(t1.commentcount) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 543, @@ -5978,10 +7607,13 @@ "question": "For the post that got the most number of answers owned by csgillespie, how many answers did it get", "evidence": "\"csgillespie\" is the DisplayName of user; the most number of answer refers to Max(AnswerCount)", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t2.\"userdisplayname\" = 'csgillespie' ORDER BY t1.\"answercount\" DESC LIMIT 1", + "pred": "SELECT COUNT(t1.answercount) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userdisplayname = 'csgillespie' GROUP BY t1.userid ORDER BY SUM(t1.answercount) DESC LIMIT 1", "gold": "SELECT MAX(t1.answercount) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 544, @@ -5989,10 +7621,13 @@ "question": "What is the display name of the user who last edited the post \"Examples for teaching: Correlation does not mean causation\"", "evidence": "\"Examples for teaching: Correlation does not mean causation\" is the Title of post; user who last edited refers to LastEditorUserId", "difficulty": "moderate", - "pred": "SELECT userdisplayname FROM users WHERE title = 'Examples for teaching: Correlation does not mean causation'", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t2.title = 'Examples for teaching: Correlation does not mean causation'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 545, @@ -6000,10 +7635,13 @@ "question": "Among the posts owned by csgillespie, how many of them are root posts", "evidence": "\"csgillespie\" is the DisplayName of user; root post refers to ParentId IS Null", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t2.\"userdisplayname\" IS NULL", + "pred": "SELECT COUNT(DISTINCT t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.userdisplayname = 'csgillespie' AND t1.postid IS NULL", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 546, @@ -6011,10 +7649,13 @@ "question": "Please list the display names of all the users who owns a post that is well-finished", "evidence": "the post that is well-finished refers to ClosedDate IS NOT Null", "difficulty": "simple", - "pred": "SELECT displayname FROM users WHERE closeddate IS NULL", + "pred": "SELECT DISTINCT t1.displayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE NOT t2.closeddate IS NULL", "gold": "SELECT t2.displayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE NOT t1.closeddate IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 547, @@ -6022,10 +7663,13 @@ "question": "Among the posts owned by an elder user, how many of them have a score of over 19", "evidence": "elder users refers to Age > 65; Score of over 19 refers to Score > = 20", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM posts WHERE score > 20 AND age > 65", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.age > 65 AND t1.score > 19", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 548, @@ -6033,10 +7677,13 @@ "question": "What is the location of the owner of the post \"Eliciting priors from experts\"", "evidence": "Owner refers to OwnerUserId; 'Eliciting priors from experts' is the Title of post", "difficulty": "simple", - "pred": "SELECT location FROM posts WHERE title = 'Eliciting priors from experts'", + "pred": "SELECT t2.location FROM posts AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t1.title = 'Eliciting priors FROM experts'", "gold": "SELECT t2.location FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.title = 'Eliciting priors from experts'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 549, @@ -6044,10 +7691,13 @@ "question": "From which post is the tag \"bayesian\" excerpted from? Please give the body of the post", "evidence": "\"bayesian\" is the TagName; excerpt from refers to ExcerptPostId", "difficulty": "simple", - "pred": "SELECT body FROM tags WHERE tagname = 'bayesian'", + "pred": "SELECT t1.excerptpostid FROM posts AS t1 INNER JOIN tags AS t2 ON t1.postid = t2.id WHERE t2.tagname = 'bayesian'", "gold": "SELECT t2.body FROM tags AS t1 INNER JOIN posts AS t2 ON t2.id = t1.excerptpostid WHERE t1.tagname = 'bayesian'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 550, @@ -6055,10 +7705,13 @@ "question": "From which post is the most popular tag excerpted from? Please give the body of the post", "evidence": "most popular tag refers to Max(Count); excerpt from refer to ExcerptPostId", "difficulty": "simple", - "pred": "SELECT t2.title FROM tags AS t1 INNER JOIN tags AS T2 ON t1.tagname = t2.\"tagname\" ORDER BY COUNT(t1.count) DESC LIMIT 1", + "pred": "SELECT t2.tagname, t2.weight FROM posts AS t1 INNER JOIN tags AS t2 ON t1.id = t2.postid WHERE t2.excerptpostid = (SELECT MAX(excerptpostid) FROM tags)", "gold": "SELECT body FROM posts WHERE id = (SELECT excerptpostid FROM tags ORDER BY count DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 551, @@ -6066,10 +7719,13 @@ "question": "How many badges has the user csgillespie obtained", "evidence": "\"csgillespie\" is the DisplayName of user", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE userdisplayname = 'csgillespie'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.displayname = 'csgillespie'", "gold": "SELECT COUNT(t1.id) FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 552, @@ -6077,10 +7733,13 @@ "question": "Please list the names of the badges obtained by csgillespie", "evidence": "\"csgillespie\" is the DisplayName of user", "difficulty": "simple", - "pred": "SELECT DISTINCT userdisplayname FROM users WHERE displayname = 'csgillespie'", + "pred": "SELECT t1.name FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.Displayname = 'csgillespie'", "gold": "SELECT t1.\"name\" FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 553, @@ -6088,10 +7747,13 @@ "question": "Among the badges obtained by csgillespie, how many of them were obtained in the year 2011", "evidence": "\"csgillespie\" is the DisplayName of user; obtained in 2011 refers to YEAR (Date) = 2011", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE userdisplayname = 'csgillespie' AND STRFTIME('%Y', date) = '2011'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.userdisplayname = 'csgillespie' AND STRFTIME('%Y', t2.date) = '2011'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 554, @@ -6099,10 +7761,13 @@ "question": "What is the display name of the user who has obtained the most number of badges", "evidence": "who obtained the most number of badges refers to UserID with Max(Count(Id))", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users GROUP BY userid ORDER BY COUNT(userid) DESC LIMIT 1", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id GROUP BY t1.userid ORDER BY COUNT(t2.userid) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 555, @@ -6110,10 +7775,13 @@ "question": "What is the average score of the posts owned by the user csgillespie", "evidence": "\"csgillespie\" is the DisplayName of user; average score refers to AVG(Score)", "difficulty": "simple", - "pred": "SELECT AVG(score) FROM users WHERE userdisplayname = 'csgillespie'", + "pred": "SELECT AVG(t2.score) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid WHERE t1.userdisplayname = 'csgillespie'", "gold": "SELECT AVG(t1.score) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'csgillespie'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 556, @@ -6121,10 +7789,13 @@ "question": "What is the average number of badges obtained by a user with over 200 views", "evidence": "user with over 200 views refers to Views > 200; average number of badges = Divide (Count(Id), Count(DisplayName))", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN views > 200 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id", + "pred": "SELECT CAST(COUNT(t1.userid) AS REAL) / COUNT(DISTINCT t1.Displayname) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.view > 200", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 557, @@ -6132,10 +7803,13 @@ "question": "Among the posts with a score of over 5, what is the percentage of them being owned by an elder user", "evidence": "score of over 5 refers to Score > 5; elder user refers to Age > 65; percentage = Divide (Count(Id where Age>65), Count(Id)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN score > 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM posts WHERE age > 65", + "pred": "SELECT CAST(SUM(CASE WHEN t1.age > 65 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.score > 5", "gold": "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 > 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 558, @@ -6143,10 +7817,13 @@ "question": "How many votes did the user No.58 take on 2010/7/19", "evidence": "user no. 58 refers to UserId = 58; on 2010/7/19 refers to CreationDate = '2010-07-19'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM votes WHERE userid = 58 AND creationdate = '2010-07-19'", + "pred": "SELECT SUM(CASE WHEN t1.creationdate = '2010-07-19' THEN 1 ELSE 0 END) FROM votes AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userid = 58", "gold": "SELECT COUNT(id) FROM votes WHERE userid = 58 AND creationdate = '2010-07-19'", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 559, @@ -6154,10 +7831,13 @@ "question": "Indicate the creation date of the maximum number of votes", "evidence": "the creation date of the maximum number of votes refers to CreationDate where Max(Count(Id))", "difficulty": "simple", - "pred": "SELECT MAX(t1.creationdate) FROM votes AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid GROUP BY t1.\"date\" ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT creationdate FROM votes GROUP BY creationdate ORDER BY COUNT(id) DESC LIMIT 1", "gold": "SELECT creationdate FROM votes GROUP BY creationdate ORDER BY COUNT(id) DESC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 560, @@ -6168,7 +7848,10 @@ "pred": "SELECT COUNT(id) FROM badges WHERE name = 'Revival'", "gold": "SELECT COUNT(id) FROM badges WHERE name = 'Revival'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 561, @@ -6176,10 +7859,13 @@ "question": "What is the title for the post which got the highest score comment", "evidence": "highest score comment refers to Max(comments.Score)", "difficulty": "simple", - "pred": "SELECT title FROM comments WHERE score = (SELECT MAX(score) FROM comments)", + "pred": "SELECT t1.title FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id ORDER BY t2.score DESC LIMIT 1", "gold": "SELECT title FROM posts WHERE id = (SELECT postid FROM comments ORDER BY score DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 562, @@ -6187,10 +7873,13 @@ "question": "For the post which got 1910 view counts, how many comments does it get", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN tags AS t2 ON t1.id = t2.tagtypeid WHERE t3.viewcount = 1910", + "pred": "SELECT COUNT(t2.comments) FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t1.viewcount = 1910", "gold": "SELECT COUNT(t1.id) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.id = t2.postid WHERE t1.viewcount = 1910", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 563, @@ -6198,10 +7887,13 @@ "question": "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", "evidence": "user no. 3025 refers to UserId = '3025'; comment at 20:29:39 on 2014/4/23 refers to CreationDate = '2014/4/23 20:29:39.0'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.userid) FROM comments AS t1 INNER JOIN posthistory AS t2 ON t1.postid = t2.id WHERE t2.\"userid\" = '3025' AND t1.\"creationdate\" = 20:29:39.0", + "pred": "SELECT SUM(t1.commentscount) FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t1.userid = 3025 AND t2.creationdate = '2014-04-23 20:29:39.0'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 564, @@ -6209,10 +7901,13 @@ "question": "Give the only one comment text of the post with parent id 107829", "evidence": "one comment refers to CommentCount = '1'", "difficulty": "simple", - "pred": "SELECT commentcount FROM comments WHERE commentcount = 1 AND parentid = 107829", + "pred": "SELECT text FROM comments WHERE commentcount = 1 AND parentid = 107829", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 565, @@ -6220,10 +7915,13 @@ "question": "User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12, was that post well-finished", "evidence": "user no. 23853 refers to UserId = '23853'; at 9:08:18 on 2013/7/12 refers to CreationDate = '2013-07-12 09:08:18.0'; not well-finished refers to ClosedDate IS NULL and vice versa", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.comment FROM comments AS t1 INNER JOIN posthistory AS t2 ON t1.postid = t2.\"postid\" WHERE t1.\"createddate\" = '2013-07-12 09:08:18.0' AND t1\"userid = 23853", + "pred": "SELECT CASE WHEN t2.closeddate IS NULL THEN 'Yes' ELSE 'NO' END FROM posts AS t1 INNER JOIN comments AS t2 ON t1.id = t2.postid WHERE t1.userid = 23853", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 566, @@ -6231,10 +7929,13 @@ "question": "For the owner user of post No. 65041, what is his/her reputation points", "evidence": "post no. 65041 refers to Id = '65041'; reputation point refers to Reputation", "difficulty": "simple", - "pred": "SELECT reputation FROM users WHERE id = 65041", + "pred": "SELECT t2.reputation FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.id = 65041", "gold": "SELECT t1.reputation FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid WHERE t2.id = 65041", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 567, @@ -6242,10 +7943,13 @@ "question": "For the user with the display name of \"Tiago Pasqualini\", how many posts did he/she own", "evidence": "\"Tiago Pasqualini\" is the DisplayName;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE displayname = 'Tiago Pasqualini'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.Displayname = 'Tiago Pasqualini'", "gold": "SELECT COUNT(t1.id) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid WHERE t1.displayname = 'Tiago Pasqualini'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 568, @@ -6253,10 +7957,13 @@ "question": "Provide the display name of the user who made the vote No.6347", "evidence": "vote no. 6347 refers to Id = '6347'", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users WHERE id = 6347", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id WHERE t2.id = 6347", "gold": "SELECT t1.displayname FROM users AS t1 INNER JOIN votes AS t2 ON t1.id = t2.userid WHERE t2.id = 6347", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 569, @@ -6264,10 +7971,13 @@ "question": "Give the number of votes for the post about data visualization", "evidence": "About data visualization is the Title that contains 'data visualization';", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t2.postid) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.id = t2.\"postid\" WHERE t1.\"title\" = 'data visualization'", + "pred": "SELECT SUM(t2.votes) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.postid = t2.id WHERE t1.title LIKE '%Data visualization%'", "gold": "SELECT COUNT(t1.id) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.id = t2.postid WHERE t1.title LIKE '%data visualization%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 570, @@ -6275,10 +7985,13 @@ "question": "For the user whose display name is \"DatEpicCoderGuyWhoPrograms\", what is his/her badge's name", "evidence": "\"DatEpicCoderGuyWhoPrograms\" is the DisplayName;", "difficulty": "simple", - "pred": "SELECT DISTINCT userdisplayname FROM users WHERE displayname = 'DatEpicCoderGuyWhoPrograms'", + "pred": "SELECT t1.color FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.Displayname = 'DatEpicCoderGuyWhoPrograms'", "gold": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'DatEpicCoderGuyWhoPrograms'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 571, @@ -6286,10 +7999,13 @@ "question": "For the user No.24, how many times is the number of his/her posts compared to his/her votes", "evidence": "user no. 24 refers to UserId = OwnerUserId = '24'; times of his/her post than votes = Divide (Count(post.Id), Count(votes.Id))", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.postid) FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id WHERE t1.\"userid\" = 24", + "pred": "SELECT COUNT(DISTINCT t1.postid) - COUNT(DISTINCT t1.votes) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.postid = t2.id WHERE t1.userid = 24", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 572, @@ -6297,10 +8013,13 @@ "question": "How many views did the post titled 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer' get", "evidence": "\"Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer\" is the Title of post; views refers to ViewCount", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM posts WHERE title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'", + "pred": "SELECT SUM(t1.viewcount) FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE t1.title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'", "gold": "SELECT viewcount FROM posts WHERE title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 573, @@ -6311,7 +8030,10 @@ "pred": "SELECT text FROM comments WHERE score = 17", "gold": "SELECT text FROM comments WHERE score = 17", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 574, @@ -6319,10 +8041,13 @@ "question": "Which user has the website URL listed at 'http://stackoverflow.com'", "evidence": "\"http://stackoverflow.com\" is the WebsiteUrl; user refers to DisplayName", "difficulty": "simple", - "pred": "SELECT userid FROM users WHERE websiteurl = 'http://stackoverflow.com'", + "pred": "SELECT DISTINCT t1.userid FROM users AS t1 INNER JOIN websiteurl AS t2 ON t1.id = t2.siteurl WHERE t2.homepageurl = 'http://stackoverflow.com'", "gold": "SELECT displayname FROM users WHERE websiteurl = 'http://stackoverflow.com'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 575, @@ -6330,10 +8055,13 @@ "question": "What is the badge name that user 'SilentGhost' obtained", "evidence": "\"SilentGhost\" is the DisplayName of user;", "difficulty": "simple", - "pred": "SELECT DISTINCT userdisplayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t3.userdisplayname = 'SilentGhost'", + "pred": "SELECT DISTINCT t1.name FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userid = 'SilentGhost'", "gold": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'SilentGhost'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 576, @@ -6341,10 +8069,13 @@ "question": "Name the user that commented 'thank you user93!'", "evidence": "\"thank you user93\" is the Text of comment; user refers to DisplayName", "difficulty": "simple", - "pred": "SELECT userid FROM users WHERE comment = 'thank you user93!'", + "pred": "SELECT t1.userid FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t2.text = 'thank you user93!'", "gold": "SELECT t1.displayname FROM users AS t1 INNER JOIN comments AS t2 ON t1.id = t2.userid WHERE t2.text = 'thank you user93!'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 577, @@ -6352,10 +8083,13 @@ "question": "Write all comments made by user 'A Lion.'", "evidence": "\"A Lion\" is the DisplayName of user; comment refers to Text", "difficulty": "simple", - "pred": "SELECT comment FROM users WHERE userdisplayname = 'A Lion'", + "pred": "SELECT text FROM comments WHERE userid = (SELECT userid FROM users WHERE displayname = 'A Lion')", "gold": "SELECT t2.text FROM users AS t1 INNER JOIN comments AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'A Lion'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 578, @@ -6363,10 +8097,13 @@ "question": "Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user", "evidence": "\"Understanding what Dassault iSight is doing?\" is the Title of post; user refers to DisplayName;", "difficulty": "moderate", - "pred": "SELECT t2.userdisplayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"title\" = 'Understanding what Dassault iSight is doing?'", + "pred": "SELECT t1.firstname, t1.lastname, t2. reputation FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t2.title = 'Understanding what Dassault iSight is doing?'", "gold": "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?'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 579, @@ -6374,10 +8111,13 @@ "question": "Write all comments made on the post titled 'How does gentle boosting differ from AdaBoost?'", "evidence": "\"How does gentle boosting differ from AdaBoost?\" is the Title of post; comments refers to Text", "difficulty": "simple", - "pred": "SELECT comment FROM comments WHERE title = 'How does gentle boosting differ from AdaBoost?'", + "pred": "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?'", "gold": "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?'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 580, @@ -6385,10 +8125,13 @@ "question": "Name 10 users with the badge name 'Necromancer.'", "evidence": "\"Necromancer\" is the Name of badge; users refers to DisplayName", "difficulty": "simple", - "pred": "SELECT userid FROM users WHERE name = 'Necromancer'", + "pred": "SELECT t1.userid FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Necromancer' LIMIT 10", "gold": "SELECT t1.displayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t2.name = 'Necromancer' LIMIT 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 581, @@ -6396,10 +8139,13 @@ "question": "Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'", "evidence": "'Open source tools for visualizing multi-dimensional data' is the Title of Post; editor refers to DisplayName;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.displayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.id = t2.\"userid\" WHERE t1.\"title\" = 'Open source tools for visualizing multi-dimensional data'", + "pred": "SELECT t2.displayname FROM posts AS t1 INNER JOIN editors AS t2 ON t1.postid = t2.id WHERE t1.title = 'Open source tools for visualizing multi-dimensional data'", "gold": "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?'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 582, @@ -6407,10 +8153,13 @@ "question": "List the title of posts which were edited by Vebjorn Ljosa", "evidence": "\"Vebjorn Ljosa\" is the DisplayName; last edited refers to LastEditorUserId", "difficulty": "simple", - "pred": "SELECT title FROM posts WHERE userdisplayname = 'Vebjorn Ljosa'", + "pred": "SELECT title FROM posts WHERE displayname = 'Vebjorn Ljosa'", "gold": "SELECT t1.title FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t2.displayname = 'Vebjorn Ljosa'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 583, @@ -6418,10 +8167,13 @@ "question": "What is the total score of the posts edited by Yevgeny and include the user's website URL", "evidence": "\"Yevgeny\" is the DisplayName; edited refers to LastEditorUserId", "difficulty": "simple", - "pred": "SELECT SUM(score) FROM posts WHERE userdisplayname = 'Yevgeny'", + "pred": "SELECT SUM(t2.score), t1.siteurl FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid WHERE t1.userdisplayname = 'Yevgeny'", "gold": "SELECT SUM(t1.score), t2.websiteurl FROM posts AS t1 INNER JOIN users AS t2 ON t1.lasteditoruserid = t2.id WHERE t2.displayname = 'Yevgeny' GROUP BY t2.websiteurl", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 584, @@ -6429,10 +8181,13 @@ "question": "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?'", "evidence": "\"Why square the difference instead of taking the absolute value in standard deviation?\" is the Title of post;", "difficulty": "moderate", - "pred": "SELECT comment FROM users WHERE title = 'Why square the difference instead of taking the absolute value in standard deviation?'", + "pred": "SELECT t2.comments FROM posts AS t1 INNER JOIN comments AS t2 ON t1.id = t2.postid WHERE t1.title = 'Why square the difference instead of taking the absolute value in standard deviation?'", "gold": "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?'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 585, @@ -6440,10 +8195,13 @@ "question": "How much is the total bounty amount of the post titled about 'data'", "evidence": "About data means the title contains 'data'; total bounty Amount refers to Sum(BountyAmount)", "difficulty": "simple", - "pred": "SELECT SUM(t2.bountyamount) FROM posts AS t1 INNER JOIN tags AS t2 ON t1.postid = t2.id WHERE t1.\"title\" = 'data' ORDER BY t2.\"bounty amount\" DESC LIMIT 1", + "pred": "SELECT SUM(t1.bountyamount) FROM posts AS t1 INNER JOIN tags AS t2 ON t1.postid = t2.id WHERE t2.title LIKE '%data%'", "gold": "SELECT SUM(t2.bountyamount) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.id = t2.postid WHERE t1.title LIKE '%data%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 586, @@ -6451,10 +8209,13 @@ "question": "Which user added a bounty amount of 50 to the post title mentioning variance", "evidence": "bounty amount of 50 refers to BountyAmount = 50; user refers to DisplayName; title mentioning variance refers to Title include 'variance'", "difficulty": "challenging", - "pred": "SELECT userid FROM users WHERE title = 'variance' AND bountyamount = 50", + "pred": "SELECT t1.userid FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid WHERE t2.title = 'variance' AND t2.bountyamount = 50", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 587, @@ -6462,10 +8223,13 @@ "question": "Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post", "evidence": "tagged as 'humor' refers to tag = ''; comment of the post refers to Text; average view count = AVG(ViewCount)", "difficulty": "moderate", - "pred": "SELECT AVG(t1.viewcount) FROM tags AS t1 INNER JOIN posts AS t2 ON t1.tagname = t2.tagid WHERE t2.\"tag\" = ''", + "pred": "SELECT AVG(t1.viewcount), t1.title, t1.text FROM posts AS t1 INNER JOIN tags AS t2 ON t1.postid = t2.id WHERE t2.tag LIKE '%humor%'", "gold": "SELECT AVG(t2.viewcount), t2.title, t1.text FROM comments AS t1 INNER JOIN posts AS t2 ON t2.id = t1.postid WHERE t2.tags = '' GROUP BY t2.title, t1.text", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 588, @@ -6473,10 +8237,13 @@ "question": "Give the total number of comments posted by user ID 13", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t2.postid) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t1.\"userid\" = 13", + "pred": "SELECT COUNT(t2.comments) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t1.userid = 13", "gold": "SELECT COUNT(id) FROM comments WHERE userid = 13", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 589, @@ -6484,10 +8251,13 @@ "question": "Which user ID has the highest reputation", "evidence": "highest reputation refers to Max(Reputation)", "difficulty": "simple", - "pred": "SELECT userid FROM users ORDER BY reputation DESC LIMIT 1", + "pred": "SELECT userid FROM users WHERE reputation = (SELECT MAX(Reputation) FROM users)", "gold": "SELECT id FROM users WHERE reputation = (SELECT MAX(reputation) FROM users)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 590, @@ -6495,10 +8265,13 @@ "question": "Which user ID has the lowest view", "evidence": "lowest views refers to Min(Views)", "difficulty": "simple", - "pred": "SELECT userid FROM users ORDER BY viewcount DESC LIMIT 1", + "pred": "SELECT userid FROM users ORDER BY views ASC LIMIT 1", "gold": "SELECT id FROM users WHERE views = (SELECT MIN(views) FROM users)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 591, @@ -6506,10 +8279,13 @@ "question": "How many users are awarded with supporter badge during year 2011", "evidence": "\"Supporter\" is the Name of badge; in year 2011 refers to year(Date) = 2011", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE name = 'Supporter' AND date = '2011'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Supporter' AND STRFTIME('%Y', t1.date) = '2011'", "gold": "SELECT COUNT(id) FROM badges WHERE STRFTIME('%Y', date) = '2011' AND name = 'Supporter'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 592, @@ -6517,10 +8293,13 @@ "question": "How many users are awarded with more than 5 badges", "evidence": "more than 5 badges refers to Count (Name) > 5; user refers to UserId", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE count (name) > 5", + "pred": "SELECT COUNT(userid) FROM badges GROUP BY userid HAVING COUNT(name) > 5", "gold": "SELECT COUNT(userid) FROM (SELECT userid, COUNT(name) AS num FROM badges GROUP BY userid) AS t WHERE t.num > 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 593, @@ -6528,10 +8307,13 @@ "question": "How many users from New York have a teacher and supporter badge", "evidence": "\"Supporter\" and \"Teachers\" are both Name of badge; 'New York' is the Location; user refers to UserId", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE name = 'Supporter' AND location = 'New York'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Teacher' AND t1.location = 'New York'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 594, @@ -6539,10 +8321,13 @@ "question": "Which user created post ID 1 and what is the reputation of this user", "evidence": "", "difficulty": "simple", - "pred": "SELECT userid, reputation FROM users WHERE postid = 1", + "pred": "SELECT t1.firstname, t1.lastname, t2. reputation FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t2.postid = 1", "gold": "SELECT t2.id, t2.reputation FROM comments AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.postid = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 595, @@ -6550,10 +8335,13 @@ "question": "Which user have only one post history per post and having at least 1000 views", "evidence": "having at least 1000 view refers to Views > = 1000; user refers to UserId", "difficulty": "moderate", - "pred": "SELECT userid FROM users WHERE views > 1000", + "pred": "SELECT userid FROM posts WHERE views > 1000 GROUP BY userid ORDER BY COUNT(postid) LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 596, @@ -6561,10 +8349,13 @@ "question": "Which users have posted the most comments. List out the user's badge", "evidence": "user with the most comments refers to UserId where Max(Count(Id)", "difficulty": "simple", - "pred": "SELECT userid FROM users GROUP BY userid ORDER BY COUNT(userid) DESC LIMIT 1", + "pred": "SELECT t1.userid, t2.grip FROM comments AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id GROUP BY t1.userid ORDER BY COUNT(t1.userid) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 597, @@ -6572,10 +8363,13 @@ "question": "How many users from India have the teacher badges", "evidence": "\"India\" is the Location; \"Teacher\" is the Name of badge", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE location = 'India' AND name = 'Teacher'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Teacher' AND t1.location = 'India'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 598, @@ -6583,10 +8377,13 @@ "question": "What is the percentage difference of student badges given during 2010 and 2011", "evidence": "student badges refers to badge's name = 'Student'; during 2010 refers to Year(Date) = 2010; during 2011 refers to Year(Date) = 2011; percentage difference = Subtract (Divide(Count(Name where Year(Date) = 2010), Count (Name)) *100, Divide(Count(Name where Year(Date) = 2011), Count(Name)) * 100)", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.name = 'Student' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.name) FROM badges AS t1 INNER JOIN events AS t2 ON t1.id = t2.\"id\" WHERE t1.\"year\" = 2010 AND t1\".date\" = 2011", + "pred": "SELECT CAST(SUM(CASE WHEN name = 'Student' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN name = 'Student' THEN 1 ELSE 0 END) FROM badges", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 599, @@ -6594,10 +8391,13 @@ "question": "What are the post history type IDs for post ID 3720 and how many unique users have commented on the post", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.posthistorytypeid, COUNT(t1.userid) FROM posts AS t1 INNER JOIN comments AS t2 ON t2.postid = t3.id WHERE t3.\"postid\" = 3720", + "pred": "SELECT DISTINCT posthistorytypeid, COUNT(DISTINCT userid) FROM posts WHERE postid = 3720", "gold": "SELECT t1.posthistorytypeid, (SELECT COUNT(DISTINCT userid) FROM comments WHERE postid = 3720) AS numberofusers FROM posthistory AS t1 WHERE t1.postid = 3720", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 600, @@ -6605,10 +8405,13 @@ "question": "List out all post that are related to post ID 61217 and what is the popularity of this post", "evidence": "post related refers to RelatedPostId; popularity refers to ViewCount", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.postid, t2.viewcount FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.\"id\" = t2.\"postid\" WHERE t1\"id = 61217", + "pred": "SELECT t1.id, t2.viewcount FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE t2.id = 61217", "gold": "SELECT t1.viewcount FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE t2.postid = 61217", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 601, @@ -6619,7 +8422,10 @@ "pred": "SELECT score, linktypeid FROM posts WHERE postid = 395", "gold": "SELECT t1.score, t2.linktypeid FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE t2.postid = 395", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 602, @@ -6627,10 +8433,13 @@ "question": "List out all post ID with score more than 60 and list out all the user ID that created these post", "evidence": "score more than 60 refers to Score > 60", "difficulty": "simple", - "pred": "SELECT DISTINCT userid FROM posts WHERE score > 60", + "pred": "SELECT DISTINCT postid, userid FROM posts WHERE score > 60", "gold": "SELECT postid, userid FROM posthistory WHERE postid IN (SELECT id FROM posts WHERE score > 60)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 603, @@ -6638,10 +8447,13 @@ "question": "What is the sum of favourite count gained by user ID 686 in 2011", "evidence": "in 2011 refers to year (CreatinDate) = 2011", "difficulty": "simple", - "pred": "SELECT COUNT(t1.videcount) FROM users AS t1 INNER JOIN tags AS t2 ON t1.userid = t2.id WHERE t2.\"userid\" = 686 AND t1.\"creatindate\" = 2011", + "pred": "SELECT SUM(t1.overlovedercount) FROM tags AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userid = 686 AND STRFTIME('%Y', t1.creationdate) = '2011'", "gold": "SELECT SUM(DISTINCT favoritecount) FROM posts WHERE id IN (SELECT postid FROM posthistory WHERE userid = 686 AND STRFTIME('%Y', creationdate) = '2011')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 604, @@ -6649,10 +8461,13 @@ "question": "What is the average of the up votes and the average user age for users creating more than 10 posts", "evidence": "creating more than 10 post refers to Count (UserId) > 10; average of the up votes = Divide (Sum(UpVotes), Count (UserId)); average age = Divide (Sum(Age), Count(UserId))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.upvotes > 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM votes AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.\"postid\" WHERE t1.\"upvotes\" > 10", + "pred": "SELECT AVG(t2.upvotes), AVG(t2.age) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id GROUP BY t1.userid HAVING COUNT(t1.postid) > 10", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 605, @@ -6660,10 +8475,13 @@ "question": "How many users obtained the \"Announcer\" badge", "evidence": "\"Announcer\" is the Name of badge; user refers to UserId", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE name = 'Announcer'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Announcer'", "gold": "SELECT COUNT(id) FROM badges WHERE name = 'Announcer'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 606, @@ -6674,7 +8492,10 @@ "pred": "SELECT name FROM badges WHERE date = '2010-07-19 19:39:08.0'", "gold": "SELECT name FROM badges WHERE date = '2010-07-19 19:39:08.0'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 607, @@ -6682,10 +8503,13 @@ "question": "How many positive comments are there on the list", "evidence": "Positive comment refers to score > 60", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM comments WHERE score > 60", + "pred": "SELECT COUNT(comments) FROM comments WHERE score > 60", "gold": "SELECT COUNT(id) FROM comments WHERE score > 60", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 608, @@ -6696,7 +8520,10 @@ "pred": "SELECT text FROM comments WHERE creationdate = '2010-07-19 19:16:14.0'", "gold": "SELECT text FROM comments WHERE creationdate = '2010-07-19 19:16:14.0'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 609, @@ -6707,7 +8534,10 @@ "pred": "SELECT COUNT(postid) FROM posts WHERE score = 10", "gold": "SELECT COUNT(id) FROM posts WHERE score = 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 610, @@ -6715,10 +8545,13 @@ "question": "What are the name of badge that users who have the highest reputation obtained", "evidence": "highest reputation refers to Max(Reputation); user refers to UserId", "difficulty": "simple", - "pred": "SELECT name FROM users WHERE userid = (SELECT MAX(userid) FROM users) ORDER BY reputation DESC LIMIT 1)", + "pred": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.revisionguid = (SELECT MAX(revisionguid) FROM users)", "gold": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid ORDER BY t1.reputation DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 611, @@ -6726,10 +8559,13 @@ "question": "Mention the reputation of users who had obtained the badge on 7/19/2010 7:39:08 PM", "evidence": "on 7/19/2010 7:39:08 PM refers to Date = '2010-07-19 19:39:08.0'", "difficulty": "simple", - "pred": "SELECT t2.reputation FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"date\" = '2010-07-19 19:39:08.0'", + "pred": "SELECT t1.reputation FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.date = '2010-07-19 19:39:08.0'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 612, @@ -6737,10 +8573,13 @@ "question": "What is the name of badge that the user whose display name is \"Pierre\" obtained", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.userdisplayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"displayname\" = 'Pierre'", + "pred": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.displayname = 'Pierre'", "gold": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'Pierre'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 613, @@ -6748,10 +8587,13 @@ "question": "List out the dates that users who are located in Rochester, NY obtained their badges", "evidence": "\"Rochester, NY\" is the Location of user; user refers to UserId", "difficulty": "simple", - "pred": "SELECT date FROM users WHERE location = 'Rochester, NY'", + "pred": "SELECT t2.date FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.location = 'Rochester, NY'", "gold": "SELECT t2.date FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.location = 'Rochester, NY'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 614, @@ -6759,10 +8601,13 @@ "question": "Among the users who obtained the \"Teacher\" badge, calculate their percentage of users", "evidence": "\"Teacher\" is the Name of badge; percentage = Divide (Count(UserId where it's \"Teacher\"), Count(UserId)) * 100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN name = 'Teacher' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.id WHERE t3.name = 'teacher'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.name = 'Teacher' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 615, @@ -6770,10 +8615,13 @@ "question": "Among the users who obtained the \"Organizer\" badges, calculate the percentage of users who are teenagers", "evidence": "\"Organizer\" is the Name of badge; teenager refers to Age BETWEEN 13 AND 18; percentage = Divide (Count(UserId where Age BETWEEN 13 AND 18), Count(UserId)) *100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN age BETWEEN 13 AND 18 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.\"name\" = 'Organizer'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.age BETWEEN 13 AND 18 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Organizer'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 616, @@ -6781,10 +8629,13 @@ "question": "What is the comment's rating score of the post which was created on 7/19/2010 7:19:56 PM", "evidence": "created on 7/19/2010 7:19:56 PM refers to CreationDate = '2010-07-19 19:19:56.0'", "difficulty": "simple", - "pred": "SELECT t2.score FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.\"postid\" WHERE t1.\"creationdate\" = '2010-07-19 19:19:56.0'", + "pred": "SELECT t2.score FROM posthistory AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.creationdate = '2010-07-19 19:19:56.0'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 617, @@ -6792,10 +8643,13 @@ "question": "What is the detailed content of the comment of the post which was created on 7/19/2010 7:37:33 PM", "evidence": "detailed content of the comment refers to Text; created on 7/19/2010 7:37:33 PM CreationDate = 2010-07-19 19:37:33.0'", "difficulty": "simple", - "pred": "SELECT t2.text FROM comments AS t1 INNER JOIN posthistory AS t2 ON t1.postid = t2.\"postid\" WHERE t1.\"created on 7/19/2010 7:37:33 PM Creationdate = 2010-07-19 19:38:33.0'", + "pred": "SELECT text FROM comments WHERE creationdate = '2010-07-19 19:37:33.0'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 618, @@ -6803,10 +8657,13 @@ "question": "List out the age of users who located in Vienna, Austria obtained the badge", "evidence": "\"Vienna, Austria\" is the Location", "difficulty": "simple", - "pred": "SELECT age FROM users WHERE location = 'Vienna, Austria'", + "pred": "SELECT t1.age FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.location = 'Vienna, Austria'", "gold": "SELECT t1.age FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.location = 'Vienna, Austria'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 619, @@ -6814,10 +8671,13 @@ "question": "How many adults who obtained the badge Supporter", "evidence": "Supporter is the Name of badge; adult refers to Age BETWEEN 19 AND 65", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM badges WHERE name = 'Supporter' AND age BETWEEN 19 AND 65", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Supporter' AND t1.age >= 19 AND t1.age <= 65", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 620, @@ -6825,10 +8685,13 @@ "question": "State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM", "evidence": "on 7/19/2010 7:39:08 PM refers to Date = '2010-07-19 19:39:08.0'", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE date = '2010-07-19 19:39:08.0'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.date = '2010-07-19 19:39:08.0'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 621, @@ -6836,10 +8699,13 @@ "question": "What are the name of badges that users who have the lowest reputation obtained", "evidence": "lowest reputation refers to Min(Reputation); user refers to UserId", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.userid FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.\"userid\" ORDER BY t1.\"reputation\" DESC LIMIT 1", + "pred": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.revisionguid = (SELECT MIN(revisionguid) FROM users)", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 622, @@ -6847,10 +8713,13 @@ "question": "State the name of badge that the user whose display name is \"Sharpie\" obtained", "evidence": "\"Sharpie\" is the DisplayName of user; user refers to UserId", "difficulty": "simple", - "pred": "SELECT DISTINCT userdisplayname FROM users WHERE displayname = 'Sharpie'", + "pred": "SELECT t1.name FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.Displayname = 'Sharpie'", "gold": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'Sharpie'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 623, @@ -6858,10 +8727,13 @@ "question": "How many elders obtained the \"Supporter\" badge", "evidence": "\"Supporter\" is the Name of badge;  elders refers to Age > 65", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM badges WHERE name = 'Supporter' AND age > 65", + "pred": "SELECT COUNT(id) FROM badges WHERE name = 'Supporter' AND age > 65", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 624, @@ -6869,10 +8741,13 @@ "question": "What is the name of user with the ID of 30", "evidence": "name of user refers to DisplayName;", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users WHERE userid = 30", + "pred": "SELECT displayname FROM users WHERE id = 30", "gold": "SELECT displayname FROM users WHERE id = 30", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 625, @@ -6880,10 +8755,13 @@ "question": "How many users were from New York", "evidence": "New York refers to Location;", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE location = 'New York'", + "pred": "SELECT COUNT(id) FROM users WHERE location = 'New York City'", "gold": "SELECT COUNT(id) FROM users WHERE location = 'New York'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 626, @@ -6891,10 +8769,13 @@ "question": "How many votes were made in 2010", "evidence": "YEAR(CreationDate) = 2010;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM votes WHERE STRFTIME('%Y', creaiondate) = '2010'", + "pred": "SELECT COUNT(id) FROM votes WHERE STRFTIME('%Y', creationdate) = '2010'", "gold": "SELECT COUNT(id) FROM votes WHERE STRFTIME('%Y', creationdate) = '2010'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 627, @@ -6905,7 +8786,10 @@ "pred": "SELECT COUNT(userid) FROM users WHERE age BETWEEN 19 AND 65", "gold": "SELECT COUNT(id) FROM users WHERE age BETWEEN 19 AND 65", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 628, @@ -6913,10 +8797,13 @@ "question": "Which users have the highest number of views", "evidence": "users have the highest number of views refer to DisplayName where MAX(Views);", "difficulty": "simple", - "pred": "SELECT userid FROM users ORDER BY views DESC LIMIT 1", + "pred": "SELECT userid FROM users GROUP BY userid ORDER BY COUNT(view) DESC LIMIT 1", "gold": "SELECT id, displayname FROM users WHERE views = (SELECT MAX(views) FROM users)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 629, @@ -6924,10 +8811,13 @@ "question": "Calculate the ratio of votes in 2010 and 2011", "evidence": "DIVIDE(COUNT(Id where YEAR(CreationDate) = 2010), COUNT(Id where YEAR(CreationDate) = 2011)) FROM votes;", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', votedate) = '2010' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM votes", + "pred": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', creationdate) = '2010' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN STRFTIME('%Y', creationdate) = '2011' THEN 1 ELSE 0 END) FROM votes", "gold": "SELECT CAST(SUM(IIF(STRFTIME('%Y', creationdate) = '2010', 1, 0)) AS REAL) / SUM(IIF(STRFTIME('%Y', creationdate) = '2011', 1, 0)) FROM votes", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 630, @@ -6935,10 +8825,13 @@ "question": "What is the name of tags used by John Salvatier's", "evidence": "DisplayName = 'John Salvatier';", "difficulty": "simple", - "pred": "SELECT tags FROM tags WHERE displayname = 'John Salvatier'", + "pred": "SELECT t2.tagname FROM users AS t1 INNER JOIN tags AS t2 ON t1.id = t2.userid WHERE t1.firstname = 'John' AND t1.lastname = 'Salvatier'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 631, @@ -6946,10 +8839,13 @@ "question": "How many posts were created by Daniel Vassallo", "evidence": "DisplayName = 'Daniel Vassallo';", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM users WHERE displayname = 'Daniel Vassallo'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.postid = t2.id WHERE t2.firstname = 'Daniel' AND t2.lastname = 'Vassallo'", "gold": "SELECT COUNT(t1.id) FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'Daniel Vassallo'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 632, @@ -6957,10 +8853,13 @@ "question": "How many votes were made by Harlan", "evidence": "DisplayName = 'Harlan';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM votes WHERE displayname = 'Harlan'", + "pred": "SELECT SUM(CASE WHEN t1.Displayname = 'Harlan' THEN 1 ELSE 0 END) FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 633, @@ -6968,10 +8867,13 @@ "question": "Which post by slashnick has the most answers count? State the post ID", "evidence": "most answers count refers to MAX(AnswerCount); post by slashnick refers to DisplayName = 'slashnick';", "difficulty": "moderate", - "pred": "SELECT postid FROM posts WHERE displayname = 'slashnick' ORDER BY answercount DESC LIMIT 1", + "pred": "SELECT postid FROM posts WHERE displayname ='slashnick' ORDER BY answercount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 634, @@ -6979,10 +8881,13 @@ "question": "Among posts by Harvey Motulsky and Noah Snyder, which one has higher popularity", "evidence": "Has higher popularity means the post has higher view count ; calculation = MAX(SUM(ViewCount)) where DisplayName = 'Harvey Motulsky' OR DisplayName = 'Noah Snyder';", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.postname FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"displayname\" = 'Harvey Motulsky' AND t3.displayname = 'Noah Snyder'", + "pred": "SELECT t1.postname FROM posts AS t1 INNER JOIN users AS t2 ON t1.postid = t2.id WHERE t2.firstname = 'Harvey' AND t2.lastname = 'Noah' AND t1.viewcount > 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 635, @@ -6990,10 +8895,13 @@ "question": "How many posts by Matt Parker have more than 4 votes", "evidence": "more than 4 votes refer to PostId > 4; DisplayName = 'Matt Parker';", "difficulty": "moderate", - "pred": "SELECT COUNT(postid) FROM posts WHERE postid > 4 AND displayname = 'Matt Parker'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.postid = t2.id WHERE t2.firstname = 'Matt' AND t2.lastname = 'Parker' AND t1.postid > 4", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 636, @@ -7001,10 +8909,13 @@ "question": "How many negative comments did Neil McGuigan get in his posts", "evidence": "Negative comment refers to score < 60; DisplayName = 'Neil McGuigan';", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM comments AS t1 INNER JOIN posts AS t2 ON t1.id = t2.id WHERE t2.\"score\" < 60 AND t1.\"displayname\" = 'Neil McGuigan'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.score < 60 AND t2.userdisplayname = 'Neil McGuigan'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 637, @@ -7012,10 +8923,13 @@ "question": "State all the tags used by Mark Meckes in his posts that doesn't have comments", "evidence": "used by Mark Meckes refers to DisplayName = 'Mark Meckes'; Doen't have comments refers to CommentCount = 0;", "difficulty": "moderate", - "pred": "SELECT tags FROM tags WHERE commentcount = 0 AND userdisplayname = 'Mark Meckes'", + "pred": "SELECT DISTINCT t2.tagname FROM users AS t1 INNER JOIN tags AS t2 ON t1.userid = t2.id WHERE t1.userdisplayname = 'Mark Meckes' AND t2.commentcount = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 638, @@ -7023,10 +8937,13 @@ "question": "List all the name of users that obtained the Organizer Badges", "evidence": "name of users refers to DisplayName; the Organizer Badges refer to badges where Name = 'Organizer';", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users WHERE name = 'Organizer'", + "pred": "SELECT t1.userid FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Organizer'", "gold": "SELECT t1.displayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t2.\"name\" = 'Organizer'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 639, @@ -7034,10 +8951,13 @@ "question": "Based on posts posted by Community, calculate the percentage of posts that use the R language", "evidence": "DIVIDE(COUNT(PostId WHERE TagName = 'r')), (COUNT(PostId WHERE DisplayName = 'Community')) as percentage; R language refers to tagname = 'r'", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN tagname = 'r' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.postid) FROM tags AS t1 INNER JOIN posts AS t2 ON t1.id = t2.tagid WHERE t1.\"tagname\" = 'Community'", + "pred": "SELECT CAST(COUNT(CASE WHEN t2.tagname = 'r' THEN t1.postid ELSE NULL END) AS REAL) * 100 / COUNT(t1.postid) FROM posts AS t1 INNER JOIN tags AS t2 ON t1.id = t2.postid WHERE t1. Displayname = 'Community'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 640, @@ -7045,10 +8965,13 @@ "question": "Calculate the difference in view count from post posted by Mornington and view count from posts posted by Amos", "evidence": "calculation = SUBTRACT(SUM(ViewCount where DisplayName = 'Mornington'), SUM(ViewCount where DisplayName = 'Amos'));", "difficulty": "moderate", - "pred": "SELECT SUM(t2.viewcount) FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.postid = t2.id WHERE t1.\"displayname\" = 'Mornington'", + "pred": "SELECT SUM(CASE WHEN t1.Displayname = 'Mornington' THEN 1 ELSE 0 END) - SUM(CASE WHEN t1.Displayname = 'Amos' THEN 1 ELSE 0 END) FROM posts AS t1 INNER JOIN users AS t2 ON t1.postid = t2.id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 641, @@ -7056,10 +8979,13 @@ "question": "How many users received commentator badges in 2014", "evidence": "Commentator is the name of the badge; year(Date) = 2014;", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE name = 'commentator' AND date = '2014'", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id INNER JOIN badges AS t3 ON t2.userid = t3.id WHERE t3.name = 'commentator' AND STRFTIME('%Y', t2.date) = '2014'", "gold": "SELECT COUNT(id) FROM badges WHERE name = 'Commentator' AND STRFTIME('%Y', date) = '2014'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 1.0, + "table_f1": 0.5 }, { "idx": 642, @@ -7067,10 +8993,13 @@ "question": "How many posts were created on 21st July, 2010", "evidence": "created on 21st July, 2010 refers to CreationDate BETWEEN '2010-07-21 00:00:00' and '2012-07-21 23:59:59';", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM posts WHERE creationdate BETWEEN '2010-07-21 00:00:00' AND '2012-06-21 23:59:59'", + "pred": "SELECT COUNT(postid) FROM posthistory WHERE creationdate BETWEEN '2010-07-21 00:00:00' AND '2012-07-21 23:59:59'", "gold": "SELECT COUNT(id) FROM posthistory WHERE DATE(creationdate) = '2010-07-21'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 643, @@ -7078,10 +9007,13 @@ "question": "What are the display names and ages of user who got the highest in views", "evidence": "the highest in views refers to MAX(Views);", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.userdisplayname, t2.age FROM users AS t1 INNER JOIN posts AS t2 ON t1.\"userid\" = t2.\"id\" ORDER BY t2\".views\" DESC LIMIT 1", + "pred": "SELECT t1.displayname, t1.age FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid ORDER BY t2.view DESC LIMIT 1", "gold": "SELECT displayname, age FROM users WHERE views = (SELECT MAX(views) FROM users)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 644, @@ -7089,10 +9021,13 @@ "question": "Provide the last edit date and last edit user ID for the post \"Detecting a given face in a database of facial images\"", "evidence": "Title = 'Detecting a given face in a database of facial images';", "difficulty": "simple", - "pred": "SELECT t2.last editdate, t1.userid FROM users AS t1 INNER JOIN posts AS t2 ON t1.\"userid\" = t2.\"user id\" WHERE t1.'title\" = 'Detecting a given face in a database of facial images'", + "pred": "SELECT t1.last editdate, t1.userid FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t2.title = 'Detecting a given face in a database of facial images'", "gold": "SELECT lasteditdate, lasteditoruserid FROM posts WHERE title = 'Detecting a given face in a database of facial images'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 645, @@ -7100,10 +9035,13 @@ "question": "How many negative comments were given by user ID 13", "evidence": "negative comments refer to Score < 60;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM comments WHERE score < 60", + "pred": "SELECT COUNT(comments) FROM comments WHERE userid = 13 AND score < 60", "gold": "SELECT COUNT(id) FROM comments WHERE userid = 13 AND score < 60", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 646, @@ -7111,10 +9049,13 @@ "question": "Describe the post title which got positive comments and display names of the users who posted those comments", "evidence": "positive comments refer to Score > 60;", "difficulty": "simple", - "pred": "SELECT title, comment, displayname FROM comments WHERE score > 60", + "pred": "SELECT t1.title, t1.displayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.score > 60", "gold": "SELECT t1.title, t2.userdisplayname FROM posts AS t1 INNER JOIN comments AS t2 ON t2.postid = t2.id WHERE t1.score > 60", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 647, @@ -7122,10 +9063,13 @@ "question": "Provide the badge names received in 2011 for the user whose location is in the North Pole", "evidence": "received in 2011 refers to year(Date) = 2011;", "difficulty": "simple", - "pred": "SELECT name FROM users WHERE location = 'North Pole' AND date = '2011'", + "pred": "SELECT t1.name FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE STRFTIME('%Y', t1.date) = '2011'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 648, @@ -7133,10 +9077,13 @@ "question": "Provide the users' display names and available website URLs of the post with favorite count of more than 150", "evidence": "favorite count of more than 150 refers to FavoriteCount > 150;", "difficulty": "simple", - "pred": "SELECT displayname, websiteurl FROM users WHERE favoritecount > 150", + "pred": "SELECT DISTINCT t1.displayname, t2.siteurl FROM users AS t1 INNER JOIN postslinks AS t2 ON t1.id = t2.postid WHERE t2.vivocount > 150", "gold": "SELECT t1.displayname, t1.websiteurl FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid WHERE t2.favoritecount > 150", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 649, @@ -7144,10 +9091,13 @@ "question": "Describe the post history counts and last edit date of the post title \"What is the best introductory Bayesian statistics textbook?\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT count, last editdate FROM posts WHERE title = 'What is the best introductory Bayesian statistics textbook?\"", + "pred": "SELECT t2.posthistorycount, t2.last editdate FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t1.title = 'What is the best introductory Bayesian statistics textbook?'", "gold": "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?'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 650, @@ -7155,10 +9105,13 @@ "question": "Describe the last accessed date and location of the users who received the outliers badge", "evidence": "Outliers is the name of the badge;", "difficulty": "simple", - "pred": "SELECT lastaccessdate, location FROM users WHERE name = 'Outliers'", + "pred": "SELECT t1.lastaccessdate, t1.location FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Outliers'", "gold": "SELECT t1.lastaccessdate, t1.location FROM users AS t1 INNER JOIN badges AS t2 ON t1.id = t2.userid WHERE t2.name = 'outliers'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 651, @@ -7166,10 +9119,13 @@ "question": "Provide the related post title of \"How to tell if something happened in a data set which monitors a value over time\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT title FROM posts WHERE value = 'value over time'", + "pred": "SELECT t1.title FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE t2.title = 'How to tell if something happened in a data set which monitors a value over time'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 652, @@ -7177,10 +9133,13 @@ "question": "List the post IDs and badge names of the user Samuel in 2013", "evidence": "Samuel refers to UserDisplayName; YEAR(CreationDate) = 2013 relates to PostId; YEAR(Date) = 2013 relates to the badge;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.postid, t1.userdisplayname FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.\"userid\" = t2.\"id\" WHERE STRFTIME('%Y', t2.'creationdate) = '2013' AND t1.'userdisplayername = 'Samuel'", + "pred": "SELECT DISTINCT t1.postid, t1.garname FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.userid = (SELECT MAX(userid) FROM users) AND STRFTIME('%Y', t1.creationdate) = '2013'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 653, @@ -7188,10 +9147,13 @@ "question": "What is the owner's display name of the most popular post", "evidence": "Higher view count means the post has higher popularity; the most popular post refers to MAX(ViewCount);", "difficulty": "simple", - "pred": "SELECT ownerdisplayname FROM posts ORDER BY viewcount DESC LIMIT 1", + "pred": "SELECT t1.ownerdisplayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.viewcount = (SELECT MAX(viewcount) FROM posts)", "gold": "SELECT displayname FROM users WHERE id = (SELECT owneruserid FROM posts ORDER BY viewcount DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 654, @@ -7199,10 +9161,13 @@ "question": "Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag", "evidence": "user who owned the excerpt post with hypothesis-testing tag refers to OwnerUserId WHERE TagName = 'hypothesis-testing';", "difficulty": "moderate", - "pred": "SELECT displayname, location FROM tags WHERE tagname = 'hypothesis-testing'", + "pred": "SELECT DISTINCT t1.displayname, t2.location FROM posts AS t1 INNER JOIN tags AS t2 ON t1.id = t2.indicostid WHERE t2.tagname = 'hypothesis-testing'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 655, @@ -7213,7 +9178,10 @@ "pred": "SELECT title, linktypeid FROM posts WHERE title = 'What are principal component scores?'", "gold": "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?'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 656, @@ -7221,10 +9189,13 @@ "question": "Describe the display name of the parent ID for child post with the highest score", "evidence": "If the parent id is not null, the post is the child post; the highest score refers to MAX(Score);", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.displayname FROM posts AS t1 INNER JOIN comments AS t2 ON t2.postid = t3.id ORDER BY t1.\"score\" DESC LIMIT 1", + "pred": "SELECT displayname FROM posts WHERE NOT parentid IN (SELECT id FROM posts WHERE score = (SELECT MAX(score) FROM posts)", "gold": "SELECT displayname FROM users WHERE id = (SELECT owneruserid FROM posts WHERE NOT parentid IS NULL ORDER BY score DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 657, @@ -7232,10 +9203,13 @@ "question": "Under the vote type of 8, provide the display names and websites URLs of the user who got the highest bounty amount", "evidence": "vote type of 8 refers to VoteTypeId = 8; the highest bounty amount refers to MAX(BountyAmount);", "difficulty": "moderate", - "pred": "SELECT displayname, websiteurl FROM users WHERE votetype = 8 ORDER BY bountyamount DESC LIMIT 1", + "pred": "SELECT t1.Displayname, t1.siteurl FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id WHERE t2.votetype = 8 ORDER BY t2.bountyamount DESC LIMIT 1", "gold": "SELECT displayname, websiteurl FROM users WHERE id = (SELECT userid FROM votes WHERE votetypeid = 8 ORDER BY bountyamount DESC LIMIT 1)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 658, @@ -7246,7 +9220,10 @@ "pred": "SELECT title FROM posts ORDER BY viewcount DESC LIMIT 5", "gold": "SELECT title FROM posts ORDER BY viewcount DESC LIMIT 5", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 659, @@ -7257,7 +9234,10 @@ "pred": "SELECT COUNT(tagname) FROM tags WHERE count BETWEEN 5000 AND 7000", "gold": "SELECT COUNT(id) FROM tags WHERE count BETWEEN 5000 AND 7000", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 660, @@ -7265,10 +9245,13 @@ "question": "What is the owner user id of the most valuable post", "evidence": "the most valuable post refers to MAX(FavoriteCount);", "difficulty": "simple", - "pred": "SELECT owneruserid FROM posts ORDER BY favoritecount DESC LIMIT 1", + "pred": "SELECT DISTINCT t1.owneruserid FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t1.overallercount = (SELECT MAX(overallercount) FROM posts)", "gold": "SELECT owneruserid FROM posts WHERE favoritecount = (SELECT MAX(favoritecount) FROM posts)", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 661, @@ -7276,10 +9259,13 @@ "question": "How old is the most influential user", "evidence": "How old describes age; the most influential refers to user where MAX(Reputation);", "difficulty": "simple", - "pred": "SELECT MAX(t2.reputation) FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.userid = t2.id ORDER BY t2.\"reputation\" DESC LIMIT 1", + "pred": "SELECT age FROM users WHERE reputation = (SELECT MAX(reputation) FROM users)", "gold": "SELECT age FROM users WHERE reputation = (SELECT MAX(reputation) FROM users)", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 662, @@ -7287,10 +9273,13 @@ "question": "How many posts with votes that were created in 2011 have a bounty of 50", "evidence": "created in 2012 refers YEAR(CreationDate) = 2011; BountyAmount = 50;", "difficulty": "simple", - "pred": "SELECT COUNT(t2.postid) FROM votes AS t1 INNER JOIN posts AS t2 ON t1.id = t2.votes WHERE t1.\"date\" = '2011' AND t2.\"bountyamount\" = 50", + "pred": "SELECT COUNT(DISTINCT t1.postid) FROM posts AS t1 INNER JOIN votes AS t2 ON t1.postid = t2.id WHERE STRFTIME('%Y', t1.creationdate) = '2011' AND t2.bountyamount = 50", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 663, @@ -7298,10 +9287,13 @@ "question": "What is the id of the youngest user", "evidence": "the youngest user refers to MIN(Age);", "difficulty": "simple", - "pred": "SELECT id FROM users WHERE age = (SELECT MIN(age) FROM users)", + "pred": "SELECT id FROM users ORDER BY age LIMIT 1", "gold": "SELECT id FROM users WHERE age = (SELECT MIN(age) FROM users)", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 664, @@ -7309,10 +9301,13 @@ "question": "What is the sum of score of the post on 2010-07-19", "evidence": "on 2010-07-19 refers to LasActivityDate LIKE '2010-07-19%';", "difficulty": "simple", - "pred": "SELECT SUM(score) FROM posts WHERE lasactivitydate LIKE '2010-07-19%'", + "pred": "SELECT SUM(t2.score) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.lasactivitydate LIKE '2010-07-19%'", "gold": "SELECT SUM(score) FROM posts WHERE lasactivitydate LIKE '2010-07-19%'", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 665, @@ -7320,10 +9315,13 @@ "question": "What is the average monthly number of links created in 2010 for posts that have no more than 2 answers", "evidence": "calculation = DIVIDE(COUNT(Id where YEAR(CreationDate) = 2010 and AnswerCount < = 2), 12)", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN answercount < 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.postid) FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.id WHERE STRFTIME('%Y', t1.\"creationdate\") = '2010'", + "pred": "SELECT CAST(COUNT(CASE WHEN t2.answercount <= 2 THEN 1 ELSE NULL END) AS REAL) / 12 FROM posts AS t1 INNER JOIN postlinks AS t2 ON t1.id = t2.postid WHERE STRFTIME('%Y', t1.creationdate) = '2010'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 666, @@ -7331,10 +9329,13 @@ "question": "Among the posts that were voted by user 1465, what is the id of the most valuable post", "evidence": "user 1465 refers to UserId = 1465; the most valuable post refers to MAX(FavoriteCount);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.postid FROM votes AS t1 INNER JOIN posts AS t2 ON t1.id = t2.\"postid\" WHERE t1.\"userid\" = 1465 ORDER BY t2._votingcount DESC LIMIT 1", + "pred": "SELECT postid FROM posts WHERE userid = 1465 ORDER BY favoritecount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 667, @@ -7342,10 +9343,13 @@ "question": "What is the title of the post with the oldest post link", "evidence": "the oldest post link refers to MIN(CreaionDate);", "difficulty": "simple", - "pred": "SELECT t1.title FROM posts AS t1 INNER JOIN postlinks AS t2 ON t2.postid = t3.id ORDER BY t1.\"creaiondate\" DESC LIMIT 1", + "pred": "SELECT title FROM posts WHERE creaiondate = (SELECT MIN(creaiondate) FROM posts)", "gold": "SELECT t1.title FROM posts AS t1 INNER JOIN postlinks AS t2 ON t2.postid = t1.id ORDER BY t1.creaiondate LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 668, @@ -7353,10 +9357,13 @@ "question": "What is the display name of the user who acquired the highest amount of badges", "evidence": "highest amount of badges refers to MAX(COUNT(Name));", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users ORDER BY COUNT(userid) DESC LIMIT 1", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id GROUP BY t1.userid ORDER BY COUNT(t2.userid) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 669, @@ -7364,10 +9371,13 @@ "question": "When did 'chl' cast its first vote in a post", "evidence": "DisplayName = 'chl'; cast its first vote refers to MIN(CreationDate);", "difficulty": "simple", - "pred": "SELECT MIN(t2.creationdate) FROM votes AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id GROUP BY t1.\"postid\" ORDER BY t2.\"creation date\" DESC LIMIT 1", + "pred": "SELECT MIN(creationdate) FROM posts WHERE displayname = 'chl'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 670, @@ -7375,10 +9385,13 @@ "question": "What is the date when the youngest user made his or her first post", "evidence": "the youngest user refers to MIN(Age); first post refers to MIN(CreaionDate);", "difficulty": "simple", - "pred": "SELECT MIN(t2.age) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id ORDER BY t2.\"creaiondate\" DESC LIMIT 1", + "pred": "SELECT creaiondate FROM posts WHERE age = (SELECT MIN(age) FROM posts)", "gold": "SELECT t2.creaiondate FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid WHERE NOT t1.age IS NULL ORDER BY t1.age, t2.creaiondate LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 671, @@ -7386,10 +9399,13 @@ "question": "What is the display name of the user who acquired the first Autobiographer badge", "evidence": "Autobiographer is the name of the badge; acquired the first refers to MIN(Date);", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users WHERE name = 'Autobiographer' ORDER BY date DESC LIMIT 1", + "pred": "SELECT t1.displayname FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t2.name = 'Autobiographer' ORDER BY t1.date LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 672, @@ -7397,10 +9413,13 @@ "question": "Among the users located in United Kingdom, how many users whose post have a total favorite amount of 4 or more", "evidence": "favorite amount of 4 or more refers to FavoriteCount > = 4; Location = 'United Kingdom';", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t2.\"location\" = 'United Kingdom' AND t1.\"videcount\" > 4", + "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE location = 'United Kingdom' AND favoritecount >= 4", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 673, @@ -7408,10 +9427,13 @@ "question": "What is the average number of posts voted by the oldest users", "evidence": "average number of posts voted refers to AVG(PostId) FROM votes; the oldest users refer to MAX(Age);", "difficulty": "simple", - "pred": "SELECT AVG(t2.postid) FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id ORDER BY t1.\"age\" DESC LIMIT 1", + "pred": "SELECT AVG(postid) FROM posts WHERE userid = (SELECT MAX(userid) FROM users)", "gold": "SELECT AVG(postid) FROM votes WHERE userid IN (SELECT id FROM users WHERE age = (SELECT MAX(age) FROM users))", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 674, @@ -7419,10 +9441,13 @@ "question": "Who has the highest reputation? Please give the display name", "evidence": "the highest reputation refers to MAX(Reputation);", "difficulty": "simple", - "pred": "SELECT displayname FROM users ORDER BY reputation DESC LIMIT 1", + "pred": "SELECT displayname FROM users WHERE reputation = (SELECT MAX(Reputation) FROM users)", "gold": "SELECT displayname FROM users WHERE reputation = (SELECT MAX(reputation) FROM users)", - "em_norm": 0, - "ex": 1 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 675, @@ -7430,10 +9455,13 @@ "question": "How many users whose reputations are higher than 2000 and the number of views is higher than 1000", "evidence": "reputations are higher than 2000 refer to Reputation > 2000; number of views is higher than 1000 refers to Views > 1000;", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE reputation > 2000 AND views > 1000", + "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE reputation > 2000 AND Views > 1000", "gold": "SELECT COUNT(id) FROM users WHERE reputation > 2000 AND views > 1000", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 676, @@ -7441,10 +9469,13 @@ "question": "Please list all display names of users who are adults", "evidence": "adults refer to users where Age BETWEEN 19 and 65;", "difficulty": "simple", - "pred": "SELECT userdisplayname FROM users WHERE age BETWEEN 19 AND 65", + "pred": "SELECT DISTINCT displayname FROM users WHERE age >= 19 AND age <= 65", "gold": "SELECT displayname FROM users WHERE age BETWEEN 19 AND 65", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 677, @@ -7452,10 +9483,13 @@ "question": "How many posts did Jay Stevens have in 2010", "evidence": "DisplayName = 'Jay Stevens'; in 2010 refers to YEAR(CreationDate) = 2010;", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.\"displayname\" = 'Jay Stevens' AND STRFTIME('%Y', t1.\"creationdate\") = '2010'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t1.Displayname = 'Jay Stevens' AND STRFTIME('%Y', t2.creationdate) = '2010'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 678, @@ -7466,7 +9500,10 @@ "pred": "SELECT id, title FROM posts WHERE displayname = 'Harvey Motulsky' ORDER BY viewcount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 679, @@ -7474,10 +9511,13 @@ "question": "Which post has the highest score? Please give its id and title's name", "evidence": "the highest score refers to MAX(Score); owner's name refers to DisplayName;", "difficulty": "simple", - "pred": "SELECT id, title FROM posts ORDER BY score DESC LIMIT 1", + "pred": "SELECT id, title FROM posts WHERE score = (SELECT MAX(score) FROM posts)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 680, @@ -7485,10 +9525,13 @@ "question": "What is the average score of Stephen Turner's posts", "evidence": "DisplayName = 'Stephen Turner'; average score refers to AVG(Score);", "difficulty": "simple", - "pred": "SELECT AVG(score) FROM posts WHERE displayname = 'Stephen Turner'", + "pred": "SELECT AVG(t2.score) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t1.userdisplayname = 'Stephen Turner'", "gold": "SELECT AVG(t2.score) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid WHERE t1.displayname = 'Stephen Turner'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 681, @@ -7496,10 +9539,13 @@ "question": "Please list the users' display names whose posts had over 20000 views in 2011", "evidence": "had over 20000 views in 2011 refers to ViewCount > 20000 where YEAR(CreationDate) = 2011;", "difficulty": "simple", - "pred": "SELECT t1.userdisplayname FROM users AS t1 INNER JOIN posthistory AS t2 ON t2.userid = t3.id WHERE t4.viewcount > 20000 AND STRFTIME('%Y', t1.\"creationdate\") = '2011'", + "pred": "SELECT DISTINCT t1.displayname FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE STRFTIME('%Y', t2.creationdate) = '2011' AND t2.viewcount > 20000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 682, @@ -7507,10 +9553,13 @@ "question": "Which is the most valuable post in 2010? Please give its id and the owner's display name", "evidence": "the most valuable post in 2015 refers to MAX(FavoriteCount) where year(CreationDate) = 2010;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.postid, t2.userdisplayname FROM posts AS t1 INNER JOIN users AS t2 ON t1.\"userid\" = t2.\"id\" WHERE t2.'year\" = 2010 ORDER BY t1.'percentage\" DESC LIMIT 1", + "pred": "SELECT postid, displayname FROM posts WHERE STRFTIME('%Y', creaiondate) = '2010' ORDER BY favoritecount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 683, @@ -7518,10 +9567,13 @@ "question": "What is the percentage of posts whose owners had a reputation of over 1000 in 2011", "evidence": "percentage = DIVIDE(COUNT(Id where YEAR(CreationDate) = 2011 and Reputation > 1000), COUNT(Id) ) * 100;", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.reputation > 1000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.\"userid\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.releasability > 1000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE STRFTIME('%Y', t1.creationdate) = '2011'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 684, @@ -7529,10 +9581,13 @@ "question": "Identify the percentage of teenage users", "evidence": "DIVIDE(COUNT(Id where Age BETWEEN 13 and 18), COUNT(Id)) as percentage;", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN age BETWEEN 13 and 18 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(userid) FROM users", + "pred": "SELECT CAST(COUNT(CASE WHEN age BETWEEN 13 AND 18 THEN id END) AS REAL) * 100 / COUNT(id) FROM users", "gold": "SELECT CAST(SUM(IIF(age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(id) FROM users", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 685, @@ -7540,10 +9595,13 @@ "question": "Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time", "evidence": "total views refer to ViewCount; Name the user refers to DisplayName; post 'Computer Game Datasets' refers to Text = 'Computer Game Datasets';", "difficulty": "moderate", - "pred": "SELECT SUM(t2.viewcount) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t1.\"text\" = 'Computer Game Datasets'", + "pred": "SELECT SUM(t1.viewcount) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.text = 'Computer Game Datasets'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 686, @@ -7551,10 +9609,13 @@ "question": "Identify the total number of posts with views above average", "evidence": "views above average refer to ViewCount > AVG(ViewCount);", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM posts WHERE viewcount > AVG(viewcount)", + "pred": "SELECT COUNT(postid) FROM posts WHERE viewcount > (SELECT AVG(viewcount) FROM posts)", "gold": "SELECT id FROM posts WHERE viewcount > (SELECT AVG(viewcount) FROM posts)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 687, @@ -7562,10 +9623,13 @@ "question": "How many comments were added to the post with the highest score", "evidence": "the highest score refers to MAX(Score);", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM comments WHERE score = (SELECT MAX(score) FROM comments)", + "pred": "SELECT COUNT(t2.comments) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.score = (SELECT MAX(score) FROM posts)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 688, @@ -7573,10 +9637,13 @@ "question": "Identify the number of posts that have been viewed over 35000 times but have received no comments from other users", "evidence": "have been viewed over 35000 times refers to ViewCount > 35000; received no comments refers to CommentCount = 0;", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t2.\"viewcount\" > 35000 AND t1.\"commentcount\" = 0", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.viewcount > 35000 AND t2.commentcount = 0", "gold": "SELECT COUNT(id) FROM posts WHERE viewcount > 35000 AND commentcount = 0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 689, @@ -7584,10 +9651,13 @@ "question": "Identify the display name and location of the user, who was the last to edit the post with ID 183", "evidence": "last to edit refers to MAX(LastEditDate);", "difficulty": "simple", - "pred": "SELECT displayname, location FROM users WHERE postid = 183 ORDER BY lastEditdate DESC LIMIT 1", + "pred": "SELECT t1.displayname, t1.location FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t2.postid = 183 ORDER BY t2.lastmodifieddate DESC LIMIT 1", "gold": "SELECT t2.displayname, t2.location FROM posts AS t1 INNER JOIN users AS t2 ON t1.owneruserid = t2.id WHERE t1.id = 183 ORDER BY t1.lasteditdate DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 690, @@ -7595,10 +9665,13 @@ "question": "Identify the latest badge awarded to the user with the display name Emmett", "evidence": "the latest badge refers to Name FROM badges where MAX(Date);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"userdisplayname\" = 'Emmett' ORDER BY t3.date DESC LIMIT 1", + "pred": "SELECT t2.name FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.displayname = 'Emmett' ORDER BY t2.date DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 691, @@ -7606,10 +9679,13 @@ "question": "Identify the number of adult users who have cast over 5000 upvotes", "evidence": "adult users refer to Age BETWEEN 19 and 65; over 5000 upvotes refer to UpVotes > 5000;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT userid) FROM users WHERE upvotes > 5000 AND age BETWEEN 19 AND 65", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.id WHERE t1.age BETWEEN 19 AND 65 AND t2.upvotes > 5000", "gold": "SELECT COUNT(id) FROM users WHERE age BETWEEN 19 AND 65 AND upvotes > 5000", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 692, @@ -7617,10 +9693,13 @@ "question": "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", "evidence": "SUBTRACT(Date from stats_badges, CreationDate) where DisplayName = 'Zolomon';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.date FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"displayname\" = 'Zolomon'", + "pred": "SELECT t2.creationdate - t2.creationdate FROM users AS t1 INNER JOIN badges AS t2 ON t1.userid = t2.id WHERE t1.displayname = 'Zolomon'", "gold": "SELECT t1.date - t2.creationdate FROM badges AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.displayname = 'Zolomon'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 693, @@ -7628,10 +9707,13 @@ "question": "Identify the number of posts and comments left by the user, who has the latest created user account", "evidence": "the latest created user account refers to MAX(CreationDate);", "difficulty": "simple", - "pred": "SELECT COUNT(t1.postid) FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.userid = t2.id ORDER BY t3.creationdate DESC LIMIT 1", + "pred": "SELECT COUNT(t1.postid), t2.comments FROM posts AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.postid WHERE t2.creationdate = (SELECT MAX(creationdate) FROM posts)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 694, @@ -7639,10 +9721,13 @@ "question": "Provide the text of the latest 10 comments to the post with the title 'Analysing wind data with R' and the display name of the user who left it", "evidence": "the latest comment refers to MAX(CreationDate);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.sentiment FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.\"postid\" WHERE t1.\"title\" = 'Analysing wind data with R' GROUP BY t2.'sentiment\" ORDER BY COUNT(t1.userid) DESC LIMIT 10", + "pred": "SELECT t1.text, t2.userdisplayname FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.title = 'Analysing wind data with R' ORDER BY t1.creationdate DESC LIMIT 10", "gold": "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 10", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 695, @@ -7650,10 +9735,13 @@ "question": "How many users were awarded with 'Citizen Patrol' badge", "evidence": "Citizen Patrol' is the name of the badge;", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM users WHERE name = 'Citizen Patrol'", + "pred": "SELECT COUNT(DISTINCT userid) FROM badges WHERE name = 'Citizen Patrol'", "gold": "SELECT COUNT(id) FROM badges WHERE \"name\" = 'Citizen Patrol'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 696, @@ -7661,10 +9749,13 @@ "question": "Count the number of posts with a tag specified as 'careers'", "evidence": "tag specified as 'careers' refers to TagName = 'careers';", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM tags WHERE tagname = 'careers'", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN tags AS t2 ON t1.id = t2.tagid WHERE t2.tagname = 'careers'", "gold": "SELECT COUNT(id) FROM tags WHERE tagname = 'careers'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 697, @@ -7672,10 +9763,13 @@ "question": "What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'", "evidence": "", "difficulty": "simple", - "pred": "SELECT t1.reparation, t2.viewcount FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.\"userid\" = t2.\"id\" WHERE t3.displayname = 'Jarrod Dixon'", + "pred": "SELECT t2. reputation, t2.viewcount FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'Jarrod Dixon'", "gold": "SELECT reputation, views FROM users WHERE displayname = 'Jarrod Dixon'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 698, @@ -7683,10 +9777,13 @@ "question": "How many comments and answers were left by the users on the post with the title 'Clustering 1D data'", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.usersid = t2.id WHERE t2.\"title\" = 'Clustering 1D data'", + "pred": "SELECT COUNT(t2.comments) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.title = 'Clustering 1D data'", "gold": "SELECT commentcount, answercount FROM posts WHERE title = 'Clustering 1D data'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 699, @@ -7694,10 +9791,13 @@ "question": "When did the user known as 'IrishStat' create his or her account", "evidence": "DisplayName = 'IrishStat'; when create his or her account refers to CreationDate;", "difficulty": "simple", - "pred": "SELECT t2.creationdate FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"displayname\" = 'IrishStat'", + "pred": "SELECT t1.creationdate FROM users AS t1 INNER JOIN posthistory AS t2 ON t1.id = t2.userid WHERE t1.displayname = 'IrishStat'", "gold": "SELECT creationdate FROM users WHERE displayname = 'IrishStat'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 700, @@ -7705,10 +9805,13 @@ "question": "Identify the number of posts that offer a bounty amount over 30", "evidence": "bounty amount over 30 refers to BountyAmount > = 30;", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM posts WHERE Bountyamount > 30", + "pred": "SELECT COUNT(postid) FROM posts WHERE bountyamount > 30", "gold": "SELECT COUNT(id) FROM votes WHERE bountyamount >= 30", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 701, @@ -7716,10 +9819,13 @@ "question": "Among all the posts posted by the most influential user, identify the percentage with a score above 50", "evidence": "The higher reputation the user has the more influence; percentage = DIVIDE(COUNT(stats_posts.Id where Score > 50 and MAX(Reputation))), COUNT(stats_posts.Id where MAX(Reputation));", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN score > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.postid) FROM users AS t1 INNER JOIN posts AS t2 ON t1.userid = t2.id WHERE t1.\"score\" > 50", + "pred": "SELECT CAST(SUM(CASE WHEN t2.score > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.postid) FROM posts AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.releasability = (SELECT MAX(releasability) FROM posts)", "gold": "SELECT CAST(SUM(CASE WHEN t2.score > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM users AS t1 INNER JOIN posts AS t2 ON t1.id = t2.owneruserid INNER JOIN (SELECT MAX(reputation) AS max_reputation FROM users) AS t3 ON t1.reputation = t3.max_reputation", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 702, @@ -7730,7 +9836,10 @@ "pred": "SELECT COUNT(postid) FROM posts WHERE score < 20", "gold": "SELECT COUNT(id) FROM posts WHERE score < 20", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 703, @@ -7738,10 +9847,13 @@ "question": "Among the tags with tag ID below 15, how many of them have 20 count of posts and below", "evidence": "ID below 15 refers to Id < 15; have 20 count of posts and below refers to Count < = 20;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT tags) FROM tags WHERE tagid < 15 AND count < 20", + "pred": "SELECT COUNT(id) FROM tags WHERE tagname IN (SELECT tagname FROM tags WHERE count <= 20)", "gold": "SELECT COUNT(id) FROM tags WHERE count <= 20 AND id < 15", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 704, @@ -7749,10 +9861,13 @@ "question": "What is the excerpt post ID and wiki post ID of the tag named sample", "evidence": "tag named sample refers to TagName = 'sample';", "difficulty": "simple", - "pred": "SELECT excerptpostid, wikipostid FROM tags WHERE tagname = 'sample'", + "pred": "SELECT t1.postid, t1.wikipediapostid FROM tags AS t1 INNER JOIN posts AS t2 ON t1.id = t2.postid WHERE t1.tagname ='sample'", "gold": "SELECT excerptpostid, wikipostid FROM tags WHERE tagname = 'sample'", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 705, @@ -7760,10 +9875,13 @@ "question": "Give the user's reputation and up vote number of the user that commented \"fine, you win :)\"", "evidence": "Text = 'fine, you win :)';", "difficulty": "simple", - "pred": "SELECT t2.reputation, t1.upvotes FROM users AS t1 INNER JOIN comments AS t2 ON t1.\"userid\" = t2.\"user id\" WHERE t1.'text\" = 'fine, you win :)'", + "pred": "SELECT t1.businessname, t2.upvotes FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t2.text = 'fine, you win :)'", "gold": "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 :)'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 706, @@ -7771,10 +9889,13 @@ "question": "Give the texts commented on the post about linear regression", "evidence": "about linear regression refers to Title contains 'linear regression'", "difficulty": "simple", - "pred": "SELECT text FROM comments WHERE title = 'linear regression'", + "pred": "SELECT text FROM posts WHERE title LIKE '%linear regression%'", "gold": "SELECT t1.text FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t2.title LIKE '%linear regression%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 707, @@ -7782,10 +9903,13 @@ "question": "Among the posts with views ranging from 100 to 150, what is the comment with the highest score", "evidence": "views ranging from 100 to 150 refers to ViewCount BETWEEN 100 and 150; comment with the highest score refers to Text where MAX(Score);", "difficulty": "moderate", - "pred": "SELECT comment FROM comments WHERE viewcount BETWEEN 100 AND 150 ORDER BY score DESC LIMIT 1", + "pred": "SELECT t2.text FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.viewcount BETWEEN 100 AND 150 ORDER BY t1.score DESC LIMIT 1", "gold": "SELECT text FROM comments WHERE postid IN (SELECT id FROM posts WHERE viewcount BETWEEN 100 AND 150) ORDER BY score DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 708, @@ -7793,10 +9917,13 @@ "question": "List the creation date and age of the user that commented with webiste", "evidence": "commented with webiste refers to the value contains 'http://'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.creationdate, t1.age FROM users AS t1 INNER JOIN comments AS t2 ON t1.\"userid\" = t2.\"user id\" WHERE t1.'value\" = 'http://'", + "pred": "SELECT t1.creationdate, t1.age FROM users AS t1 INNER JOIN comments AS t2 ON t1.id = t2.userid WHERE t2.value LIKE 'http://'", "gold": "SELECT t2.creationdate, t2.age FROM comments AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.text LIKE '%http://%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 709, @@ -7804,10 +9931,13 @@ "question": "In comments with 0 score, how many of the posts have view count lower than 5", "evidence": "view count lower than 5 refers to ViewCount < 5;", "difficulty": "simple", - "pred": "SELECT COUNT(postid) FROM comments WHERE score < 5 AND viewcount < 5", + "pred": "SELECT COUNT(t1.postid) FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t2.score = 0 AND t1.viewcount < 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 710, @@ -7815,10 +9945,13 @@ "question": "In posts with 1 comment, how many of the comments have 0 score", "evidence": "in posts with 1 comment refers to CommentCount = 1;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM comments WHERE commentcount = 1 AND score = 0", + "pred": "SELECT COUNT(t2.postid) FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t1.commentcount = 1 AND t1.score = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 711, @@ -7826,10 +9959,13 @@ "question": "Among products comments with 0 score, what is the total number of users ages 40 years old", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(userid) FROM comments WHERE score = 0", + "pred": "SELECT COUNT(t1.userid) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t2.score = 0 AND t1.age = 40", "gold": "SELECT COUNT(DISTINCT t1.id) FROM comments AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t1.score = 0 AND t2.age = 40", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 712, @@ -7837,10 +9973,13 @@ "question": "What is the post ID and the comments commented in the post titled by \"Group differences on a five point Likert item\"", "evidence": "Title = 'Group differences on a five point Likert item';", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.postid, t2.comment FROM comments AS t1 INNER JOIN posts AS t2 ON t1.\"id\" = t2.\"postid\" WHERE t3.title = 'Group differences on a five point Likert item'", + "pred": "SELECT t1.postid, t2.comments FROM posts AS t1 INNER JOIN comments AS t2 ON t1.postid = t2.id WHERE t1.title = 'Group differences on a five point Likert item'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 713, @@ -7848,10 +9987,13 @@ "question": "What is the up vote number of the user that commented \"R is also lazy evaluated.\"", "evidence": "commented \"R is also lazy evaluated.\" refers to Text of the comment;", "difficulty": "simple", - "pred": "SELECT upvotes FROM users WHERE comment = 'R is also lazy evaluated.'", + "pred": "SELECT SUM(t2.upvotes) FROM comments AS t1 INNER JOIN votes AS t2 ON t1.userid = t2.userid WHERE t1.text = 'R is also lazy evaluated.'", "gold": "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.'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 714, @@ -7859,10 +10001,13 @@ "question": "List the comments commented by the user with a username of Harvey Motulsky", "evidence": "comments refer to Text; username of Harvey Motulsky refers to DisplayName = 'Harvey Motulsky';", "difficulty": "simple", - "pred": "SELECT comment FROM users WHERE userdisplayname = 'Harvey Motulsky'", + "pred": "SELECT text FROM comments WHERE userid = (SELECT userid FROM users WHERE displayname = 'Harvey Motulsky')", "gold": "SELECT t1.text FROM comments AS t1 INNER JOIN users AS t2 ON t1.userid = t2.id WHERE t2.displayname = 'Harvey Motulsky'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 715, @@ -7870,10 +10015,13 @@ "question": "In comments with score between 1 to 5, list down the display names of the users with 0 down votes", "evidence": "DownVotes = 0; Score BETWEEN 1 and 5", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.userdisplayname FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.\"userid\" WHERE t1.\"score\" BETWEEN 1 AND 5", + "pred": "SELECT DISTINCT t1.displayname FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t2.score BETWEEN 1 AND 5 AND t2.votes = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 716, @@ -7881,10 +10029,13 @@ "question": "Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes", "evidence": "percentage = DIVIDE(COUNT(UserId where UpVotes = 0 and Score BETWEEN 5 and 10))*100, (COUNT(UserId where Score BETWEEN 5 and 10));", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN score BETWEEN 5 AND 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM comments AS t1 INNER JOIN posts AS t2 ON t1.postid = t2.id WHERE t1.\"score\" = '0' AND t2.\"upvotes\" = 10", + "pred": "SELECT CAST(SUM(CASE WHEN t2.upvotes = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.userid) FROM users AS t1 INNER JOIN comments AS t2 ON t1.userid = t2.id WHERE t2.score BETWEEN 5 AND 10", "gold": "SELECT CAST(SUM(IIF(t1.upvotes = 0, 1, 0)) AS REAL) * 100 / 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 717, @@ -7892,10 +10043,13 @@ "question": "Please list all the superpowers of 3-D Man", "evidence": "3-D Man refers to superhero_name = '3-D Man'; superpowers refers to power_name", "difficulty": "simple", - "pred": "SELECT t2.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.\"hero\" WHERE t1.\"superhero_name\" = '3-D Man'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.superhero_name = '3-D Man'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 718, @@ -7903,10 +10057,13 @@ "question": "How many superheroes have the super power of \"Super Strength\"", "evidence": "super power of \"Super Strength\" refers to power_name = 'Super Strength'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM hero_power WHERE power_name = 'Super Strength'", + "pred": "SELECT COUNT(*) FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t1.power_name = 'Super Strength'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 719, @@ -7914,10 +10071,13 @@ "question": "Among the superheroes with the super power of \"Super Strength\", how many of them have a height of over 200cm", "evidence": "super power of \"Super Strength\" refers to power_name = 'Super Strength'; a height of over 200cm refers to height_cm > 200", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM hero_power WHERE power_name = 'Super Strength' AND height_cm > 200", + "pred": "SELECT COUNT(t1.hero_id) FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id INNER JOIN superpower AS t3 ON t1.power_id = t3.id WHERE t3.power_name = 'Super Strength' AND t2.height_cm > 200", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 720, @@ -7925,10 +10085,13 @@ "question": "Please list the full names of all the superheroes with over 15 super powers", "evidence": "15 super powers refers to COUNT(full_name) > 15", "difficulty": "simple", - "pred": "SELECT full_name FROM superhero WHERE COUNT(*) > 15", + "pred": "SELECT full_name FROM superhero GROUP BY full_name HAVING COUNT(full_name) > 15", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 721, @@ -7936,10 +10099,13 @@ "question": "How many superheroes have blue eyes", "evidence": "blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE colour = 'Blue'", + "pred": "SELECT COUNT(*) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Blue'", "gold": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.eye_colour_id = t2.id WHERE t2.colour = 'Blue'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 722, @@ -7947,10 +10113,13 @@ "question": "What is the colour of Apocalypse's skin", "evidence": "Apocalypse refers to superhero_name = 'Apocalypse'; colour of skin refers to colour where skin_colour_id = colour.id", "difficulty": "simple", - "pred": "SELECT t2.color FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.hero_id = t2.\"id\" WHERE t1.\"hero_name\" = 'Apocalypse'", + "pred": "SELECT t2.color FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t1.superhero_name = 'Apocalypse'", "gold": "SELECT t2.colour FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.skin_colour_id = t2.id WHERE t1.superhero_name = 'Apocalypse'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 723, @@ -7958,10 +10127,13 @@ "question": "Among the superheroes with blue eyes, how many of them have the super power of \"Agility\"", "evidence": "blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id; super power of \"Agility\" refers to power_name = 'Agility'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM superhero WHERE colour = 'Blue' AND power_name = 'Agility'", + "pred": "SELECT COUNT(t1.hero_id) FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id INNER JOIN colour AS t3 ON t1.color_id = t3.id WHERE t3.color = 'Blue' AND t2.power_name = 'Agility'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 724, @@ -7969,10 +10141,13 @@ "question": "Please list the superhero names of all the superheroes that have blue eyes and blond hair", "evidence": "blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id; blond hair refers to colour = 'Blond' and hair_colour_id = colour.id; super power of \"Agility\" refers to power_name = 'Agility'", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.hero_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" WHERE t1.\"color\" = 'Blue'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id INNER JOIN colour AS t3 ON t2.color_id = t3.id WHERE t3.color IN ('Blue', 'Blond')", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 725, @@ -7980,10 +10155,13 @@ "question": "How many superheroes are published by Marvel Comics", "evidence": "published by Marvel Comics refers to publisher_name = 'Marvel Comics'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE publisher_name = 'Marvel Comics'", + "pred": "SELECT COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'Marvel Comics'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 726, @@ -7991,10 +10169,13 @@ "question": "Rank heroes published by Marvel Comics by their height in descending order", "evidence": "name refers to superhero_name; the tallest hero refers to MAX(height_cm); published by Marvel Comics refers to publisher_name = 'Marvel Comics'", "difficulty": "moderate", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.\"id\" ORDER BY t1.\"height_cm\" DESC LIMIT 1", + "pred": "SELECT t1.hero_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", "gold": "SELECT superhero_name, height_cm, RANK() OVER (ORDER BY height_cm DESC) AS heightrank FROM superhero INNER JOIN publisher ON superhero.publisher_id = publisher.id WHERE publisher.publisher_name = 'Marvel Comics'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 727, @@ -8002,10 +10183,13 @@ "question": "Who is the publisher of Sauron", "evidence": "the publisher refers to publisher_name; Sauron refers to superhero_name = 'Sauron'", "difficulty": "simple", - "pred": "SELECT t2.publisher_name FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"publisher\" WHERE t1.\"superhero_name\" = 'Sauron'", + "pred": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t1.superhero_name = 'Sauron'", "gold": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t1.superhero_name = 'Sauron'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 728, @@ -8013,10 +10197,13 @@ "question": "Rank superheroes from Marvel Comics by their eye color popularity, starting with the most common color", "evidence": "the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; most common color refers to COUNT(superhero.id) DESC;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"id\" WHERE t1.\"publisher_name\" = 'Marvel Comics' ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id INNER JOIN publisher AS t3 ON t2.publisher_id = t3.id WHERE t3.publisher_name = 'Marvel Comics' ORDER BY t1.color DESC LIMIT 1", "gold": "SELECT colour.colour AS eyecolor, COUNT(superhero.id) AS count, RANK() OVER (ORDER BY COUNT(superhero.id) DESC) AS popularityrank FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id INNER JOIN publisher ON superhero.publisher_id = publisher.id WHERE publisher.publisher_name = 'Marvel Comics' GROUP BY colour.colour", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 729, @@ -8024,10 +10211,13 @@ "question": "What is the average height of the superheroes from Marvel Comics", "evidence": "superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; average height of the superheroes refers to AVG(height_cm)", "difficulty": "simple", - "pred": "SELECT AVG(height_cm) FROM publisher WHERE publisher_name = 'Marvel Comics'", + "pred": "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'", "gold": "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'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 730, @@ -8035,10 +10225,13 @@ "question": "List the superheroes from Marvel Comics who have the super power of 'Super Strength'", "evidence": "the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; super power of \"Super Strength\" refers to power_name = 'Super Strength';", "difficulty": "challenging", - "pred": "SELECT t2.hero_name FROM hero_power AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.\"id\" WHERE t1.\"publisher\" = 'Marvel Comics' AND t3.power_name = 'Super Strength'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.hero_id INNER JOIN publisher AS t3 ON t2.publisher_id = t3.id WHERE t3.publisher_name = 'Marvel Comics' AND t2.power_name = 'Super Strength'", "gold": "SELECT superhero_name FROM superhero AS t1 WHERE EXISTS(SELECT 1 FROM hero_power AS t2 INNER JOIN superpower AS t3 ON t2.power_id = t3.id WHERE t3.power_name = 'Super Strength' AND t1.id = t2.hero_id) AND EXISTS(SELECT 1 FROM publisher AS t4 WHERE t4.publisher_name = 'Marvel Comics' AND t1.publisher_id = t4.id)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 731, @@ -8046,10 +10239,13 @@ "question": "How many superheroes did DC Comics publish", "evidence": "superheroes that DC Comics published refers to publisher_name = 'DC Comics'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE publisher_name = 'DC Comics'", + "pred": "SELECT COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'DC Comics'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 732, @@ -8057,10 +10253,13 @@ "question": "Which publisher published the slowest superhero", "evidence": "the slowest superhero refers to attribute_name = 'Speed' where MIN(attribute_value); publisher refers to publisher_name", "difficulty": "moderate", - "pred": "SELECT t2.publisher_name FROM hero_attribute AS t1 INNER JOIN publisher AS t2 ON t1.lisher_id = t2.\"id\" WHERE t1.\"attribute_name\" = 'Speed' ORDER BY COUNT(t1.attribute_value) DESC LIMIT 1", + "pred": "SELECT t3.publisher_name FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id INNER JOIN publisher AS t3 ON t2.publisher_id = t3.id WHERE t1.attribute_name = 'Speed' ORDER BY t2.attribute_value LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 733, @@ -8068,10 +10267,13 @@ "question": "How many gold-eyed superheroes did Marvel Comics publish", "evidence": "gold-eyed refers to colour = 'Gold' where eye_colour_id = colour.id; superheroes that Marvel Comics published refers to publisher_name = 'Marvel Comics'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM superhero WHERE publisher_name = 'Marvel Comics' AND eye_colour_id = 'Gold'", + "pred": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.color_id WHERE t2.publisher_name = 'Marvel Comics' AND t2.color = 'Gold'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 734, @@ -8079,10 +10281,13 @@ "question": "What is the publisher's name of Blue Beetle II", "evidence": "Blue Beetle II refers to superhero_name = 'Blue Beetle II'", "difficulty": "simple", - "pred": "SELECT publisher_name FROM superhero WHERE superhero_name = 'Blue Beetle II'", + "pred": "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'", "gold": "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'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 735, @@ -8090,10 +10295,13 @@ "question": "How many superheroes with blonde hair are there", "evidence": "superheroes with blonde hair refers to colour = 'Blond' where hair_colour_id = colour.id", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE colour = 'Blond'", + "pred": "SELECT COUNT(*) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Blond'", "gold": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.hair_colour_id = t2.id WHERE t2.colour = 'Blond'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 736, @@ -8101,10 +10309,13 @@ "question": "Who is the dumbest superhero", "evidence": "the dumbest superhero refers to MIN(attribute_value) where attribute_name = 'Intelligence'", "difficulty": "moderate", - "pred": "SELECT t2.attribute_value FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.\"hero\" WHERE t1.\"attribute_name\" = 'Intelligence'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.hero_id = t2.id INNER JOIN attribute AS t3 ON t2.attribute_id = t3.id WHERE t3.attribute_name = 'Intelligence' ORDER BY t2.attribute_value LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 737, @@ -8112,10 +10323,13 @@ "question": "What is Copycat's race", "evidence": "Copycat is the superhero_name;", "difficulty": "simple", - "pred": "SELECT race FROM race WHERE superhero_name = 'Copycat'", + "pred": "SELECT t1.race FROM race AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.race_id WHERE t2.full_name ='Copycat'", "gold": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.superhero_name = 'Copycat'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 738, @@ -8123,10 +10337,13 @@ "question": "Which superheroes have a durability attribute value of less than 50", "evidence": "durability of less than 50 refers to attribute_name = 'Durability' AND attribute_value < 50", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.hero_name FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.\"attribute_id\" = t2.\"attribute\" WHERE t1.attribute_value < 50", + "pred": "SELECT t3.hero_name FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id INNER JOIN superhero AS t3 ON t2.hero_id = t3.id WHERE t1.attribute_name = 'Durability' AND t2.attribute_value < 50", "gold": "SELECT superhero_name FROM superhero AS t1 WHERE EXISTS(SELECT 1 FROM hero_attribute AS t2 INNER JOIN attribute AS t3 ON t2.attribute_id = t3.id WHERE t3.attribute_name = 'Durability' AND t2.attribute_value < 50 AND t1.id = t2.hero_id)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 739, @@ -8134,10 +10351,13 @@ "question": "What are the names of the superheroes with the power of death touch", "evidence": "name of superheroes refers to refers to superhero_name; the power of death touch refers to power_name = 'Death Touch'", "difficulty": "moderate", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.power_id = t2.\"hero_id\" WHERE t1.\"power_name\" = 'Death Touch'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id WHERE t2.power_name = 'Death Touch'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 740, @@ -8145,10 +10365,13 @@ "question": "How many female superheroes have a strength value of 100", "evidence": "female refers to gender = 'Female'; strength value of 100 refers to attribute_name = 'Strength' AND attribute_value = 100", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM gender WHERE attribute_name = 'Strength' AND attribute_value = 100", + "pred": "SELECT COUNT(*) FROM (SELECT t2.hero_id FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id INNER JOIN gender AS t3 ON t2.gender_id = t3.id WHERE t1.attribute_name = 'Strength' AND t3.gender = 'Female' AND t2.attribute_value = 100)", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 741, @@ -8156,10 +10379,13 @@ "question": "What is the name of the superhero that has the most powers", "evidence": "name of the superhero refers to superhero_name; superhero that has the most powers refers to MAX(COUNT(superhero_name))", "difficulty": "simple", - "pred": "SELECT t2.superhero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2._id ORDER BY COUNT(t1.power_name) DESC LIMIT 1", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id GROUP BY t1.hero_name ORDER BY COUNT(t2.hero_name) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 742, @@ -8167,10 +10393,13 @@ "question": "How many vampire superheroes are there", "evidence": "vampire superheroes refers to race = 'Vampire'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM race WHERE race = 'Vampire'", + "pred": "SELECT COUNT(*) FROM race AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.race_id WHERE t1.race = 'Vampire'", "gold": "SELECT COUNT(t1.superhero_name) FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Vampire'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 743, @@ -8178,10 +10407,13 @@ "question": "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", "evidence": "published by Marvel Comics refers to publisher_name = 'Marvel Comics'; superheroes who act in their own self-interest or make decisions based on their own moral code refers to alignment = 'Bad'; calculation = MULTIPLY(DIVIDE(SUM(alignment = 'Bad); count(id)), 100)", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.alignment = 'Bad' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.id) FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.\"id\" WHERE t1.\"publisher\" = 'Marvel Comics'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.alignment = 'Bad' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'Marvel Comics'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 744, @@ -8189,10 +10421,13 @@ "question": "Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published", "evidence": "DC refers to publisher_name = 'DC Comics'; Marvel Comics refers to publisher_name = 'Marvel Comics'; calculation = SUBTRACT(SUM(publisher_name = 'Marvel Comics'), SUM(publisher_name = 'DC Comics'))", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.id) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"publisher\"", + "pred": "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 publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 745, @@ -8200,10 +10435,13 @@ "question": "Give the publisher ID of Star Trek", "evidence": "Star Trek is the publisher_name;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.publisher_name FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"publisher\"_id\" WHERE t1.\"title\" = 'Star Trek'", + "pred": "SELECT publisher_id FROM publisher WHERE publisher_name = 'Star Trek'", "gold": "SELECT id FROM publisher WHERE publisher_name = 'Star Trek'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 746, @@ -8211,10 +10449,13 @@ "question": "Calculate the average attribute value of all superheroes", "evidence": "average attribute value of all superheroes refers to AVG(attribute_value)", "difficulty": "simple", - "pred": "SELECT AVG(attribute_value) FROM attribute WHERE attribute_name = 'Superhero'", + "pred": "SELECT AVG(attribute_value) FROM hero_attribute", "gold": "SELECT AVG(attribute_value) FROM hero_attribute", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 747, @@ -8225,7 +10466,10 @@ "pred": "SELECT COUNT(*) FROM superhero WHERE full_name IS NULL", "gold": "SELECT COUNT(id) FROM superhero WHERE full_name IS NULL", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 748, @@ -8233,10 +10477,13 @@ "question": "What is the eye colour of superhero with superhero ID 75", "evidence": "eye colour refers to colour where eye_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"color\" WHERE t1.\"hero_name\" = 75", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id WHERE t2.hero_id = 75", "gold": "SELECT t2.colour FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.eye_colour_id = t2.id WHERE t1.id = 75", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 749, @@ -8244,10 +10491,13 @@ "question": "Provide the superpowers of the superhero called Deathlok", "evidence": "superpowers refers to power_name; Deathlok refers to superhero_name = 'Deathlok'", "difficulty": "simple", - "pred": "SELECT t2.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.\"hero_name\" WHERE t1.\"superpower\" = 'Deathlok'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.superhero_name = 'Deathlok'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 750, @@ -8255,10 +10505,13 @@ "question": "What is the average weight of all female superheroes", "evidence": "female refers to gender = 'Female'; average weight refers to AVG(weight_kg)", "difficulty": "simple", - "pred": "SELECT AVG(weight_kg) FROM gender WHERE gender = 'Female'", + "pred": "SELECT AVG(t1.weight_kg) FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t2.gender = 'Female'", "gold": "SELECT AVG(t1.weight_kg) FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t2.gender = 'Female'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 751, @@ -8266,10 +10519,13 @@ "question": "List down at least five superpowers of male superheroes", "evidence": "male refers to gender = 'Male'; superpowers refers to power_name;", "difficulty": "moderate", - "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN gender AS t2 ON t2.gender_id = t3.id WHERE t3.\"gender\" = 'Male'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.gender = 'Male' LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 752, @@ -8277,10 +10533,13 @@ "question": "Give the name of the alien superheroes", "evidence": "alien superheroes refers to race = 'Alien'; name of superhero refers to superhero_name;", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.\"race\" WHERE t1.\"race' = 'Alien'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Alien'", "gold": "SELECT t1.superhero_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Alien'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 753, @@ -8288,10 +10547,13 @@ "question": "Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color", "evidence": "height from 170 to 190 refers to height_cm BETWEEN 170 AND 190; no eye color refers to colour = 'No Colour'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" WHERE t1.\"height_cm\" BETWEEN 170 AND 190", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t1.height_cm BETWEEN 170 AND 190 AND t2.color = 'No Colour'", "gold": "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 = 'No Colour'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 754, @@ -8299,10 +10561,13 @@ "question": "What is the superpower of hero ID 56", "evidence": "superpower refers to hero_power", "difficulty": "simple", - "pred": "SELECT t2.hero_power FROM hero_power AS t1 INNER JOIN hero_attribute AS t2 ON t1.power_id = t2.\"hero_id\" WHERE t1.\"heroid\" = 56", + "pred": "SELECT t2.hero_name FROM hero_power AS t1 INNER JOIN superpower AS t2 ON t1.power_id = t2.id WHERE t1.hero_id = 56", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 755, @@ -8310,10 +10575,13 @@ "question": "List down at least five full name of Demi-God superheroes", "evidence": "Demi-God superheroes refers to race = 'Demi-God'", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.full_name FROM superhero AS t1 INNER JOIN race AS t2 ON t2.race_id = t3.id WHERE t3.\"race\" = 'Demi-God'", + "pred": "SELECT full_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Demi-God' LIMIT 5", "gold": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Demi-God'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 756, @@ -8321,10 +10589,13 @@ "question": "How many bad superheroes are there", "evidence": "bad superheroes refers to alignment_id = Bad", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE alignment_id = Bad", + "pred": "SELECT COUNT(*) FROM (SELECT t1.id FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2. alignment_id = 'bad' GROUP BY t1.id)", "gold": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2.alignment = 'Bad'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 757, @@ -8332,10 +10603,13 @@ "question": "Identify the race of the superhero who weighed 169 kg", "evidence": "weighed 169 kg refers to weight_kg = 169", "difficulty": "simple", - "pred": "SELECT race FROM race WHERE weight_kg = 169", + "pred": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.weight_kg = 169", "gold": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.weight_kg = 169", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 758, @@ -8343,10 +10617,13 @@ "question": "Provide the hair colour of the human superhero who is 185 cm tall", "evidence": "185 cm tall refers to height_cm = 185; human superhero refers to race = 'human'; hair colour refers to colour where hair_colour_id = colour.id;", "difficulty": "moderate", - "pred": "SELECT t3.hair_colour_id FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.\"height_cm\" = 185", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id INNER JOIN race AS t3 ON t2.race_id = t3.id WHERE t3.race = 'human' AND t2.height_cm = 185", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 759, @@ -8354,10 +10631,13 @@ "question": "What is the eye clolour of the heaviest superhero", "evidence": "the heaviest superhero refers to MAX(weight_kg); eye colour refers to colour where eye_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" ORDER BY t1.\"weight_kg\" DESC LIMIT 1", + "pred": "SELECT t2.color FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id ORDER BY t1.weight_kg DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 760, @@ -8365,10 +10645,13 @@ "question": "In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics", "evidence": "height between 150 to 180 refers to height_cm BETWEEN 150 AND 180; heroes published by Marvel Comics refers to publisher_name = 'Marvel Comics'; calculation = MULTIPLY(DIVIDE(SUM(publisher.id = 13)), COUNT(publisher.id), 100)", "difficulty": "challenging", - "pred": "SELECT CAST((SUM(CASE WHEN height_cm BETWEEN 150 AND 180 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.publisher_id = t2.id WHERE t1.\"publisher\" = 'Marvel Comics'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t2.height_cm BETWEEN 150 AND 180", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 761, @@ -8376,10 +10659,13 @@ "question": "Among the male superheroes, list the super hero names of superheroes with weight greater than the 79% average weight of all superheroes", "evidence": "super hero names refers to superhero_name;male superheros refers to gender = 'Male';Calculation = weight_kg > MULTIPLY(AVG(weight_kg), 0.79)", "difficulty": "moderate", - "pred": "SELECT t2.superhero_name FROM male AS t1 INNER JOIN superhero AS t2 ON t1.gender_id = t2.\"gender\" WHERE t1.\"weight_kg\" > 79 AND t3.gender = 'Male'", + "pred": "SELECT t1.hero_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", "gold": "SELECT t1.superhero_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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 762, @@ -8387,10 +10673,13 @@ "question": "Which power do superheroes have the most of", "evidence": "power that superheroes have the most refers to MAX(COUNT(power_name))", "difficulty": "simple", - "pred": "SELECT MAX(t2.power_name) FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id ORDER BY COUNT(t1.name) DESC LIMIT 1", + "pred": "SELECT t1.power_name FROM superpower AS t1 INNER JOIN hero_power AS t2 ON t1.id = t2.power_id GROUP BY t1.power_name ORDER BY COUNT(t2.power_name) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 763, @@ -8398,10 +10687,13 @@ "question": "Indicate the attribute value of superhero Abomination", "evidence": "Abomination refers to superhero_name = 'Abomination';", "difficulty": "simple", - "pred": "SELECT t2.attribute_value FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"hero_id\" WHERE t1.\"superhero_name\" = 'Abomination'", + "pred": "SELECT t2.attribute_value FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.hero_id WHERE t1.hero_name = 'Abomination'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 764, @@ -8409,10 +10701,13 @@ "question": "What are the superpowers of heroes with ID 1", "evidence": "superpowers refers to power_name; heroes with ID 1 refers to hero_id = 1;", "difficulty": "simple", - "pred": "SELECT power_name FROM hero_power WHERE hero_id = 1", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superpower AS t2 ON t1.power_id = t2.id WHERE t1.hero_id = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 765, @@ -8420,10 +10715,13 @@ "question": "How many heroes have stealth power", "evidence": "stealth power refers to power_name = 'stealth';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM hero_power WHERE power_name = 'stealth'", + "pred": "SELECT COUNT(*) FROM hero_power AS t1 INNER JOIN superpower AS t2 ON t1.power_id = t2.id WHERE t2.power_name ='stealth'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 766, @@ -8431,10 +10729,13 @@ "question": "What is the hero's full name with the highest attribute in strength", "evidence": "highest attribute in strength refers to MAX(attribute_value) WHERE attribute_name = 'strength';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.full_name FROM hero_attribute AS t1 INNER JOIN attribute AS t2 ON t2.attribute_id = t3.id ORDER BY t1.\"attribute_value\" DESC LIMIT 1", + "pred": "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", "gold": "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", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 767, @@ -8442,10 +10743,13 @@ "question": "What is the average of superheroes with no skin colour", "evidence": "average = DIVIDE(COUNT(superhero.id), SUM(skin_colour_id = 1)); no skin colour refers to skin_colour_id WHERE colour.id = 1;", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.skin_colour_id = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.hero_id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id <> t2.\"color\"", + "pred": "SELECT CAST(COUNT(t1.id) AS REAL) / COUNT(DISTINCT t1.skin_colour_id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.id = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 768, @@ -8453,10 +10757,13 @@ "question": "How many superheroes were published by Dark Horse Comics", "evidence": "published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE publisher_name = 'Dark Horse Comics'", + "pred": "SELECT COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'Dark Horse Comics'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 769, @@ -8464,10 +10771,13 @@ "question": "Which superhero has the most durability published by Dark Horse Comics", "evidence": "which superhero refers to superhero_name; most durability refers to MAX(attribute_value) WHERE attribute_name = 'durability'; published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';", "difficulty": "challenging", - "pred": "SELECT t2.hero_name FROM hero_attribute AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.\"id\" ORDER BY t1.\"attribute_value\" DESC LIMIT 1", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.hero_id INNER JOIN publisher AS t3 ON t2.publisher_id = t3.id WHERE t3.publisher_name = 'Dark Horse Comics' AND t2.attribute_name = 'durability' ORDER BY t2.attribute_value DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 770, @@ -8475,10 +10785,13 @@ "question": "What is the eyes colour of Abraham Sapien", "evidence": "eye colour refers to colour.colour where eye_colour_id = colour.id; Abraham Sapien is the full name of superhero;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.color FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"color\" WHERE t1.\"full_name\" = 'Abraham Sapien'", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id WHERE t2.full_name = 'Abraham Sapien'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 771, @@ -8486,10 +10799,13 @@ "question": "List the name of superheroes with flight power", "evidence": "name of superheroes refers to superhero_name; flight power refers to power_name = 'Flight';", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"hero_id\" WHERE t1.\"power_name\" = 'Flight'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id WHERE t2.power_name = 'Flight'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 772, @@ -8497,10 +10813,13 @@ "question": "List the eyes, hair and skin colour of all female superheroes published by Dark Horse Comics", "evidence": "eyes refers to eye_colour_id; hair refers to hair_colour_id; skin colour refers to skin_colour_id; female superheroes refers to gender = 'Female'; published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';", "difficulty": "challenging", - "pred": "SELECT t2.eye_colour_id, t1.hair_color_id FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.\"publisher_id\" = t2.\"id\" WHERE t1\".gender\" = 'Female' AND t2\".publisher-name = 'Dark Horse Comics'", + "pred": "SELECT t1.eye_colour_id, t1.hair_colour_id, t1.skin_colour_id FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t2.publisher_name = 'Dark Horse Comics' AND t2.gender = 'Female'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 773, @@ -8508,10 +10827,13 @@ "question": "Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero", "evidence": "which superhero refers to superhero_name; the same eyes, hair and skin colour refers to hair_colour_id = skin_colour_id AND hair_colour_id = eye_colour_id; publisher refers to publisher_name;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.lisher_id = t2.\"id\" WHERE t1.\"hair_colour_id\" = 'Hair'", + "pred": "SELECT t1.hero_name, t3.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id INNER JOIN color AS t3 ON t1.color_id = t3.id WHERE t3.publisher_name = 'publisher'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 774, @@ -8519,10 +10841,13 @@ "question": "Which group does superhero A-Bomb belong to", "evidence": "group refers to race; A-Bomb refers to superhero_name = 'A-Bomb';", "difficulty": "simple", - "pred": "SELECT race FROM race WHERE superhero_name = 'A-Bomb'", + "pred": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.superhero_name = 'A-Bomb'", "gold": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.superhero_name = 'A-Bomb'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 775, @@ -8530,10 +10855,13 @@ "question": "What is the percentage of blue female superheroes among all female superheroes", "evidence": "percentage = MULTIPLY(DIVIDE(SUM(colour = 'Blue' WHERE gender = 'Female'), COUNT(gender = 'Female')), 100); blue refers to the color = 'Blue' WHERE skin_colour_id = colour.id; female refers to gender = 'Female';", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM gender AS t1 INNER JOIN superhero AS t2 ON t1.gender_id = t2.id", + "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 776, @@ -8541,10 +10869,13 @@ "question": "Provide the hero name and race of Charles Chandler", "evidence": "hero name refers to superhero_name; Charles Chandler is the full name of superhero;", "difficulty": "simple", - "pred": "SELECT t1.hero_name, t2.race_id FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.\"hero_id\" = t2.\"hero\" WHERE t3.full_name = 'Charles Chandler'", + "pred": "SELECT t1.hero_name, t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.full_name = 'Charles Chandler'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 777, @@ -8552,10 +10883,13 @@ "question": "What is the gender of Agent 13 hero", "evidence": "Agent 13 hero refers to superhero_name = 'Agent 13';", "difficulty": "simple", - "pred": "SELECT t2.gender FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.\"id\" WHERE t1.\"hero_name\" = 'Agent 13'", + "pred": "SELECT t2.gender FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t1.superhero_name = 'AGENT 13'", "gold": "SELECT t2.gender FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t1.superhero_name = 'Agent 13'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 778, @@ -8563,10 +10897,13 @@ "question": "Provide superheroes' names who have the adaptation power", "evidence": "adaptation power refers to power_name = 'Adaptation';", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"hero_id\" WHERE t1.\"power_name\" = 'Adaptation'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id WHERE t2.power_name = 'Adaptation'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 779, @@ -8574,10 +10911,13 @@ "question": "How many powers does Amazo hero have", "evidence": "Amazo hero refers to superhero_name = 'Amazo';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM hero_power WHERE superhero_name = 'Amazo'", + "pred": "SELECT COUNT(t2.power_name) FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.id = t2.hero_id WHERE t1.superhero_name = 'Amazo'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 780, @@ -8585,10 +10925,13 @@ "question": "List the powers of Hunter Zolomon", "evidence": "Hunter Zolomon is the full name of superhero; list the powers refers to power_name;", "difficulty": "simple", - "pred": "SELECT t2.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.\"hero_name\" WHERE t1.\"full-name\" = 'Hunter Zolomon'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.full_name = 'Hunter Zolomon'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 781, @@ -8596,10 +10939,13 @@ "question": "Provide the heights of the heroes whose eye colours are amber", "evidence": "heights of the heroes refers to height_cm; eye colours are amber refers to colour.colour = 'Amber' WHERE eye_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT height_cm FROM colour WHERE colour = 'Amber'", + "pred": "SELECT t3.height_cm FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id INNER JOIN superhero AS t3 ON t2.hero_id = t3.id WHERE t1.color = 'Amber'", "gold": "SELECT t1.height_cm FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.eye_colour_id = t2.id WHERE t2.colour = 'Amber'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 782, @@ -8607,10 +10953,13 @@ "question": "List the heroes' names whose eyes and hair colours are both black", "evidence": "heroes' names refers to superhero_name; eyes and hair colours are both black refers to eye_colour_id AND hair_colour_id WHERE colour.colour = 'Black';", "difficulty": "moderate", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"color\" WHERE t1.\"eye_colour\" = 'Black'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Black'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 783, @@ -8618,10 +10967,13 @@ "question": "Provide the eye colours of the heroes whose skin colours are gold", "evidence": "skin colours are gold refers to colour.colour = 'Gold' WHERE skin_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" WHERE t1.\"colour\" = 'Gold'", + "pred": "SELECT t1.eye_color FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Gold'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 784, @@ -8629,10 +10981,13 @@ "question": "Provide the full names of vampire heroes", "evidence": "vampire heroes refers to race = 'Vampire';", "difficulty": "simple", - "pred": "SELECT full_name FROM race WHERE race = 'Vampire'", + "pred": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Vampire'", "gold": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t2.race = 'Vampire'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 785, @@ -8640,10 +10995,13 @@ "question": "Describe the names of neutral alignment superheroes", "evidence": "names of superheroes refers to superhero_name; neutral alignment refers to alignment = 'Neutral';", "difficulty": "simple", - "pred": "SELECT t3.hero_name FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.id = t2.alignment_id WHERE t1.\" alignment\" = 'Neutral'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2. alignment = 'Neutral'", "gold": "SELECT t1.superhero_name FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2.alignment = 'Neutral'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 786, @@ -8651,10 +11009,13 @@ "question": "How many heroes have the highest attribute value in strength", "evidence": "highest attribute value in strength refers to MAX(attribute_value) WHERE attribute_name = 'Strength';", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM hero_attribute WHERE attribute_name = 'Strength' ORDER BY attribute_value DESC LIMIT 1", + "pred": "SELECT COUNT(*) FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id WHERE t1.attribute_name = 'Strength'", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 787, @@ -8662,10 +11023,13 @@ "question": "What are the race and alignment of Cameron Hicks", "evidence": "Cameron Hicks refers to superhero_name = 'Cameron Hicks';", "difficulty": "simple", - "pred": "SELECT t1.race, t2.alignment FROM superhero AS t1 INNER JOIN race AS t2 ON t1.\"race_id\" = t2.\"race\" WHERE t2\".superhero_name\" = 'Cameron Hicks'", + "pred": "SELECT t2.race, t2.alignment FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.superhero_name = 'Cameron Hicks'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 788, @@ -8673,10 +11037,13 @@ "question": "How many percent of female heroes were published by Marvel Comics", "evidence": "percent = MULTIPLY(DIVIDE(SUM(gender = 'Female' WHERE publisher_name = 'Marvel Comics'), COUNT(publisher_name = 'Marvel Comics')), 100); female heroes refers to gender = 'Female'; Marvel Comics refers to publisher_name = 'Marvel Comics';", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.publisher_name) FROM male AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.\"hero\"", + "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 789, @@ -8684,10 +11051,13 @@ "question": "Find the average weight of the heroes who are aliens", "evidence": "average = AVG(weight_kg); aliens refers to race = 'Alien';", "difficulty": "simple", - "pred": "SELECT AVG(weight_kg) FROM race WHERE race = 'Alien'", + "pred": "SELECT AVG(t2.weight_kg) FROM race AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.race_id WHERE t1.race = 'Alien'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 790, @@ -8695,10 +11065,13 @@ "question": "Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight", "evidence": "difference = SUBTRACT(SUM(weight_kg WHERE full_name = 'Emil Blonsky'), SUM(weight_kg WHERE full_name = 'Charles Chandler')); Emil Blonsky is the full name of superhero; Charles Chandler is the full name of superhero;", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN full_name = 'Emil Blonsky' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM superhero", + "pred": "SELECT SUM(IIF(full_name = 'Emil Blonsky', 1, 0)) - SUM(IIF(full_name = 'Charles Chandler', 1, 0)) FROM superhero", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 791, @@ -8706,10 +11079,13 @@ "question": "Calculate the average height for each superhero", "evidence": "average = DIVIDE(SUM(height_cm), COUNT(all heros));", "difficulty": "simple", - "pred": "SELECT AVG(height_cm) FROM hero_attribute GROUP BY hero_id ORDER BY height_cm DESC LIMIT 1", + "pred": "SELECT AVG(height_cm) FROM superhero", "gold": "SELECT CAST(SUM(height_cm) AS REAL) / COUNT(id) FROM superhero", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 792, @@ -8717,10 +11093,13 @@ "question": "What is Abomination's superpower", "evidence": "Abomination refers to superhero_name = 'Abomination'; superpower refers to power_name;", "difficulty": "simple", - "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t2.hero_id = t3.id WHERE t3.\"hero_name\" = 'Abomination'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.hero_name = 'Abomination'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 793, @@ -8728,10 +11107,13 @@ "question": "Among the superheroes with the race of god/eternal, how many of them are male", "evidence": "race \"god/eternal\" refers to race_id = 21; male refers to gender.id = 1", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE race_id = 21 AND gender = 1", + "pred": "SELECT COUNT(*) FROM gender AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.gender_id INNER JOIN race AS t3 ON t2.race_id = t3.id WHERE t3.race_id = 21 AND t1.gender = 'Male'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 794, @@ -8739,10 +11121,13 @@ "question": "Which hero was the fastest", "evidence": "which hero refers to superhero_name; fastest refers to MAX(attribute_value) WHERE attribute_name = 'Speed';", "difficulty": "moderate", - "pred": "SELECT t2.hero_name FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.attribute_id = t2.\"hero_id\" WHERE t1.\"attribute_name\" = 'Speed'", + "pred": "SELECT t1.hero_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", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 795, @@ -8750,10 +11135,13 @@ "question": "How many superheroes have a neutral alignment", "evidence": "neutral alignment refers to alignment_id = 3;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE alignment_id = 3", + "pred": "SELECT COUNT(*) FROM (SELECT t1.id FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2. alignment = 3 GROUP BY t1.id)", "gold": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2.alignment = 'Neutral'", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 796, @@ -8761,10 +11149,13 @@ "question": "State all of 3-D Man's attributes along with their values", "evidence": "3-D Man is the superhero_name. attributes refers to attribute_name; values refers to attribute_value;", "difficulty": "moderate", - "pred": "SELECT attribute_name, attribute_value FROM attribute WHERE attributes_name = '3-D Man'", + "pred": "SELECT t1.attribute_name, t2.attribute_value FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id WHERE t1.superhero_name = '3-D Man'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 797, @@ -8772,10 +11163,13 @@ "question": "Which superheroes have blue eyes with brown hair", "evidence": "which superheroes refers to superhero_name; blue eyes refers to color = 'Blue' and color.id = eye_colour_id; brown hair refers to color = 'Brown' and color.id = hair_colour_id;", "difficulty": "moderate", - "pred": "SELECT t3.hero_name FROM superhero AS t1 INNER JOIN color AS t2 ON t1.color_id = t2.id WHERE t1.\"color\" = 'Blue'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN color AS t2 ON t1.color_id = t2.id WHERE t2.color IN ('Blue', 'Brown')", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 798, @@ -8783,10 +11177,13 @@ "question": "What is the publisher for Hawkman, Karate Kid and Speedy", "evidence": "publisher refers to publisher_name; Hawkman refers to superhero_name = 'Hawkman'; Karate Kid refers to superhero_name = 'Karate Kid'; Speedy refers to superhero_name = 'Speedy';", "difficulty": "moderate", - "pred": "SELECT t2.publisher_name FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"publisher\"_id WHERE t1.\"heroic_name\" = 'Hawkman' AND t1\".superhero_name = 'Speedy'", + "pred": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t1.hero_name IN ('Hawkman', 'Karate Kid')", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 799, @@ -8794,10 +11191,13 @@ "question": "How many superheroes didn't have any publisher", "evidence": "didn't have any publisher refers to publisher.id = 1;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM superhero WHERE publisher_id = 1", + "pred": "SELECT COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t2.id = 1", "gold": "SELECT COUNT(t1.id) FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t2.id = 1", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 800, @@ -8805,10 +11205,13 @@ "question": "Calculate the percentage of superheroes with blue eyes", "evidence": "percentage = MULTIPLY(DIVIDE(SUM(superhero_name WHERE color = 'Blue'), COUNT(superhero_name)), 100.0); blue eyes refers to color = 'Blue' and color.id = eye_colour_id = 7;", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN color = 'Blue' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM superhero AS t1 INNER JOIN color AS t2 ON t1.color_id = t2.id", + "pred": "SELECT CAST(SUM(IIF(t2.color = 'Blue', 1, 0)) AS REAL) * 100 / COUNT(t1.hero_name) FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 801, @@ -8816,10 +11219,13 @@ "question": "Find the ratio between male superheroes and female superheroes", "evidence": "ratio = DIVIDE(SUM(gender_id = 1) / SUM(gender_id = 2)); male superheroes refers to gender = 'Female'; female superheroes refers to gender = 'Male';", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(gender_id = 2) FROM male", + "pred": "SELECT CAST(SUM(IIF(gender = 'Female', 1, 0)) AS REAL) / SUM(IIF(gender = 'Male', 1, 0)) FROM superhero", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 802, @@ -8827,10 +11233,13 @@ "question": "Who is the tallest superhero", "evidence": "who refers to superhero_name; tallest superhero refers to MAX(height_cm);", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN height_cm AS t2 ON t1.height_cm = (SELECT MAX(height_ cm) FROM superhero)", + "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN actor AS t2 ON t1.hero_id = t2.id ORDER BY t1.height_cm DESC LIMIT 1", "gold": "SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 803, @@ -8838,10 +11247,13 @@ "question": "What is the power ID of cryokinesis", "evidence": "power ID refers to superpower.id; cryokinesis refers to power_name = 'cryokinesis';", "difficulty": "simple", - "pred": "SELECT t2.power_id FROM hero_power AS t1 INNER JOIN superpower AS t2 ON t1.hero_id = t2.\"hero_power\" WHERE t1.\"power_name\" = 'cryokinesis'", + "pred": "SELECT t1.power_id FROM hero_power AS t1 INNER JOIN superpower AS t2 ON t1.power_id = t2.id WHERE t2.power_name = 'cryokinesis'", "gold": "SELECT id FROM superpower WHERE power_name = 'Cryokinesis'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 804, @@ -8849,10 +11261,13 @@ "question": "Provide the name of superhero with superhero ID 294", "evidence": "name of superhero refers to superhero_name; superhero ID 294 refers to superhero.id = 294;", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.\"hero_id\" WHERE t1.\"heroid\" = 294", + "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t1.id = 294", "gold": "SELECT superhero_name FROM superhero WHERE id = 294", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 805, @@ -8860,10 +11275,13 @@ "question": "List the full names of superheroes with missing weight", "evidence": "missing weight refers to weight_kg = 0 OR weight_kg = NULL;", "difficulty": "simple", - "pred": "SELECT t2.full_name FROM superhero AS t1 INNER JOIN person AS t2 ON t1.person_id = t2.\"person\" WHERE t1.\"weight_kg\" = 0", + "pred": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.weight_kg = 0 OR t2.weight_kg = NULL", "gold": "SELECT DISTINCT full_name FROM superhero WHERE NOT full_name IS NULL AND (weight_kg IS NULL OR weight_kg = 0)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 806, @@ -8871,10 +11289,13 @@ "question": "Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name", "evidence": "eye colour refers to colour.colour where eye_colour_id = colour.id; Karen Beecher-Duncan is the full name of superhero;", "difficulty": "simple", - "pred": "SELECT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"color\" WHERE t1.\"full_name\" = 'Karen Beecher-Duncan'", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id WHERE t2.full_name = 'KAREN Beecher-Duncan'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 807, @@ -8882,10 +11303,13 @@ "question": "What is the superpowers of the superhero has Helen Parr as their full name", "evidence": "superpowers refers to power_name; Helen Parr is the full name of superhero;", "difficulty": "simple", - "pred": "SELECT t2.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.\"hero\" WHERE t1.\"full_name\" = 'Helen Parr'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.full_name = 'Helen Parr'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 808, @@ -8893,10 +11317,13 @@ "question": "Find the race of the superhero who weighs 108kg and is 188cm tall", "evidence": "weighs 108kg refers to weight_kg = 108; 188cm tall refers to height_cm = 188;", "difficulty": "simple", - "pred": "SELECT t2.race FROM superhero AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.\"race\" WHERE t1.\"weight_kg\" = 108 AND t1\"height_cm = 188", + "pred": "SELECT 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", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 809, @@ -8904,10 +11331,13 @@ "question": "What is the publisher name of the superhero ID 38", "evidence": "superhero ID 38 refers to superhero.id = 38;", "difficulty": "simple", - "pred": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.id = t2.\"publisher\" WHERE t1.\"id\" = 38", + "pred": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t1.id = 38", "gold": "SELECT t2.publisher_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t1.id = 38", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 810, @@ -8915,10 +11345,13 @@ "question": "What is the race of the superhero with maximum attribute value", "evidence": "maximum attribute value refers to MAX(attribute_value);", "difficulty": "simple", - "pred": "SELECT t2.race FROM race AS t1 INNER JOIN hero_attribute AS t2 ON t1.race_id = t2.\"race\" GROUP BY t1.\"race\", t2\" ORDER BY t2\".attribute_value\" DESC LIMIT 1", + "pred": "SELECT t2.race FROM hero_attribute AS t1 INNER JOIN race AS t2 ON t1.race_id = t2.id WHERE t1.attribute_value = (SELECT MAX(attribute_value) FROM hero_attribute)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 811, @@ -8926,10 +11359,13 @@ "question": "Give the alignment and superpowers of the superhero named Atom IV", "evidence": "superpowers refers to power_name;", "difficulty": "simple", - "pred": "SELECT t1.alignment_name, t2.superpowers FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.\"hero_id\" = t2.\"hero\" WHERE t1\".power_name\" = ' Atom IV'", + "pred": "SELECT t3. alignment, t3.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.id = t2.hero_id INNER JOIN alignment AS t3 ON t2.alignment_id = t3.id WHERE t1.hero_name = 'Antonio IV'", "gold": "SELECT t4.alignment, 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 alignment AS t4 ON t1.alignment_id = t4.id WHERE t1.superhero_name = 'Atom IV'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 812, @@ -8937,10 +11373,13 @@ "question": "List down at least five full names of superheroes with blue eyes", "evidence": "blue eyes refers to colour.colour = 'Blue' WHERE eye_colour_id = colour.id; Name of superheroes refers to superhero_name;", "difficulty": "simple", - "pred": "SELECT t2.full_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" WHERE t1.\"colour\" = 'Blue'", + "pred": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Blue' LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 813, @@ -8948,10 +11387,13 @@ "question": "Calculate the average attribute value of all neutral superheroes", "evidence": "average = AVG(attribute_value); neutral superheroes refers to alignment_id = 3;", "difficulty": "simple", - "pred": "SELECT AVG(attribute_value) FROM attribute WHERE alignment_id = 3", + "pred": "SELECT CAST(SUM(t2.attribute_value) AS REAL) / COUNT(*) FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.hero_id = t2.hero_id WHERE t1. alignment_id = 3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 814, @@ -8959,10 +11401,13 @@ "question": "List the skin colour of the superheroes with 100 attribute value", "evidence": "skin colour refers to colour.colour where skin_colour_id = colour.id; 100 attribute value refers to attribute_value = 100;", "difficulty": "moderate", - "pred": "SELECT t2.colour FROM hero_attribute AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.\"id\" WHERE t1.\"attribute_value\" = 100", + "pred": "SELECT t2.color FROM hero_attribute AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t1.attribute_value = 100", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 815, @@ -8970,10 +11415,13 @@ "question": "Count the good female superheroes", "evidence": "good refers to alignment.id = 1; female refers to gender.id = 2;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM gender AS t1 INNER JOIN alignment AS t2 ON t1.gender_id = t2.id WHERE t3.gender = 2", + "pred": "SELECT COUNT(*) FROM (SELECT t1.id FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t2.gender = 'Female' GROUP BY t1.id) AS t3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 816, @@ -8981,10 +11429,13 @@ "question": "Provide the names of superheroes with attribute value between 75 to 80", "evidence": "names of superheroes refers to superhero_name; attribute value between 75 to 80 refers to attribute_value BETWEEN 75 AND 80;", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.\"hero_id\" WHERE t1.\"attribute_value\" BETWEEN 75 AND 80", + "pred": "SELECT t2.hero_name FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t1.attribute_value BETWEEN 75 AND 80", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 817, @@ -8992,10 +11443,13 @@ "question": "Give the race of the blue-haired male superhero", "evidence": "blue-haired refers to colour.colour = 'blue' WHERE hair_colour_id = colour.id; male refers to gender = 'male';", "difficulty": "moderate", - "pred": "SELECT t2.race FROM male AS t1 INNER JOIN superhero AS t2 ON t1.gender_id = t2.\"id\" WHERE t1.\"gender\" = 'Male' AND t1\"gender = 'Female'", + "pred": "SELECT t1.race FROM race AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.race_id INNER JOIN gender AS t3 ON t2.gender_id = t3.id WHERE t3.gender = 'Male' AND t1.color = 'blue'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 818, @@ -9003,10 +11457,13 @@ "question": "Among the bad superheroes, what is the percentage of female superheroes", "evidence": "bad superheroes refers to alignment.id = 2; percentage = MULTIPLY(DIVIDE(SUM(gender.id = 2 WHERE alignment.id = 2), COUNT(alignment.id = 2)), 100.0); female refers to gender.id = 2;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM gender AS t1 INNER JOIN alignment AS t2 ON t1.gender_id = 2", + "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM gender AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.gender_id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 819, @@ -9014,10 +11471,13 @@ "question": "In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color", "evidence": "missing weight data refers to weight_kg = 0 OR T1.weight_kg = NULL; difference = SUBTRACT(SUM(colour.id = 7), SUM(colour.id = 1)); blue eyes refers to eye_colour_id WHERE colour.id = 7; no eye color refers to eye_colour_id WHERE colour.id = 1;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.weight_kg = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.eye_colour_id) FROM superhero AS t1 INNER JOIN colour AS t2 ON t2.color_id = t3.id WHERE t1.\"weight\" = 1", + "pred": "SELECT SUM(CASE WHEN t1.color = 7 THEN 1 ELSE 0 END) - SUM(CASE WHEN t1.color = 1 THEN 1 ELSE 0 END) FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 820, @@ -9025,10 +11485,13 @@ "question": "How strong is the Hulk", "evidence": "how strong refers to attribute_value WHERE attribute_name = 'Strength'; the Hulk refers to superhero_name = 'Hulk';", "difficulty": "moderate", - "pred": "SELECT t2.attribute_value FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.\"hero\" WHERE t1.\"superhero_name\" = 'Hulk'", + "pred": "SELECT t2.attribute_value FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.hero_id WHERE t1.superhero_name = 'Hulk'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 821, @@ -9036,10 +11499,13 @@ "question": "List down Ajax's superpowers", "evidence": "Ajax refers to superhero_name = 'Ajax'; superpowers refers to power_name;", "difficulty": "simple", - "pred": "SELECT t2.power_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.\"hero_name\" WHERE t1.\"superhero\" = 'Ajax'", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.superhero_name = 'Ajax'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 822, @@ -9047,10 +11513,13 @@ "question": "How many green-skinned villains are there in the superhero universe", "evidence": "green-skinned refers to colour.colour = 'Green' WHERE skin_colour_id = colour.id; villains refers to alignment = 'Bad';", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM superhero WHERE colour = 'Green' AND alignment = 'Bad'", + "pred": "SELECT COUNT(*) FROM (SELECT t1.name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.color = 'Green') AS t3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 823, @@ -9058,10 +11527,13 @@ "question": "How many female superheroes are in Marvel Comics", "evidence": "female refers to gender = 'Female'; Marvel Comics refers to publisher_name = 'Marvel Comics';", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM superhero WHERE gender = 'Female' AND publisher_name = 'Marvel Comics'", + "pred": "SELECT COUNT(*) FROM (SELECT t1.id FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id WHERE t2.publisher_name = 'Marvel Comics' AND t1.gender = 'Female' GROUP BY t1.id) AS t3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 824, @@ -9069,10 +11541,13 @@ "question": "Identify superheroes who can control wind and list their names in alphabetical order", "evidence": "superheroes refers to superhero_name; can control wind refers to power_name = 'Wind Control';", "difficulty": "moderate", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.power_id = t2.\"hero_id\" WHERE t1.\"power_name\" = 'Wind Control'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id WHERE t2.power_name = 'Wind Control' GROUP BY t1.hero_name ORDER BY COUNT(t1.hero_name) ASC", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 825, @@ -9080,10 +11555,13 @@ "question": "Identify the gender of the superhero who has the ability of Phoenix Force", "evidence": "ability of Phoenix Force refers to power_name = 'Phoenix Force';", "difficulty": "moderate", - "pred": "SELECT t2.gender FROM hero_power AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.\"id\" WHERE t1.\"power_name\" = 'Phoenix Force'", + "pred": "SELECT t2.gender FROM hero_power AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.id WHERE t1.power_name = 'Phoenix Force'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 826, @@ -9091,10 +11569,13 @@ "question": "Identify the heaviest superhero in DC Comics", "evidence": "heaviest refers to MAX(weight_kg); DC Comics refers to publisher_name = 'DC Comics'; superhero refers to superhero_name;", "difficulty": "simple", - "pred": "SELECT t3.hero_name FROM superhero AS t1 INNER JOIN publisher AS t2 ON t1.publisher_id = t2.id ORDER BY t1.\"weight_kg\" DESC LIMIT 1", + "pred": "SELECT t2.hero_name FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'DC Comics' ORDER BY t2.weight_kg DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 827, @@ -9102,10 +11583,13 @@ "question": "What is the average height of a non-human superhero in Dark Horse Comics", "evidence": "average = AVG(height_cm); non-human superhero refers to race <> 'Human'; Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';", "difficulty": "moderate", - "pred": "SELECT AVG(height_cm) FROM superhero WHERE race <> 'Human' AND publisher_name = 'Dark Horse Comics'", + "pred": "SELECT AVG(t3.height_cm) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id INNER JOIN race AS t3 ON t2.race_id = t3.id WHERE t1.publisher_name = 'Dark Horse Comics' AND t3.race <> 'Human'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 828, @@ -9113,10 +11597,13 @@ "question": "Count the fastest superheroes", "evidence": "fastest refers to attribute_value = 100 WHERE attribute_name = 'Speed';", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.attribute_id = t2.\"attribute_value\" WHERE t1.\"attribute\" = 'Speed'", + "pred": "SELECT COUNT(*) FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.attribute_id WHERE t1.attribute_name = 'Speed'", "gold": "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' AND t1.attribute_value = 100", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 829, @@ -9124,10 +11611,13 @@ "question": "Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes", "evidence": "DC refers to publisher_name = 'DC Comics'; Marvel Comics refers to publisher_name = 'Marvel Comics'; difference = SUBTRACT(SUM(publisher_name = 'DC Comics'), SUM(publisher_name = 'Marvel Comics'));", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.lisher_id = t2.\"id\"", + "pred": "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), SUM(CASE WHEN t2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 830, @@ -9135,10 +11625,13 @@ "question": "Identify the weakest attribute of the Black Panther", "evidence": "weakest attribute refers to attribute_name WHERE MIN(attribute_value); Black Panther refers to superhero_name = 'Black Panther';", "difficulty": "moderate", - "pred": "SELECT t2.attribute_name FROM attribute AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.\"id\" WHERE t1.\"superhero_name\" = 'Black Panther' ORDER BY t2._attribute_value DESC LIMIT 1", + "pred": "SELECT t2.attribute_name FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.hero_id WHERE t1.superhero_name = 'Black Panther' ORDER BY t2.attribute_value LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 831, @@ -9146,10 +11639,13 @@ "question": "What is Abomination's eye colour", "evidence": "Abomination refers to superhero_name = 'Abomination'; eye colour refers to colour.colour where eye_colour_id = colour.id;", "difficulty": "simple", - "pred": "SELECT t2.eye_colour FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"id\" WHERE t1.\"heroic_name\" = 'Abomination'", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id WHERE t2.superhero_name = 'Abomination'", "gold": "SELECT t2.colour FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.eye_colour_id = t2.id WHERE t1.superhero_name = 'Abomination'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 832, @@ -9157,10 +11653,13 @@ "question": "Name the tallest superhero", "evidence": "tallest superhero refers to MAX(height_cm);", "difficulty": "simple", - "pred": "SELECT MAX(height_cm) FROM superhero ORDER BY height_cm DESC LIMIT 1", + "pred": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN height_cm AS t2 ON t1.id = t2.height_cm ORDER BY t2.height_cm DESC LIMIT 1", "gold": "SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 833, @@ -9168,10 +11667,13 @@ "question": "Name the superhero, otherwise known as Charles Chandler", "evidence": "name the superhero refers to superhero_name; Charles Chandler is the full name of superhero;", "difficulty": "simple", - "pred": "SELECT t2.hero_name FROM superhero AS t1 INNER JOIN person AS t2 ON t1.person_id = t2.\"person\" WHERE t1.\"full_name\" = 'Charles Chandler'", + "pred": "SELECT t1.hero_name FROM superhero AS t1 INNER JOIN person AS t2 ON t1.person_id = t2.id WHERE t2.full_name = 'Charles Chandler'", "gold": "SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 834, @@ -9179,10 +11681,13 @@ "question": "Among all superheroes created by George Lucas, identify the percentage of female superheroes", "evidence": "created by George Lucas refers to publisher_name = 'George Lucas'; percentage = MULTIPLY(DIVIDE(SUM(gender = 'Female' WHERE publisher_name = 'George Lucas'), COUNT(publisher_name = 'George Lucas')), 100.0); female refers to gender = 'Female';", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.publisher_name = 'George Lucas' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.gender) FROM superhero AS t1 INNER JOIN gender AS t2 ON t1.gender_id = t2.\"gender\"", + "pred": "SELECT CAST(SUM(CASE WHEN t2.gender = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'George Lucas'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 835, @@ -9190,10 +11695,13 @@ "question": "Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes", "evidence": "Marvel Comics refers to publisher_name = 'Marvel Comics'; percentage = MULTIPLY(DIVIDE(SUM(alignment = 'Good' WHERE publisher_name = 'Marvel Comics'), COUNT(publisher_name = 'Marvel Comics')), 100.0); good superheroes refers to alignment = 'Good';", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.\"id\" WHERE t1.\"alignment\" = 'Good'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.alignment = 'Good' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM publisher AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.publisher_id WHERE t1.publisher_name = 'Marvel Comics'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 836, @@ -9204,7 +11712,10 @@ "pred": "SELECT COUNT(*) FROM superhero WHERE full_name LIKE 'John%'", "gold": "SELECT COUNT(id) FROM superhero WHERE full_name LIKE 'John%'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 837, @@ -9212,10 +11723,13 @@ "question": "Give the hero ID of superhero with the lowest attribute value", "evidence": "lowest attribute value refers to MIN(attribute_value);", "difficulty": "simple", - "pred": "SELECT t2.hero_id FROM attribute AS t1 INNER JOIN hero_attribute AS t2 ON t1.attribute_id = t2.\"attribute\"_id ORDER BY t1.\"attribute_value\" DESC LIMIT 1", + "pred": "SELECT t1.hero_id FROM hero_attribute AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id ORDER BY t1.attribute_value LIMIT 1", "gold": "SELECT hero_id FROM hero_attribute WHERE attribute_value = (SELECT MIN(attribute_value) FROM hero_attribute)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 838, @@ -9226,7 +11740,10 @@ "pred": "SELECT full_name FROM superhero WHERE name = 'Alien'", "gold": "SELECT full_name FROM superhero WHERE superhero_name = 'Alien'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 839, @@ -9234,10 +11751,13 @@ "question": "In superheroes with weight less than 100, list the full name of the superheroes with brown eyes", "evidence": "weight less than 100 refers to weight_kg < 100", "difficulty": "simple", - "pred": "SELECT full_name FROM superhero WHERE weight_kg < 100", + "pred": "SELECT t1.full_name FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.color_id = t2.id WHERE t2.weight_kg < 100 AND t1.brown ='superhero'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 840, @@ -9245,10 +11765,13 @@ "question": "List the attribute value of the superhero named Aquababy", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.attribute_value FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.hero_id = t2.\"hero\" WHERE t1.\"full_name\" = 'Aquababy'", + "pred": "SELECT t2.attribute_value FROM superhero AS t1 INNER JOIN hero_attribute AS t2 ON t1.id = t2.hero_id WHERE t1.full_name = 'Aquababy'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 841, @@ -9256,10 +11779,13 @@ "question": "Provide the weight and race of the superhero with superhero ID 40", "evidence": "weight refers to weight_kg; superhero ID 40 refers to superhero.id = 40;", "difficulty": "simple", - "pred": "SELECT t1.weight_kg, t2.race_id FROM superhero AS t1 INNER JOIN race AS t2 ON t1.\"race\"_id = t2.\"id\" WHERE t2\".hero_id\" = 40", + "pred": "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", "gold": "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", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 842, @@ -9267,10 +11793,13 @@ "question": "Calculate the average height of all neutral superheroes", "evidence": "", "difficulty": "simple", - "pred": "SELECT AVG(height_cm) FROM superhero WHERE gender = 'neutral'", + "pred": "SELECT AVG(t1.height_cm) FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2.gender ='neutral'", "gold": "SELECT AVG(t1.height_cm) FROM superhero AS t1 INNER JOIN alignment AS t2 ON t1.alignment_id = t2.id WHERE t2.alignment = 'Neutral'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 843, @@ -9278,10 +11807,13 @@ "question": "List the hero ID of superheroes have intellegence as their power", "evidence": "hero ID refers to superhero.id; have intelligence as their power refers to power_name = 'Intelligence';", "difficulty": "simple", - "pred": "SELECT hero_id FROM hero_power WHERE power_name = 'Intelligence'", + "pred": "SELECT t1.hero_id FROM superhero AS t1 INNER JOIN hero_power AS t2 ON t1.hero_id = t2.id WHERE t2.power_name = 'Intelligence'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 844, @@ -9289,10 +11821,13 @@ "question": "Give the eye colour of Blackwulf", "evidence": "eye colour refers to colour.colour where eye_colour_id = colour.id; Blackwulf refers to superhero_name = 'Blackwulf';", "difficulty": "simple", - "pred": "SELECT t2.eye_colour_id FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.id = t2.\"color\" WHERE t1.\"heroic_name\" = 'Blackwulf'", + "pred": "SELECT t1.color FROM colour AS t1 INNER JOIN superhero AS t2 ON t1.id = t2.color_id WHERE t2.hero_name = 'Blackwulf'", "gold": "SELECT t2.colour FROM superhero AS t1 INNER JOIN colour AS t2 ON t1.eye_colour_id = t2.id WHERE t1.superhero_name = 'Blackwulf'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 845, @@ -9300,10 +11835,13 @@ "question": "List the power of superheroes with height greater than 80% of the average height of all superheroes", "evidence": "power of superheroes refers to power_name; height greater than 80% of the average height of all superheroes = height_cm > MULTIPLY(AVG(height_cm), 0.8);", "difficulty": "moderate", - "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t2.hero_id = t3.id WHERE t1.\"height_cm\" > 80", + "pred": "SELECT t1.power_name FROM hero_power AS t1 INNER JOIN superhero AS t2 ON t1.hero_id = t2.id WHERE t2.height_cm * 100 > (SELECT AVG(height_cm) FROM superhero) * 80", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 846, @@ -9311,10 +11849,13 @@ "question": "Please list the reference names of the drivers who are eliminated in the first period in race number 20", "evidence": "driver reference name refers to driverRef; first qualifying period refers to q1; drivers who are eliminated in the first qualifying period refers to 5 drivers with MAX(q1); race number refers to raceId;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverref FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q1\" = 20", + "pred": "SELECT t1.driverref FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 20 ORDER BY t2.q1 DESC LIMIT 5", "gold": "SELECT t2.driverref FROM qualifying AS t1 INNER JOIN drivers AS t2 ON t2.driverid = t1.driverid WHERE t1.raceid = 20 ORDER BY t1.q1 DESC LIMIT 5", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 847, @@ -9322,10 +11863,13 @@ "question": "What is the surname of the driver with the best lap time in race number 19 in the second qualifying period", "evidence": "race number refers to raceId; second qualifying period refers to q2; best lap time refers to MIN(q2);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q2\" = 19 ORDER BY t2._q2 DESC LIMIT 1", + "pred": "SELECT t1. surname FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 19 ORDER BY t2.q2 LIMIT 1", "gold": "SELECT t2.surname FROM qualifying AS t1 INNER JOIN drivers AS t2 ON t2.driverid = t1.driverid WHERE t1.raceid = 19 ORDER BY t1.q2 ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 848, @@ -9333,10 +11877,13 @@ "question": "Please list the year during which the race is held on circuits in Shanghai", "evidence": "Shanghai is a name of location;", "difficulty": "simple", - "pred": "SELECT year FROM races WHERE location = 'Shanghai'", + "pred": "SELECT t1.year FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.location = 'Shanghai'", "gold": "SELECT t2.year FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.location = 'Shanghai'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 849, @@ -9344,10 +11891,13 @@ "question": "Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found", "evidence": "introduction of races refers to url; Circuit de Barcelona-Catalunya is a name of circuit;", "difficulty": "simple", - "pred": "SELECT url FROM races WHERE name = 'Circuit de Barcelona-Catalunya'", + "pred": "SELECT t1.url FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Circuit de Barcelona-Catalunya'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 850, @@ -9355,10 +11905,13 @@ "question": "Please give the name of the race held on the circuits in Germany", "evidence": "Germany is a name of country;", "difficulty": "simple", - "pred": "SELECT name FROM races WHERE country = 'Germany'", + "pred": "SELECT t1.name FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.country = 'Germany'", "gold": "SELECT DISTINCT t2.name FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.country = 'Germany'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 851, @@ -9366,10 +11919,13 @@ "question": "Please list the positions of the circuits built by the constructor Renault", "evidence": "Renault is a name of constructor;", "difficulty": "simple", - "pred": "SELECT position FROM circuits WHERE name = 'Renault'", + "pred": "SELECT t1.position FROM circuits AS t1 INNER JOIN constructorstandings AS t2 ON t1.circuitid = t2.circuitid INNER JOIN constructors AS t3 ON t2.constructorid = t3.constructorid WHERE t3.name = 'Rouanne'", "gold": "SELECT DISTINCT t1.position FROM constructorstandings AS t1 INNER JOIN constructors AS t2 ON t2.constructorid = t1.constructorid WHERE t2.name = 'Renault'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 852, @@ -9377,10 +11933,13 @@ "question": "How many races in the year 2010 are held on grand prixs outside Asia and Europe", "evidence": "", "difficulty": "moderate", - "pred": "SELECT COUNT(raceid) FROM races WHERE year = 2010 AND location = 'Asia' AND grand prixs = 'Europe'", + "pred": "SELECT COUNT(raceid) FROM races WHERE year = 2010 AND location IN ('Asia', 'Europe')", "gold": "SELECT COUNT(t3.raceid) FROM circuits AS t1 INNER JOIN races AS t3 ON t3.circuitid = t1.circuitid WHERE NOT t1.country IN ('Bahrain', 'China', 'Singapore', 'Japan', 'Korea', 'Turkey', 'UAE', 'Malaysia', 'Spain', 'Monaco', 'Azerbaijan', 'Austria', 'Belgium', 'France', 'Germany', 'Hungary', 'Italy', 'UK') AND t3.year = 2010", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 853, @@ -9388,10 +11947,13 @@ "question": "Please give the names of the races held on the circuits in Spain", "evidence": "Spain is a name of country;", "difficulty": "simple", - "pred": "SELECT name FROM races WHERE country = 'Spain'", + "pred": "SELECT t1.name FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.country = 'Spain'", "gold": "SELECT DISTINCT t2.name FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.country = 'Spain'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 854, @@ -9399,10 +11961,13 @@ "question": "What is the coordinates location of the circuits for Australian grand prix", "evidence": "coordinate position/location refers to lat, lng; circuits for Australian grand prix refers to races.name = 'Australian Grand Prix'", "difficulty": "simple", - "pred": "SELECT lat, lng FROM races WHERE name = 'Australian Grand Prix'", + "pred": "SELECT t1.lat, t1.lng FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Australian Grand Prix'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 855, @@ -9413,7 +11978,10 @@ "pred": "SELECT url FROM races WHERE name = 'Sepang International Circuit'", "gold": "SELECT DISTINCT t1.url FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.name = 'Sepang International Circuit'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 856, @@ -9421,10 +11989,13 @@ "question": "Please list the time of the races held on Sepang International Circuit", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.time FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.\"circuit\"id WHERE t1.\"name\" = 'Sepang International Circuit'", + "pred": "SELECT t1.time FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Sepang International Circuit'", "gold": "SELECT DISTINCT t2.time FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.name = 'Sepang International Circuit'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 857, @@ -9432,10 +12003,13 @@ "question": "Give the coordinate position for Abu Dhabi Grand Prix", "evidence": "coordinate position/location refers to lat, lng; Abu Dhabi Grand Prix refers to races.name = 'Abu Dhabi Grand Prix'", "difficulty": "simple", - "pred": "SELECT lat, lng FROM races WHERE name = 'Abu Dhabi Grand Prix'", + "pred": "SELECT t1.lat, t1.lng FROM races AS t1 INNER JOIN teams AS t2 ON t1.raceid = t2.raceid WHERE t1.name = 'Abu Dhabi Grand Prix'", "gold": "SELECT DISTINCT t1.lat, t1.lng FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t2.name = 'Abu Dhabi Grand Prix'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 858, @@ -9443,10 +12017,13 @@ "question": "Which country is the constructor which got 1 point in the race No. 24 from", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT t2.country FROM race AS t1 INNER JOIN constructorresults AS t2 ON t1.raceid = t2.\"raceid\" WHERE t1.\"points\" = 1 AND t1\" = 24", + "pred": "SELECT t2.country FROM races AS t1 INNER JOIN constructors AS t2 ON t1.raceid = t2.raceid WHERE t1.raceid = 24 AND t1.points = 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 859, @@ -9454,10 +12031,13 @@ "question": "What's Bruno Senna's Q1 result in the qualifying race No. 354", "evidence": "race number refers to raceId; Bruno Senna refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;", "difficulty": "simple", - "pred": "SELECT t2.raceid FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q1\" = 354", + "pred": "SELECT t1.q1 FROM drivers AS t1 INNER JOIN results AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 354 AND t1.firstname = 'Bruno' AND t1.lastname = 'Senna'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 860, @@ -9465,10 +12045,13 @@ "question": "For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT t2.country FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q2\" = 0:01:40", + "pred": "SELECT t1.ethnicity FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.q2 = 0:01:40 AND t2.raceid = 355", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 861, @@ -9476,10 +12059,13 @@ "question": "What is his number of the driver who finished 0:01:54 in the Q3 of qualifying race No.903", "evidence": "race number refers to raceId; finished 0:0M:SS in the Q3 refers to q3 LIKE 'M:SS%'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.raceid FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q3\" LIKE 'M:SS%'", + "pred": "SELECT t1.raceid FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.q3 LIKE 'M:SS%' AND t2.raceid = 903", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 862, @@ -9487,10 +12073,13 @@ "question": "For the Bahrain Grand Prix in 2007, how many drivers not finished the game", "evidence": "Bahrain Grand Prix refers to races.name = 'Bahrain Grand Prix'; drivers who finished the race refers to time is not empty (i.e. time IS NOT NULL);", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM races WHERE name = 'Bahrain Grand Prix' AND time IS NULL", + "pred": "SELECT COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.name = 'Bahrain Grand Prix' AND t1.time IS NULL", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 863, @@ -9498,10 +12087,13 @@ "question": "Show me the season page of year when the race No. 901 took place", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT seasonid FROM races WHERE raceid = 901", + "pred": "SELECT t1.year FROM races AS t1 INNER JOIN seasons AS t2 ON t1.raceid = t2.year WHERE t1.raceid = 901", "gold": "SELECT t2.url FROM races AS t1 INNER JOIN seasons AS t2 ON t2.year = t1.year WHERE t1.raceid = 901", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 864, @@ -9509,10 +12101,13 @@ "question": "For the race happened on 2015/11/29, how many drivers finished the game", "evidence": "game and race are synonyms; drivers who finished the race should have record in time;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM driver AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.raceid WHERE t1.\"date\" = '2015-11-29' AND t2.\"raceid\" = (SELECT DISTINCT CASE WHEN raceid IS NULL THEN 1 ELSE 0 END)", + "pred": "SELECT COUNT(DISTINCT t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.time = '2015-11-29'", "gold": "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 NOT t2.time IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 865, @@ -9520,10 +12115,13 @@ "question": "For all the drivers who finished the game in race No. 592, who is the oldest", "evidence": "drivers who finished the race refers to time is not empty (i.e. time IS NOT NULL); race number refers to raceId; date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.dob FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"raceid\" = 592", + "pred": "SELECT t1.dob FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 592 ORDER BY t2.time ASC LIMIT 1", "gold": "SELECT t1.forename, t1.surname FROM drivers AS t1 INNER JOIN results AS t2 ON t2.driverid = t1.driverid WHERE t2.raceid = 592 AND NOT t2.time IS NULL AND NOT t1.dob IS NULL ORDER BY t1.dob ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 866, @@ -9531,10 +12129,13 @@ "question": "Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website", "evidence": "player and driver are synonyms; the lap time of 0:0M:SS refers to lapTime.time LIKE 'M:SS%';race number refers to raceId; introduction website of the drivers refers to url;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"racetime\" LIKE 'M:SS%'", + "pred": "SELECT t1.firstname, t1.lastname, t1.url FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 161 AND t2.time LIKE 'M:SS%'", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 867, @@ -9542,10 +12143,13 @@ "question": "For the driver who set the fastest lap speed in race No.933, where does he come from", "evidence": "fastest lap speed refers to MAX(fastestLapSpeed);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.driverref FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"fastestlapspeed\" DESC LIMIT 1", + "pred": "SELECT t2.firstname, t2.lastname FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid WHERE t1.raceid = 933 ORDER BY t2.speedlapspeed DESC LIMIT 1", "gold": "SELECT t1.nationality FROM drivers AS t1 INNER JOIN results AS t2 ON t2.driverid = t1.driverid WHERE t2.raceid = 933 AND NOT t2.fastestlaptime IS NULL ORDER BY t2.fastestlapspeed DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 868, @@ -9553,10 +12157,13 @@ "question": "Where is Malaysian Grand Prix held? Give the location coordinates", "evidence": "location coordinates refers to (lat, lng); Malaysian Grand Prix refers to races.name = 'Malaysian Grand Prix'", "difficulty": "simple", - "pred": "SELECTlat, lng FROM races WHERE name = 'Malaysian Grand Prix'", + "pred": "SELECT t1.lat, t1.lng FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.name = 'Malaysian Grand Prix'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 869, @@ -9564,10 +12171,13 @@ "question": "For the constructor which got the highest point in the race No. 9 , what is its introduction website", "evidence": "race number refers to raceId; constructor which got the highest point refers to MAX(constructorResults.points); introduction website of the constructor refers to url;", "difficulty": "moderate", - "pred": "SELECT url FROM constructorresults WHERE raceid = 9 ORDER BY points DESC LIMIT 1", + "pred": "SELECT t1.url FROM constructors AS t1 INNER JOIN races AS t2 ON t1.constructorid = t2.constructorid WHERE t2.raceid = 9 ORDER BY t2.points DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 870, @@ -9575,10 +12185,13 @@ "question": "What's Lucas di Grassi's Q1 result in the race No. 345", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT t2.raceid FROM drivers AS t1 INNER JOIN results AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q1\" = 'Lucas di Grassi'", + "pred": "SELECT t2.q1 FROM drivers AS t1 INNER JOIN results AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lucas' AND t1.lastname = 'Di Grassi' AND t2.raceid = 345", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 871, @@ -9586,10 +12199,13 @@ "question": "For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT t2.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"q2\" = 0:01:15", + "pred": "SELECT t1.raceid FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 347 AND t2.q2 = 0:01:15", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 872, @@ -9597,10 +12213,13 @@ "question": "In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code", "evidence": "race number refers to raceId; had the Q3 time as 0:0M:SS refers to q3 LIKE 'M:SS%'", "difficulty": "simple", - "pred": "SELECT code FROM drivers WHERE q3 LIKE 'M:SS%' AND q2 LIKE '0:01:33'", + "pred": "SELECT t1.code FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 45 AND t2.q3 LIKE 'M:SS%'", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 873, @@ -9608,10 +12227,13 @@ "question": "What is the actual finish time for Bruce McLaren in the race No.743", "evidence": "race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT t2.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Bruce McLaren'", + "pred": "SELECT t2.time FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 743 AND t1.firstname = 'Bruce' AND t1.lastname = 'McLochlan'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 874, @@ -9619,10 +12241,13 @@ "question": "Who finished second in the San Marino Grand Prix in 2006", "evidence": "finished second refers to position = 2;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.position FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"position\" = 2", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.position = 2 AND t2.year = 2006", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 875, @@ -9630,10 +12255,13 @@ "question": "Show me the season page of year when the race No. 901 took place", "evidence": "the season page refers to url; race number refers to raceId;", "difficulty": "simple", - "pred": "SELECT url FROM races WHERE year = 901", + "pred": "SELECT t1.url FROM races AS t1 INNER JOIN seasons AS t2 ON t1.raceid = t2.year WHERE t1.raceid = 901", "gold": "SELECT t2.url FROM races AS t1 INNER JOIN seasons AS t2 ON t2.year = t1.year WHERE t1.raceid = 901", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 876, @@ -9641,10 +12269,13 @@ "question": "For the race happened in 2015/11/29, how many drivers did not finish the game", "evidence": "game and race are synonyms; drivers who didn't finish the race should have record in time;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE raceid = (SELECT 2015/11/29 FROM drivers) AND raceid < (SELECT raceid FROM driver)", + "pred": "SELECT COUNT(DISTINCT t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.time = '2015-11-29'", "gold": "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 NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 877, @@ -9652,10 +12283,13 @@ "question": "For all the drivers who finished the game in race No. 872, who is the youngest", "evidence": "race number refers to raceId; drivers who finished the race refers to time has value; the youngest is a driver where MAX(dob);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"raceid\" = 872 ORDER BY t2._dob DESC LIMIT 1", + "pred": "SELECT t1.driverid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 872 ORDER BY t1.dob DESC LIMIT 1", "gold": "SELECT t1.forename, t1.surname FROM drivers AS t1 INNER JOIN results AS t2 ON t2.driverid = t1.driverid WHERE t2.raceid = 872 AND NOT t2.time IS NULL ORDER BY t1.dob DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 878, @@ -9663,10 +12297,13 @@ "question": "Who was the driver that got the best lap time in the race No. 348? Give his full name", "evidence": "race number refers to raceId; the best lap time refers to MIN(time)", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.firstname, t2.lastname FROM drivers AS t1 INNER JOIN racecars AS t2 ON t1.\"driverid\" = t2.\"drivers\" WHERE t1\"raceid = 348 ORDER BY t1\".time\" DESC LIMIT 1", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 348 ORDER BY t2.time LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 879, @@ -9674,10 +12311,13 @@ "question": "For the driver who set the fastest lap speed, what is his nationality", "evidence": "the fastest lap speed refers to (MAX) fastestLapSpeed;", "difficulty": "moderate", - "pred": "SELECT t2.country FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"speed\" DESC LIMIT 1", + "pred": "SELECT t2.country FROM laptimes AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid ORDER BY t1.speedlapspeed DESC LIMIT 1", "gold": "SELECT t1.nationality FROM drivers AS t1 INNER JOIN results AS t2 ON t2.driverid = t1.driverid ORDER BY t2.fastestlapspeed DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 880, @@ -9685,10 +12325,13 @@ "question": "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", "evidence": "Paul di Resta refers to the full name of the driver; Full name of the driver refers to drivers.forename ='Paul' and drivers.surname = 'di Resta'; race number refers to raceId; percentage = DIVIDE(SUBTRACT(fastestLapSpeed(raceId = 853), (fastestLapSpeed (raceId = 854)) * 100 , (fastestLapSpeed(raceId = 853))", "difficulty": "challenging", - "pred": "SELECT CAST(SUBSTRING(CASE WHEN t2.raceid = 853 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driversid = t2.\"driverid\" WHERE t1.\"firstname\" = 'Paul' AND t3.lastname = 'di Resta'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.raceid = 853 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t2.raceid = 853 THEN 1 ELSE 0 END) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Paul' AND t1.lastname = 'di Resta'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 881, @@ -9696,10 +12339,13 @@ "question": "For the drivers who took part in the race in 1983/7/16, what's their race completion rate", "evidence": "DIVIDE(COUNT(driverid when time has value ), (COUNT(driverid )) as percentage; in 1983/7/16 refers to when date = '1983-07-16'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.date = '1983-07-16' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"date\" = '1984-07%'", + "pred": "SELECT CAST(SUM(raceid) AS REAL) * 100 / SUM(raceid) FROM races WHERE date = '1983-07-16'", "gold": "SELECT CAST(COUNT(CASE WHEN NOT t2.time IS 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 882, @@ -9707,10 +12353,13 @@ "question": "Which year was the first Singapore Grand Prix", "evidence": "the first race refers to race happened in min(year);", "difficulty": "simple", - "pred": "SELECT year FROM races WHERE year = (SELECT MIN(year) FROM races)", + "pred": "SELECT year FROM races WHERE name = 'Singapore Grand Prix' ORDER BY year ASC LIMIT 1", "gold": "SELECT year FROM races WHERE name = 'Singapore Grand Prix' ORDER BY year ASC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 883, @@ -9718,10 +12367,13 @@ "question": "How many races were there in 2005? Name all the races in descending order", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(raceid) FROM races WHERE year = 2005", + "pred": "SELECT COUNT(*) FROM races WHERE year = 2005 GROUP BY raceid ORDER BY COUNT(raceid) DESC", "gold": "SELECT name FROM races WHERE year = 2005 ORDER BY name DESC", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 884, @@ -9729,10 +12381,13 @@ "question": "List the names of all races that occurred in the earliest recorded year and month", "evidence": "earliest recorded year and month refers to year = year(min(date)) and month = month(min(date));", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.name FROM races AS t1 INNER JOIN events AS t2 ON t1.raceid = t2.\"raceid\" ORDER BY t1.\"date\" DESC LIMIT 1", + "pred": "SELECT name FROM races WHERE year = (SELECT MIN(date) FROM races) AND month = (SELECT MIN(date) FROM races)", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 885, @@ -9743,7 +12398,10 @@ "pred": "SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1", "gold": "SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 886, @@ -9751,10 +12409,13 @@ "question": "Which year has the most number of races", "evidence": "the most number of races refers to max(round);", "difficulty": "simple", - "pred": "SELECT year FROM races ORDER BY round DESC LIMIT 1", + "pred": "SELECT year FROM races WHERE round = (SELECT MAX(round) FROM races)", "gold": "SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 887, @@ -9762,10 +12423,13 @@ "question": "Name the races in year 2017 that are not hosted in year 2000", "evidence": "not hosted means not in;", "difficulty": "simple", - "pred": "SELECT name FROM races WHERE year = 2017 AND not hosted", + "pred": "SELECT name FROM races WHERE year = 2000 AND NOT name IN (SELECT name FROM races WHERE year = 2000)", "gold": "SELECT name FROM races WHERE year = 2017 AND NOT name IN (SELECT name FROM races WHERE year = 2000)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 888, @@ -9773,10 +12437,13 @@ "question": "In which country was the first European Grand Prix hosted? Name the circuit and location", "evidence": "the first refers to min(year);", "difficulty": "simple", - "pred": "SELECT t2.country, t1.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.\"circuitid\" = t2.\"circuitsid\" WHERE t1\".name\" = 'European Grand Prix' ORDER BY t2._year DESC LIMIT 1", + "pred": "SELECT name, location FROM circuits WHERE year = (SELECT MIN(year) FROM races)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 889, @@ -9784,10 +12451,13 @@ "question": "When was the last f1 season whereby Brands Hatch hosted the British Grand Prix", "evidence": "the last refers to max(year);", "difficulty": "simple", - "pred": "SELECT MAX(year) FROM seasons WHERE name = 'B Brands Hatch'", + "pred": "SELECT MAX(year) FROM races WHERE name = 'Restaurant Hatch'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 890, @@ -9795,10 +12465,13 @@ "question": "How many seasons has Silverstone Circuit hosted the United Kindom grand prix", "evidence": "British Grand Prix is the name of race; British refers to the United Kindom", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM races WHERE name = 'Silverstone Circuit'", + "pred": "SELECT COUNT(t1.year) FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'British Grand Prix' AND t2.name = 'Silverstone Circuit'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 891, @@ -9806,10 +12479,13 @@ "question": "Name all drivers in the 2010 Singapore Grand Prix order by their position stands", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.driverid FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1. driverid = t2.\"driverid\" WHERE t1.\"position\" = 'Positive'", + "pred": "SELECT t1.firstname, t1.lastname, t1.position FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = '2010 Singapore Grand Prix'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 892, @@ -9817,10 +12493,13 @@ "question": "State the driver with the most points scored. Find his full name with that points", "evidence": "the most points scored refers to max(points); Full name of the driver refers to drivers.forename and drivers.surname;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverref FROM drivers AS t1 INNER JOIN driver AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"points\" DESC LIMIT 1", + "pred": "SELECT t1.driverid, t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1.driverid = t2.driverid ORDER BY t2.points DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 893, @@ -9828,10 +12507,13 @@ "question": "Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.driverid, t1.points FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t1\".name\" = '2017 Chinese Grand Prix'", + "pred": "SELECT t1.driverid, t2.points FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.year = 2017 GROUP BY t1.driverid, t2.points ORDER BY t2.points DESC LIMIT 3", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 894, @@ -9839,10 +12521,13 @@ "question": "What is the best lap time recorded? List the driver and race with such recorded lap time", "evidence": "the best lap time refers to min(milliseconds); List the driver refers to drivers.forename and drivers.surname; List the race refers to races.name", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverid, t1.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.\"driverid\" = t2\".driverid ORDER BY t2.\"milliseconds\" DESC LIMIT 1", + "pred": "SELECT t1.raceid, t1.firstname, t1.lastname, t1.raceid FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid ORDER BY t2.min(t2.milliseconds) ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 895, @@ -9850,10 +12535,13 @@ "question": "What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix", "evidence": "average lap time = AVG(milliseconds); 'Lewis Hamilton' refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname; 'Malaysian Grand Prix' refers to races.name = 'Malaysian Grand Prix'", "difficulty": "moderate", - "pred": "SELECT AVG(t1.lapspeed) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driversid WHERE t2.\"name\" = 'Lewis Hamilton' AND t1.\"raceid\" = 2009 AND t3.name = 'Malaysian Grand Prix'", + "pred": "SELECT AVG(t1.latitude) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.raceid = t2.raceid WHERE t1.name = 'Malaysian Grand Prix' AND t2.firstname = 'Lewis' AND t2.lastname = 'Hamilton' AND t1.year = 2009", "gold": "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 = 'Lewis' AND t3.surname = 'Hamilton' AND t1.year = 2009 AND t1.name = 'Malaysian Grand Prix'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 896, @@ -9861,10 +12549,13 @@ "question": "Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010", "evidence": "percentage = DIVIDE(COUNT(raceId) where surname = 'Hamilton' and position>1), (COUNT(raceId) where surname = 'Hamilton'); since 2010 refers to year >= 2010", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.name = 'Hamilton' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.raceid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.\"driverid\" = t2.driverid WHERE t2.\"year\" >= 2010", + "pred": "SELECT CAST(SUM(CASE WHEN t1.position > 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.raceid) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid INNER JOIN circuits AS t3 ON t1.circuitid = t3.circuitid WHERE t2.name = 'Hamilton' AND t1.year >= 2010", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 897, @@ -9872,10 +12563,13 @@ "question": "Name the driver with the most winning. Mention his nationality and what is his maximum point scores", "evidence": "Full name of the driver refers to drivers.forename and drivers.surname; the most winning refers to MAX(COUNT(wins)); average point scores refers to MAX(points);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.firstname, t2.lastname, MAX(t2.points) FROM drivers AS t1 INNER JOIN driver AS t2 ON t1.\"driverid\" = t2.\"drivers\"", + "pred": "SELECT t1.firstname, t1.lastname, MAX(t2.wins), MAX(t2.points) FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1.driverid = t2.driverid GROUP BY t1.firstname, t1.lastname, t2.lastname, t2.surname ORDER BY COUNT(t2.wins) DESC LIMIT 1", "gold": "SELECT t1.forename, t1.surname, t1.nationality, MAX(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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 898, @@ -9883,10 +12577,13 @@ "question": "How old is the youngest Japanese driver? What is his name", "evidence": "date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa; Japanese refers to nationality = 'Japanese'; age = YEAR(CURRENT_TIMESTAMP) - YEAR(dob);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM drivers AS t1 INNER JOIN driver AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"country\" = 'Japan' AND t1\"gender = 'Japanese'", + "pred": "SELECT STRFTIME('%Y', dob) - STRFTIME('%Y', dob) FROM drivers WHERE nationality = 'Japanese'", "gold": "SELECT STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', dob), forename, surname FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 899, @@ -9894,10 +12591,13 @@ "question": "List circuits which host 4 f1 races from year 1990 to 2000", "evidence": "from year 1990 to 2000 refers to year(date) between 1990 and 2000;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.raceid FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.\"raceid\" WHERE STRFTIME('%Y', t1.\"date\") BETWEEN 1990 AND 2000", + "pred": "SELECT t1.name FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE STRFTIME('%Y', t2.date) BETWEEN '1990' AND '2000' GROUP BY t1.name", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 900, @@ -9905,10 +12605,13 @@ "question": "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", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.name, t1.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.\"circuitid\" = t2.\"raceid\" WHERE t1\".name\" = 'F1' AND t3.raceid = 2006", + "pred": "SELECT t1.name, t1.location FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t2.year = 2006 AND t2.f1 = 'f1'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 901, @@ -9916,10 +12619,13 @@ "question": "Name the races along with its circuit name and location for f1 races hosted in September 2005", "evidence": "in September 2005 refers to MONTH(date) = 9 and YEAR(date) = 2005", "difficulty": "simple", - "pred": "SELECT t1.name, t2.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.\"circuitid\" = t2.\"circuitsid\" WHERE t2\"date\" = 'September 2005' AND t2(\"date\") = '2005' AND STRFTIME('%Y', t2) = '%Y'", + "pred": "SELECT t1.name, t2.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE STRFTIME('%Y', t1.date) = '9' AND STRFTIME('%Y', t1.date) = '2005'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 902, @@ -9927,10 +12633,13 @@ "question": "Which race was Alex Yoong in when he was in track number less than 20", "evidence": "Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;track number less than 10 refers to position < 20", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"position\" < 20", + "pred": "SELECT t1.raceid FROM races AS t1 INNER JOIN drivers AS t2 ON t1.raceid = t2.raceid WHERE t2.firstname = 'Alex' AND t2.lastname = 'Yeeong' AND t1.position < 20", "gold": "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 < 20", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 903, @@ -9938,10 +12647,13 @@ "question": "How many times did Michael Schumacher won from races hosted in Sepang International Circuit", "evidence": "win from races refers to max(points)", "difficulty": "moderate", - "pred": "SELECT MAX(points) FROM races WHERE name = 'Michael Schumacher'", + "pred": "SELECT COUNT(t2.points) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Michael' AND t1.lastname = 'Schumacher' AND t2.name = 'Sepang International Circuit'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 904, @@ -9949,10 +12661,13 @@ "question": "State the race and year of race in which Michael Schumacher had his fastest lap", "evidence": "fastest lap refers to min(milliseconds); Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.raceid, t1.year FROM drivers AS t1 INNER JOIN races AS t2 ON t1.\"driverid\" = t2.\"driver\" ORDER BY t3.milliseconds DESC LIMIT 1", + "pred": "SELECT t1.raceid, t1.year FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE t2.firstname = 'Michael' AND t2.lastname = 'Schumacher' ORDER BY t1.milliseconds ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 905, @@ -9960,10 +12675,13 @@ "question": "What is Eddie Irvine's average points scored in year 2000", "evidence": "average points = AVG(points where year = 2000)", "difficulty": "simple", - "pred": "SELECT AVG(points) FROM drivers WHERE year = 2000", + "pred": "SELECT AVG(t2.points) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Eddie' AND t1.lastname = 'Irvine' AND t2.year = 2000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 906, @@ -9971,10 +12689,13 @@ "question": "Which was Lewis Hamilton first race? What was his points recorded for his first race event", "evidence": "first race refers to min(Year); Lewis Hamiltonrefers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;", "difficulty": "moderate", - "pred": "SELECT t2.points FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"first race\" = 'Lewis Hamilton' ORDER BY t2._points DESC LIMIT 1", + "pred": "SELECT t1.raceid, t2.points FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE t2.first = 'Lewis' AND t2.last = 'Hamilton' ORDER BY t1.year LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 907, @@ -9982,10 +12703,13 @@ "question": "List all races in 2017 and the hosting country order by date of the event", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.date, t1.countryorder FROM races AS t1 INNER JOIN events AS t2 ON t1.\"events\"id = t2.\"raceid\"", + "pred": "SELECT t1.raceid, t1.country, t2.date FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.year = 2017 GROUP BY t1.raceid, t1.country ORDER BY t2.date DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 908, @@ -9993,10 +12717,13 @@ "question": "What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.raceid, t1.year, t3.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.\"circuitid\" = t2.\"courseid\" WHERE t3.\"name\" = 'F1'", + "pred": "SELECT t1.raceid, t1.year, t2.location FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.lapspeed = (SELECT MAX(lapspeed) FROM races)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 909, @@ -10004,10 +12731,13 @@ "question": "Among all European Grand Prix races, what is the percentage of the races were hosted in Germany", "evidence": "European Grand Prix races refers to races.name = 'European Grand Prix';percentage = divide(COUNT(races where country = Germany and name = 'Europearn Grand Prix'),COUNT(races where name = 'Europearn Grand Prix'))*100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.name = 'Europearn Grand Prix' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.raceid) FROM races AS t1 INNER JOIN circuits AS t2 ON t1.courseid = t2.\"raceid\"", + "pred": "SELECT CAST(SUM(IIF(t2.country = 'Germany', 1, 0)) AS REAL) * 100 / COUNT(t1.raceid) FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.name = 'Europearn Grand Prix'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 910, @@ -10015,10 +12745,13 @@ "question": "What's the location coordinates of Silverstone Circuit", "evidence": "location coordinates refers to (lat, lng); Silverstone Circuit refers to circuits.name = 'Silverstone Circuit'", "difficulty": "simple", - "pred": "SELECTlat, lng FROM circuits WHERE name = 'Silverstone Circuit'", + "pred": "SELECT t1.lat, t1.lng FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t1.name = 'Silverstone Circuit'", "gold": "SELECT lat, lng FROM circuits WHERE name = 'Silverstone Circuit'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 911, @@ -10026,10 +12759,13 @@ "question": "Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring", "evidence": "higher latitude refers to max(lat)", "difficulty": "simple", - "pred": "SELECT t2.lat FROM circuits AS t1 INNER JOIN latitude AS t2 ON t1.lat = t2.\"lat\" WHERE t1.\"name\" = 'Silverstone Circuit' ORDER BY t1\"lat DESC LIMIT 1", + "pred": "SELECT name FROM circuits WHERE name IN ('Silverstone', 'Hockenheimring') OR name IN ('Hungaroring') ORDER BY lat DESC LIMIT 1", "gold": "SELECT name FROM circuits WHERE name IN ('Silverstone Circuit', 'Hockenheimring', 'Hungaroring') ORDER BY lat DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 912, @@ -10037,10 +12773,13 @@ "question": "What's the reference name of Marina Bay Street Circuit", "evidence": "reference name refers to circuitRef; Marina Bay Street Circuit refers to circuits.name = 'Marina Bay Street Circuit'", "difficulty": "simple", - "pred": "SELECT t2.circuitref FROM circuits AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"circuitid\" WHERE t1.\"name\" = 'Marina Bay Street Circuit'", + "pred": "SELECT t1.circuitref FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t1.name = 'Marina Bay Street Circuit'", "gold": "SELECT circuitref FROM circuits WHERE name = 'Marina Bay Street Circuit'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 913, @@ -10048,10 +12787,13 @@ "question": "In which country can I find the circuit with the highest altitude", "evidence": "highest altitude refers to max(alt)", "difficulty": "simple", - "pred": "SELECT t2.country FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.\"circuit id\" ORDER BY t1.\"alt\" DESC LIMIT 1", + "pred": "SELECT country FROM circuits WHERE alt = (SELECT MAX(alt) FROM circuits)", "gold": "SELECT country FROM circuits ORDER BY alt DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 914, @@ -10059,10 +12801,13 @@ "question": "How many drivers don't have a code", "evidence": "don't have a code refers to code is null", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE code IS NULL", + "pred": "SELECT COUNT(*) FROM drivers WHERE code IS NULL", "gold": "SELECT COUNT(driverid) - COUNT(CASE WHEN NOT code IS NULL THEN code END) FROM drivers", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 915, @@ -10070,10 +12815,13 @@ "question": "Which country is the oldest driver from", "evidence": "date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa;", "difficulty": "simple", - "pred": "SELECT t2.country FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"date\" = '2016' AND t1\"name = 'Dob'", + "pred": "SELECT country FROM drivers WHERE dob = (SELECT MAX(dob) FROM drivers)", "gold": "SELECT nationality FROM drivers WHERE NOT dob IS NULL ORDER BY dob ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 916, @@ -10081,10 +12829,13 @@ "question": "Please list the surnames of all the Italian drivers", "evidence": "Italian refers to nationality = 'italian'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM drivers AS t1 INNER JOIN driver AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"country\" = 'italian'", + "pred": "SELECT surname FROM drivers WHERE nationality = 'italian'", "gold": "SELECT surname FROM drivers WHERE nationality = 'Italian'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 917, @@ -10092,10 +12843,13 @@ "question": "Which website should I go to if I want to know more about Anthony Davidson", "evidence": "website refers to url", "difficulty": "simple", - "pred": "SELECT url FROM races WHERE name = 'Anthony Davidson'", + "pred": "SELECT url FROM people AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE t1.firstname = 'Anthony' AND t1.lastname = 'Davidson'", "gold": "SELECT url FROM drivers WHERE forename = 'Anthony' AND surname = 'Davidson'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 918, @@ -10103,10 +12857,13 @@ "question": "What's Lewis Hamilton's reference name", "evidence": "reference name refers to driverRef", "difficulty": "simple", - "pred": "SELECT t2.driverref FROM drivers AS t1 INNER JOIN driver AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton'", + "pred": "SELECT driverref FROM drivers WHERE firstname = 'Lewis' AND lastname = 'Hamilton'", "gold": "SELECT driverref FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 919, @@ -10114,10 +12871,13 @@ "question": "Which circuit did the 2009 Spanish Grand Prix use", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.circuitref FROM circuits AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"circuitid\" WHERE t1.\"name\" = '2009 Spanish Grand Prix'", + "pred": "SELECT t2.name FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.year = 2009 AND t1.name = 'Spanish Grand Prix'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 920, @@ -10125,10 +12885,13 @@ "question": "Please list all the years that Silverstone Circuit was used in a Formula_1 race", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.year FROM races AS t1 INNER JOIN circuits AS t2 ON t2.circuitid = t3.raceid WHERE t4.name = 'Silverstone Circuit'", + "pred": "SELECT t1.year FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Silverstone Circuit'", "gold": "SELECT DISTINCT t2.year FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.name = 'Silverstone Circuit'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 921, @@ -10136,10 +12899,13 @@ "question": "Please give more information about the Formula_1 races that used the Silverstone Circuit", "evidence": "more information refers to url", "difficulty": "simple", - "pred": "SELECT url FROM races WHERE name = 'Silverstone Circuit'", + "pred": "SELECT t1.url FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Silverstone'", "gold": "SELECT DISTINCT t1.url FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.name = 'Silverstone Circuit'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 922, @@ -10147,10 +12913,13 @@ "question": "What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.time FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = '2010' AND t1\"place = 'Abu Dhabi Circuit'", + "pred": "SELECT t2.time FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t1.year = 2010 AND t1.name = 'Abu Dhabi Circuit'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 923, @@ -10158,10 +12927,13 @@ "question": "How many Formula_1 races took place on the circuits in Italy", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM races WHERE name = 'Formula_1' AND location = 'Italy'", + "pred": "SELECT COUNT(t2.raceid) FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t1.country = 'Italy' AND t2.name = 'Formula_1'", "gold": "SELECT COUNT(t2.circuitid) FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.country = 'Italy'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 924, @@ -10169,10 +12941,13 @@ "question": "Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit", "evidence": "", "difficulty": "simple", - "pred": "SELECT DATE(date) FROM races WHERE name = 'Formula_1'", + "pred": "SELECT t1.date FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Formula_1'", "gold": "SELECT t2.date FROM circuits AS t1 INNER JOIN races AS t2 ON t2.circuitid = t1.circuitid WHERE t1.name = 'Circuit de Barcelona-Catalunya'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 925, @@ -10180,10 +12955,13 @@ "question": "Please give the link of the website that shows more information about the circuits the Spanish Grand Prix used in 2009", "evidence": "link of the website refers to url", "difficulty": "simple", - "pred": "SELECT url FROM circuits WHERE year = 2009 AND url = 'Spanish Grand Prix'", + "pred": "SELECT t1.url FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t2.year = 2009", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 926, @@ -10191,10 +12969,13 @@ "question": "What's the fastest lap time ever in a race for Lewis Hamilton", "evidence": "fastest lap time ever refers to min(fastestLapTime)", "difficulty": "simple", - "pred": "SELECT MIN(t2.fastestlapspeed) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverdriverid ORDER BY t1.\"fastestlap\" DESC LIMIT 1", + "pred": "SELECT MIN(t2.speedlaptime) FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "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 NOT t2.fastestlaptime IS NULL ORDER BY t2.fastestlaptime ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 927, @@ -10202,10 +12983,13 @@ "question": "Which driver created the fastest lap speed in a Formula_1 race? Please give both his forename and surname", "evidence": "", "difficulty": "simple", - "pred": "SELECT forename, surname FROM drivers WHERE fastestlapspeed = (SELECT fastestlap FROM races)", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 'Formula_1' ORDER BY t2.peed DESC LIMIT 1", "gold": "SELECT t1.forename, t1.surname FROM drivers AS t1 INNER JOIN results AS t2 ON t2.driverid = t1.driverid WHERE NOT t2.fastestlaptime IS NULL ORDER BY t2.fastestlapspeed DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 928, @@ -10213,10 +12997,13 @@ "question": "Which driver ranked the first in the Canadian Grand Prix in 2007? Please give his reference name", "evidence": "reference name refers to driverRef; Canadian Grand Prix refers to races.name = 'Canadian Grand Prix';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverref FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Canadian Grand Prix'", + "pred": "SELECT t1.driverref FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.name = 'Canadian Grand Prix' AND t1.rank = 1 AND t1.year = 2007", "gold": "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 = 'Canadian Grand Prix' AND t2.rank = 1 AND t1.year = 2007", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 929, @@ -10224,10 +13011,13 @@ "question": "Please list the Formula_1 races that Lewis Hamilton participated", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.raceid FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton'", + "pred": "SELECT t2.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton' AND t2.name = 'Formula_1'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 930, @@ -10235,10 +13025,13 @@ "question": "In which Formula_1 race did Lewis Hamilton rank the highest", "evidence": "rank the highest refers to min(rank); Lewis Hamilton refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.raceid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"rank\" DESC LIMIT 1", + "pred": "SELECT t1.raceid FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE t2.name = 'Lewis Hamilton' ORDER BY t1.rank LIMIT 1", "gold": "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'))", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 931, @@ -10246,10 +13039,13 @@ "question": "What was the fastest lap speed among all drivers in the 2009 Spanish Grand Prix", "evidence": "the fastest lap speed among all refers to max(fastestLapSpeed); Spanish Grand Prix refers to races.name = 'Spanish Grand Prix';", "difficulty": "moderate", - "pred": "SELECT MAX(t2.fastestlapspeed) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driversid ORDER BY t1.\"speed\" DESC LIMIT 1", + "pred": "SELECT MAX(t2.speedlapspeed) FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid WHERE t1.name = 'Spanish Grand Prix' AND t2.year = 2009", "gold": "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 NOT t2.fastestlapspeed IS NULL ORDER BY t2.fastestlapspeed DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 932, @@ -10257,10 +13053,13 @@ "question": "In which years did Lewis Hamilton participate in a Formula_1 race", "evidence": "", "difficulty": "simple", - "pred": "SELECT year FROM races WHERE name = 'Lewis Hamilton'", + "pred": "SELECT t2.year FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton' AND t2.name = 'Formula_1'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 933, @@ -10268,10 +13067,13 @@ "question": "What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix", "evidence": "Lewis Hamilton refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname; final rank refers to positionOrder; Chinese Grand Prix refers to races.name = 'Chinese Grand Prix';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.surname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton' ORDER BY t3.positionorder DESC LIMIT 1", + "pred": "SELECT t1.rank FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 'Chinese Grand Prix' AND t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "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 = 'Chinese Grand Prix' AND t1.year = 2008", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 934, @@ -10279,10 +13081,13 @@ "question": "Which driver was in the no. 4 grid formation when starting the race in 1989's Australian Grand Prix? Please give his forename and surname", "evidence": "the no. 4 grid formation refers to grid = 4", "difficulty": "moderate", - "pred": "SELECT forename, surname FROM drivers WHERE grid = 4", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 1989 AND t2. grid = 4", "gold": "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 = 1989", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 935, @@ -10290,10 +13095,13 @@ "question": "How many drivers managed to finish the race in the 2008 Australian Grand Prix", "evidence": "managed to finish the race refers to time is not null", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE time = '2008 Australian Grand Prix'", + "pred": "SELECT COUNT(t2.driverid) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE t1.raceid = '2008 Australian Grand Prix' AND NOT t1.time IS NULL", "gold": "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 NOT t2.time IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 936, @@ -10301,10 +13109,13 @@ "question": "Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.stop FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton'", + "pred": "SELECT t1.lapspeed FROM pitstops AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid INNER JOIN drivers AS t3 ON t3.driverid = t2.driverid WHERE t3.name = 'Lewis Hamilton' AND t2.year = 2008 AND t2.name = 'Australian Grand Prix' ORDER BY t1.lapspeed DESC LIMIT 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 937, @@ -10312,10 +13123,13 @@ "question": "What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix", "evidence": "finish time refers to time; Chinese Grand Prix refers to races.name = 'Chinese Grand Prix';", "difficulty": "simple", - "pred": "SELECT t2.time FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'AustChineseralian Grand Prix'", + "pred": "SELECT t2.time FROM races AS t1 INNER JOIN drivers AS t2 ON t1.raceid = t2.raceid WHERE t1.name = 'Chinese Grand Prix' AND t2.rank = 2 AND t2.year = 2008", "gold": "SELECT t1.time FROM results AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE t1.rank = 2 AND t2.name = 'Chinese Grand Prix' AND t2.year = 2008", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 938, @@ -10323,10 +13137,13 @@ "question": "Who was the champion of 2008's Australian Grand Prix and where can I know more about him", "evidence": "only champion's finished time is represented by 'HH:MM:SS.mmm'; where can I know more refers to url", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.firstname, t2.lastname FROM races AS t1 INNER JOIN drivers AS t2 ON t1.\"driverid\" = t2\"id WHERE t2.\"hype\" = 'HH:MM:SS.mmm'", + "pred": "SELECT t1.firstname, t1.lastname, t1.url FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.year = 2008 AND t2.title = 'Australian Grand Prix'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 939, @@ -10334,10 +13151,13 @@ "question": "How many drivers from the UN participated in the 2008 Australian Grand Prix", "evidence": "from the UN refers to nationality = 'British'", "difficulty": "moderate", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE nationality = 'British'", + "pred": "SELECT COUNT(*) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1. nationality = 'British' AND t2.date = '2008 Australian Grand Prix'", "gold": "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 = 'British' AND t3.year = 2008", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 940, @@ -10345,10 +13165,13 @@ "question": "Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races", "evidence": "COUNT(raceID) > 0 reveals that this driver participated in races; drivers who finished the race refers to time has value.", "difficulty": "moderate", - "pred": "SELECT COUNT(driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.raceid WHERE t3.name = '2008 Chinese Grand Prix' GROUP BY t1.\"driverid\" ORDER BY t2.\"time\" DESC LIMIT 1", + "pred": "SELECT COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = '2008 Chinese Grand Prix' AND t1.time = 0", "gold": "SELECT COUNT(*) FROM (SELECT t1.driverid FROM results AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE t2.name = 'Chinese Grand Prix' AND t2.year = 2008 AND NOT t1.time IS NULL GROUP BY t1.driverid HAVING COUNT(t2.raceid) > 0)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 941, @@ -10356,10 +13179,13 @@ "question": "How many points did Lewis Hamilton get in total in all the Formula_1 races he participated", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(points) FROM races WHERE name = 'Lewis Hamilton'", + "pred": "SELECT SUM(t2.points) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 942, @@ -10367,10 +13193,13 @@ "question": "What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races", "evidence": "average fastest lap time = avg(fastestLapTime); The time is recorded on 'MM:SS.mmm'", "difficulty": "moderate", - "pred": "SELECT AVG(t2.fastestlapspeed) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverdriverid WHERE t1.\"name\" = 'Lewis Hamilton' AND t2.\"time\" = (SELECT MAX(t1.time) FROM \"race\"", + "pred": "SELECT AVG(t2.speedestlaptime) FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "SELECT AVG(CAST(SUBSTRING(t2.fastestlaptime, 1, INSTR(t2.fastestlaptime, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTRING(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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 943, @@ -10378,10 +13207,13 @@ "question": "What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix", "evidence": "completing all the laps refers to time is not null; rate = divide(COUNT(raceID where time is not null), COUNT(raceID))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.time IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"raceid\" = '2008 Australian Grand Prix'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.time IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.raceid) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE t1.raceid = '2008 Australian Grand Prix'", "gold": "SELECT CAST(SUM(IIF(NOT t1.time IS 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 944, @@ -10389,10 +13221,13 @@ "question": "How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix", "evidence": "how much faster in percentage = divide(subtract(incremental time, champion time), last_driver time) * 100; last driver finished time = incremental time + champion time; only champion's finished time is represented by 'HH:MM:SS.mmm'; finished the game refers to time is not null", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.title = 'HH:MM:SS.mmm' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"last_driver time\" = '2008 Australian Grand Prix'", + "pred": "SELECT CAST((SUM(IIF(t1.raceid = '2008 Australian Grand Prix', 1, 0)) - SUM(IIF(t1.raceid = '2008 Australian Grand Prix', 1, 0)) AS REAL) * 100 / SUM(IIF(t1.raceid = '2008 Australian Grand Prix', 1, 0)) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid", "gold": "WITH time_in_seconds AS (SELECT t1.positionorder, CASE WHEN t1.positionorder = 1 THEN (CAST(SUBSTRING(t1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTRING(t1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTRING(t1.time, 6) AS REAL) ELSE CAST(SUBSTRING(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 NOT t1.time IS 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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 945, @@ -10400,10 +13235,13 @@ "question": "How many circuits are there in Adelaide, Australia", "evidence": "Australia is the country; Melbourne is the location of circuit;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM circuits WHERE location = 'Adelaide'", + "pred": "SELECT COUNT(*) FROM circuits WHERE location = 'Adelaide' AND country = 'Australia'", "gold": "SELECT COUNT(circuitid) FROM circuits WHERE location = 'Adelaide' AND country = 'Australia'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 946, @@ -10411,10 +13249,13 @@ "question": "Please list the location coordinates of the US circuits", "evidence": "location coordinates refers to (lat, lng); the US refers to country = 'USA';", "difficulty": "simple", - "pred": "SELECT lng, lng FROM circuits WHERE country = 'USA'", + "pred": "SELECT name,lat, lng FROM circuits WHERE country = 'USA'", "gold": "SELECT lat, lng FROM circuits WHERE country = 'USA'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 947, @@ -10422,10 +13263,13 @@ "question": "How many British drivers were born after 1980", "evidence": "born after 1980 refers to year (dob) >1980;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE year (dob) > 1980", + "pred": "SELECT COUNT(DISTINCT driverid) FROM drivers WHERE year > 1980 AND nationality = 'British'", "gold": "SELECT COUNT(driverid) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) > '1980'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 948, @@ -10433,10 +13277,13 @@ "question": "What are the maximum points of British constructors", "evidence": "maximum points = MAX(points); British is a nationality", "difficulty": "simple", - "pred": "SELECT MAX(points) FROM constructors WHERE nationality = 'British' ORDER BY points DESC LIMIT 1", + "pred": "SELECT MAX(points) FROM constructors WHERE nationality = 'British'", "gold": "SELECT MAX(t1.points) FROM constructorstandings AS t1 INNER JOIN constructors AS t2 ON t1.constructorid = t2.constructorid WHERE t2.nationality = 'British'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 949, @@ -10444,10 +13291,13 @@ "question": "Which constructor has the highest point", "evidence": "", "difficulty": "simple", - "pred": "SELECT name FROM constructor WHERE points = (SELECT points FROM constructor)", + "pred": "SELECT t1.name FROM constructors AS t1 INNER JOIN workstops AS t2 ON t1.constructorid = t2.constructorid WHERE t2.points = (SELECT MAX(points) FROM workstops)", "gold": "SELECT t2.name FROM constructorstandings AS t1 INNER JOIN constructors AS t2 ON t1.constructorid = t2.constructorid ORDER BY t1.points DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 950, @@ -10455,10 +13305,13 @@ "question": "Please list the constructor names with 0 points at race 291", "evidence": "race at 291 refers to raceID = 291;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.name FROM constructor AS t1 INNER JOIN races AS t2 ON t2.raceid = t1.\"raceid\" WHERE t2.\"points\" = 0", + "pred": "SELECT t1.name FROM constructors AS t1 INNER JOIN race AS t2 ON t1.raceid = t2.raceid WHERE t2.raceid = 291 AND t2.points = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 951, @@ -10466,10 +13319,13 @@ "question": "How many Japanese constructors have 0 points in 2 races", "evidence": "2 races refers to COUNT(raceID) = 2; Japanese refers to constructors.nationality = 'Japanese';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM constructors WHERE points = 0 AND nationality = 'Japanese'", + "pred": "SELECT COUNT(t1.raceid) FROM races AS t1 INNER JOIN constructors AS t2 ON t1.raceid = t2.raceid WHERE t2.ethnicity = 'Japanese' AND t1.points = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 952, @@ -10480,7 +13336,10 @@ "pred": "SELECT name FROM constructors WHERE rank = 1", "gold": "SELECT DISTINCT t2.name FROM results AS t1 INNER JOIN constructors AS t2 ON t1.constructorid = t2.constructorid WHERE t1.rank = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 953, @@ -10488,10 +13347,13 @@ "question": "How many French constructors have a lap number of over 50", "evidence": "lap numbers of over 50 refers to laps > 50;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM constructors WHERE laps > 50", + "pred": "SELECT COUNT(*) FROM (SELECT t1.raceid AS count FROM pitstops AS t1 INNER JOIN constructors AS t2 ON t1.raceid = t2.raceid WHERE t2.country = 'France' AND t1.lapspeed > 50 GROUP BY t1.raceid) AS t3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 954, @@ -10499,10 +13361,13 @@ "question": "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009", "evidence": "from 2007 to 2009 refers to year between 2007 and 2009; race completion refers to time is not null; percentage = Divide(COUNT(DriverID where time is not null and year between 2007 and 2009),Count (DriverID where year between 2007 and 2009))*100; ", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.year BETWEEN 2007 AND 2009 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"raceid\"", + "pred": "SELECT CAST(SUM(IIF(t2.time IS NULL AND t2.year BETWEEN 2007 AND 2009, 1, 0)) AS REAL) * 100 / COUNT(t2.driverid) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.ethnicity = 'Japanese'", "gold": "SELECT CAST(SUM(IIF(NOT t1.time IS 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 955, @@ -10510,10 +13375,13 @@ "question": "What is the average time in seconds of champion for each year, before year 1975", "evidence": "only champion's finished time is represented by 'HH:MM:SS.mmm'; finished the game refers to time is not null; before year 1975 refers to year < 1975;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.year < 1975 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.driverid) FROM races AS t1 INNER JOIN events AS t2 ON t1.raceid = t2.\"raceid\" WHERE t1.\"year\" < 1975", + "pred": "SELECT CAST(SUM(time) AS REAL) / COUNT(raceid) FROM races WHERE year < 1975 AND time IS NULL", "gold": "WITH time_in_seconds AS (SELECT t2.year, t2.raceid, t1.positionorder, CASE WHEN t1.positionorder = 1 THEN (CAST(SUBSTRING(t1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTRING(t1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTRING(t1.time, 6, 2) AS REAL) + CAST(SUBSTRING(t1.time, 9) AS REAL) / 1000 ELSE 0 END AS time_seconds FROM results AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE NOT t1.time IS NULL), champion_time AS (SELECT year, raceid, time_seconds FROM time_in_seconds WHERE positionorder = 1) SELECT year, AVG(time_seconds) FROM champion_time WHERE year < 1975 GROUP BY year HAVING NOT AVG(time_seconds) IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.25, + "table_f1": 0.4 }, { "idx": 956, @@ -10521,10 +13389,13 @@ "question": "Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames", "evidence": "born after 1975 refers to year(dob) >1975;", "difficulty": "simple", - "pred": "SELECT forename, surname FROM drivers WHERE year(dob) > 1975 AND rank = 2", + "pred": "SELECT forename, surname FROM drivers WHERE rank = 2 AND year < 1975", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 957, @@ -10532,10 +13403,13 @@ "question": "How many Italian drivers haven't finished the race", "evidence": "haven't finished the race refers to time is null;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE time IS NULL", + "pred": "SELECT COUNT(*) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.country = 'Italy' AND t2.time IS NULL", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 958, @@ -10543,10 +13417,13 @@ "question": "Which driver has the fastest lap time? Please give their forenames and surnames", "evidence": "", "difficulty": "moderate", - "pred": "SELECT forename, surname FROM drivers WHERE lap = (SELECT fastestlaptime FROM drivers)", + "pred": "SELECT forename, surname FROM drivers ORDER BY fastestlapspeed DESC LIMIT 1", "gold": "SELECT t2.forename, t2.surname, t1.fastestlaptime FROM results AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid WHERE NOT t1.fastestlaptime IS NULL ORDER BY t1.fastestlaptime ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 959, @@ -10554,10 +13431,13 @@ "question": "What is the fastest lap number of the champion in 2009", "evidence": "in 2009 refers to year = 2009; Only the time of the champion shows in the format of \"hour: minutes: seconds.millionsecond\"", "difficulty": "simple", - "pred": "SELECT t2.lat FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"year\" = '2009' ORDER BY t3.lat DESC LIMIT 1", + "pred": "SELECT fastestlaptime FROM pitstops WHERE year = 2009 ORDER BY fastestlaptime DESC LIMIT 1", "gold": "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 '_:%:__.___'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 960, @@ -10565,10 +13445,13 @@ "question": "What is the average of fastest lap speed in the 2009 Spanish Grand Prix race", "evidence": "Spanish Grand Prix is the name of race refers to name = 'Spanish Grand Prix'; average fastest lap speed refers to avg(fastestLapSpeed);", "difficulty": "moderate", - "pred": "SELECT AVG(t2.fastestlapspeed) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverdriverid WHERE t1.\"name\" = 'Spanish Grand Prix' ORDER BY t2.\"speed\" DESC LIMIT 1", + "pred": "SELECT AVG(t1.speedspeed) FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid WHERE t1.name = 'Spanish Grand Prix' AND t2.year = 2009", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 961, @@ -10576,10 +13459,13 @@ "question": "Which race has the shortest actual finishing time? Please give the name and year", "evidence": "shortest actual finishing time refers to Min(milliseconds) except milliseconds = null;", "difficulty": "simple", - "pred": "SELECT name, year FROM races ORDER BY milliseconds DESC LIMIT 1", + "pred": "SELECT name, year FROM races WHERE milliseconds = (SELECT MIN(milliseconds) FROM races)", "gold": "SELECT t1.name, t1.year FROM races AS t1 INNER JOIN results AS t2 ON t1.raceid = t2.raceid WHERE NOT t2.milliseconds IS NULL ORDER BY t2.milliseconds LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 962, @@ -10587,10 +13473,13 @@ "question": "From 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50", "evidence": "born before 1985 refers to year(dob)<1985; in 2000 to 2005 refers to year between 2000 and 2005; percentage = Divide(COUNT(driverId where year (dob) <1985 and laps >50),COUNT(DriverID where year between 2000 and 2005) *100;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN year < 1985 AND laps > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(driverid) FROM drivers WHERE year < 2005", + "pred": "SELECT CAST(SUM(CASE WHEN t1.lapspeed > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.year BETWEEN 1985 AND 2005", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 963, @@ -10598,10 +13487,13 @@ "question": "How many French drivers who obtain the laptime less than 02:00.00", "evidence": "lap time less than 02:00.00 refers to seconds < 120;", "difficulty": "moderate", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE seconds < 120", + "pred": "SELECT COUNT(*) FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.driverid WHERE t1.country = 'France' AND t2.time < 120", "gold": "SELECT COUNT(t1.driverid) FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.driverid WHERE t1.nationality = 'French' AND (CAST(SUBSTRING(t2.time, 1, 2) AS INTEGER) * 60 + CAST(SUBSTRING(t2.time, 4, 2) AS INTEGER) + CAST(SUBSTRING(t2.time, 7, 2) AS REAL) / 1000) < 120", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 964, @@ -10612,7 +13504,10 @@ "pred": "SELECT code FROM drivers WHERE nationality = 'America'", "gold": "SELECT code FROM drivers WHERE nationality = 'American'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 965, @@ -10620,10 +13515,13 @@ "question": "List out the Id number of races which were hold in 2009", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.raceid FROM races AS t1 INNER JOIN events AS t2 ON t1.eventsid = t2.\"raceid\" WHERE t1.\"date\" = '2009'", + "pred": "SELECT COUNT(raceid) FROM races WHERE year = 2009", "gold": "SELECT raceid FROM races WHERE year = 2009", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 966, @@ -10631,10 +13529,13 @@ "question": "How many driver participated in race ID number 18", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE raceid = 18", + "pred": "SELECT COUNT(*) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 18", "gold": "SELECT COUNT(driverid) FROM driverstandings WHERE raceid = 18", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 967, @@ -10642,10 +13543,13 @@ "question": "State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them", "evidence": "youngest driver refers to Max (year(dob)); Netherlandic and Dutch refer to the same country", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE country = 'Netherlandic' ORDER BY year DESC LIMIT 3", + "pred": "SELECT code, COUNT(DISTINCT driverid) FROM drivers WHERE country = 'Netherlands' ORDER BY year DESC LIMIT 3", "gold": "SELECT COUNT(*) FROM (SELECT t1.nationality FROM drivers AS t1 ORDER BY JULIANDAY(t1.dob) DESC LIMIT 3) AS t3 WHERE t3.nationality = 'Dutch'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 968, @@ -10653,10 +13557,13 @@ "question": "What is reference name of Robert Kubica", "evidence": "reference name refers to driverRef;", "difficulty": "simple", - "pred": "SELECT driverref FROM drivers WHERE name = 'Robert Kubica'", + "pred": "SELECT driverref FROM drivers WHERE firstname = 'Robert' AND lastname = 'Kubica'", "gold": "SELECT driverref FROM drivers WHERE forename = 'Robert' AND surname = 'Kubica'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 969, @@ -10664,10 +13571,13 @@ "question": "How many British drivers who were born in 1980", "evidence": "born in 1980 refers to year(dob) = 1980;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE year(dob) = 1980", + "pred": "SELECT COUNT(DISTINCT driverid) FROM drivers WHERE dob LIKE '1980%' AND nationality = 'British'", "gold": "SELECT COUNT(driverid) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) = '1980'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 970, @@ -10675,10 +13585,13 @@ "question": "List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time", "evidence": "born from 1980-1990 refers to year(dob) between 1980 and 1990; earliest lap time refers to Min(time);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverref FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"year\" BETWEEN 1980 AND 1990 ORDER BY t2._time DESC LIMIT 3", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.year BETWEEN 1980 AND 1990 ORDER BY t2.time ASC LIMIT 3", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 971, @@ -10686,10 +13599,13 @@ "question": "Please state the reference name of the oldest German driver", "evidence": "oldest refers to MIN(year(dob)); reference names appear in drverRef.", "difficulty": "simple", - "pred": "SELECT name FROM drivers WHERE year = (SELECT MIN(year) FROM drivers)", + "pred": "SELECT DISTINCT t1.driverref FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.country = 'Germany' ORDER BY t2.dob LIMIT 1", "gold": "SELECT driverref FROM drivers WHERE nationality = 'German' ORDER BY JULIANDAY(dob) ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 972, @@ -10697,10 +13613,13 @@ "question": "Which drivers who were born in 1971 and has the fastest lap time on the race? Give id and code of these drivers", "evidence": "born in 1971 refers to year(dob) = 1971; has the fastest lap time refers to fastestLapTime has values", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverid, t1.code FROM drivers AS t1 INNER JOIN races AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t1\"year\" = 1971 AND t2\"lapspeed\" = 'Lapspeed'", + "pred": "SELECT t1.driverid, t1.code FROM drivers AS t1 INNER JOIN laptimes AS t2 ON t1.driverid = t2.driverid WHERE t2.year = 1971 ORDER BY t2.speedlapspeed DESC LIMIT 1", "gold": "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 NOT t1.fastestlaptime IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 973, @@ -10708,10 +13627,13 @@ "question": "List out top 10 Spanish drivers who were born before 1982 and have the latest lap time", "evidence": "born before 1982 refers to year(dob) < 1982; latest lap time refers to Max(time);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.driverid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.\"driverid\" WHERE t1.\"year\" < 1982 ORDER BY t1\" DESC LIMIT 10", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.year < 1982 ORDER BY t2.time DESC LIMIT 10", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 974, @@ -10719,10 +13641,13 @@ "question": "State the racing year which has the fastest lap time", "evidence": "'has the fastest lap time?' refers to fastestLapTime has values", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.year FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"speedlapspeed\" = (SELECT AVG(t2.zip) FROM races)", + "pred": "SELECT t1.year FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid WHERE t2.speedlapspeed = (SELECT MAX(speedlapspeed) FROM races)", "gold": "SELECT t2.year FROM results AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE NOT t1.fastestlaptime IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 975, @@ -10730,10 +13655,13 @@ "question": "Which year has the lowest speed of lap time", "evidence": "lowest speed of lap time refers to Max(time);", "difficulty": "simple", - "pred": "SELECT t2.year FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"time\" DESC LIMIT 1", + "pred": "SELECT year FROM \"race\" ORDER BY time DESC LIMIT 1", "gold": "SELECT t2.year FROM laptimes AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid ORDER BY t1.time DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 976, @@ -10741,10 +13669,13 @@ "question": "List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race", "evidence": "fastest time refers to Min(time);", "difficulty": "simple", - "pred": "SELECT driverid FROM drivers ORDER BY time DESC LIMIT 5", + "pred": "SELECT driverid FROM drivers ORDER BY time ASC LIMIT 5", "gold": "SELECT driverid FROM laptimes WHERE lap = 1 ORDER BY time LIMIT 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 977, @@ -10752,10 +13683,13 @@ "question": "From race no. 50 to 100, how many finishers have been disqualified", "evidence": "disqualified refers to statusID = 2, finisher refers to time! = null; race no. refers to raceId; raceId > 50 and raceId < 100;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM race WHERE statusid = 2 AND raceid < 100", + "pred": "SELECT COUNT(*) FROM results WHERE raceid BETWEEN 50 AND 100 AND statusid = 2", "gold": "SELECT SUM(IIF(NOT time IS NULL, 1, 0)) FROM results WHERE statusid = 2 AND raceid < 100 AND raceid > 50", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 978, @@ -10763,10 +13697,13 @@ "question": "How many times the circuits were held in Austria? Please give their location and coordinates", "evidence": "location coordinates refers to (lat,lng); Austria refers to country = 'Austria';", "difficulty": "simple", - "pred": "SELECT t2.lat, t1.lng FROM circuits AS t1 INNER JOIN country AS t2 ON t1.\"country\" = t2.\"country\", t3.country\" WHERE t3.\"name\" = 'Austria'", + "pred": "SELECT COUNT(lat, lng) FROM circuits WHERE country = 'Austria'", "gold": "SELECT DISTINCT location, lat, lng FROM circuits WHERE country = 'Austria'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 979, @@ -10774,10 +13711,13 @@ "question": "What race number has the most finishers", "evidence": "finisher refers to time is not null;", "difficulty": "simple", - "pred": "SELECT t2.raceid FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"time\" = 'null'", + "pred": "SELECT raceid FROM races WHERE time IS NULL GROUP BY raceid ORDER BY COUNT(time) DESC LIMIT 1", "gold": "SELECT raceid FROM results GROUP BY raceid ORDER BY COUNT(NOT time IS NULL) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 980, @@ -10785,10 +13725,13 @@ "question": "List the reference name of the drivers who passed the second qualifying lap during race no. 23. Indicate their nationality and birthday", "evidence": "passed the second qualifying lap refers to q2 is not null; birthday refers to dob; reference name of drivers refers to driverRef; race no. refers to raceId;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.driverref, t2.dob FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t2\"q2\" = 23 AND t2q2 IS NULL", + "pred": "SELECT t1.driverref, t1.dob FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.driverid = t2.driverid WHERE t2.q2 IS NULL AND t2.raceid = 23", "gold": "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 NOT t1.q2 IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 981, @@ -10796,10 +13739,13 @@ "question": "On what year did the youngest driver had his first qualifying race? Also state the name, date and time of the race", "evidence": "date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa; first qualifying race refers to MIN(races.date);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.date, t2.date FROM drivers AS t1 INNER JOIN qualifying AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t2\".name\" = 'Dob' ORDER BY t2._date DESC LIMIT 1", + "pred": "SELECT t1.year, t1.date, t2.time FROM races AS t1 INNER JOIN qualifying AS t2 ON t1.raceid = t2.raceid ORDER BY t1.date LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 982, @@ -10807,10 +13753,13 @@ "question": "How many American drivers have puncture status", "evidence": "puncture status refers to status = Puncture;", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE status = 'Puncture'", + "pred": "SELECT COUNT(*) FROM drivers AS t1 INNER JOIN status AS t2 ON t1.statusid = t2.statusid WHERE t2.status = 'Puncture'", "gold": "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 = 'Puncture' AND t1.nationality = 'American'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 983, @@ -10818,10 +13767,13 @@ "question": "Which of the Italian constructor got the highest point to date? Give its introduction website", "evidence": "introduction website refers to url; Italian is a nationality", "difficulty": "simple", - "pred": "SELECT t2.url FROM constructors AS t1 INNER JOIN race AS t2 ON t1.raceid = t2.\"raceid\" WHERE t1.\"name\" = 'Italian' AND t1\"percentage = 'date'", + "pred": "SELECT t1.name, t1.url FROM constructors AS t1 INNER JOIN results AS t2 ON t1.constructorid = t2.constructorid WHERE t1.country = 'Italy' ORDER BY t2.points DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 984, @@ -10829,10 +13781,13 @@ "question": "What is the website of the constructor who tallied the most total wins", "evidence": "introduction website refers to url;", "difficulty": "simple", - "pred": "SELECT url FROM constructor AS t1 INNER JOIN events AS t2 ON t1.constructorid = t2. constructorid ORDER BY t1.\"win\" DESC LIMIT 1", + "pred": "SELECT url FROM (SELECT t2.url, COUNT(t1.raceid) AS num FROM races AS t1 INNER JOIN constructors AS t2 ON t1.raceid = t2.raceid GROUP BY t2.raceid, t2.url) AS t3 ORDER BY t3.num DESC LIMIT 1", "gold": "SELECT t1.url FROM constructors AS t1 INNER JOIN constructorstandings AS t2 ON t1.constructorid = t2.constructorid ORDER BY t2.wins DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 985, @@ -10840,10 +13795,13 @@ "question": "Among the drivers who participated in the French Grand Prix, who has the slowest time in the 3rd lap", "evidence": "slowest time refers to Max(time);", "difficulty": "simple", - "pred": "SELECT driverid FROM drivers ORDER BY time DESC LIMIT 3", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.raceid = 3 AND t2.time = (SELECT MAX(time) FROM races)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 986, @@ -10851,10 +13809,13 @@ "question": "In which race did the fastest 1st lap time was recorded? Please indicate the time in milliseconds", "evidence": "fastest refers to Min(time);", "difficulty": "simple", - "pred": "SELECT MIN(t2.time) FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driversid = t2.driverid ORDER BY t1.\"time\" DESC LIMIT 1", + "pred": "SELECT t1.raceid, t2.time FROM races AS t1 INNER JOIN results AS t2 ON t1.raceid = t2.raceid ORDER BY t2.time ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 987, @@ -10862,10 +13823,13 @@ "question": "What is the average fastest lap time of the top 10 drivers in the 2006 United States Grand Prix", "evidence": "top 10 refers to rank <11; AVG(fastestLapTime);", "difficulty": "simple", - "pred": "SELECT AVG(t2.fastestlapspeed) FROM drivers AS t1 INNER JOIN racecars AS t2 ON t1.driverid = t2.driversid WHERE t1.\"rank\" = 11 AND t2.\"ranking\" = '2006 United States Grand Prix'", + "pred": "SELECT AVG(t2.speedestlapspeed) FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid WHERE t1.raceid = '2006 United States Grand Prix' GROUP BY t2.raceid ORDER BY SUM(t2.speedestlapspeed) / COUNT(t2.raceid) DESC LIMIT 10", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 988, @@ -10873,10 +13837,13 @@ "question": "List down top 3 German drivers who has the shortest average pit stop duration and were born between 1980-1985", "evidence": "Full name of the driver refers to drivers.forename and drivers.surname; born between 1980-1985 refers to 1980< year(dob)>1985; Average pitstop duration refers to Divide(SUM(duration),COUNT(duration)); shortest average refers to Min(avg(duration));", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.driverid, t2.name, AVG(t2.duration) FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.\"driver\"id = t2.\"driverid\" GROUP BY t3.\"driverref\" ORDER BY AVG(duration) DESC LIMIT 3", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.driverid WHERE STRFTIME('%Y', t2.dob) BETWEEN '1980' AND '1985' ORDER BY AVG(t2.duration) LIMIT 3", "gold": "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 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 989, @@ -10884,10 +13851,13 @@ "question": "Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time", "evidence": "Only the time of the champion shows in the format of \"hour: minutes: seconds.millionsecond\";", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.timestamp FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"date\" = '2008' AND STRFTIME('%Y', t1.'date) = '08'", + "pred": "SELECT t1.time FROM races AS t1 INNER JOIN series AS t2 ON t1.raceid = t2.raceid WHERE t2.year = 2008 AND t2.name = 'Canadian Grand Prix' ORDER BY t1.time DESC LIMIT 1", "gold": "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 '_:%:__.___'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 990, @@ -10895,10 +13865,13 @@ "question": "What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website", "evidence": "the time of the champion shows in the format of \"minutes: seconds.millionsecond\" in which Max(time); constructor reference name refers to constructorRef; website refers to url", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.url FROM drivers AS t1 INNER JOIN constructors AS t2 ON t2.driverid = t1.\"driverid\" WHERE t2.\"minutes: seconds.millionsecond\" = '2009 Singapore Grand Prix'", + "pred": "SELECT t1. constructorref, t1.url FROM constructors AS t1 INNER JOIN races AS t2 ON t1.constructorid = t2.constructorid WHERE t2.raceid = '2009 Singapore Grand Prix' ORDER BY t2.time DESC LIMIT 1", "gold": "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 '_:%:__.___'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 991, @@ -10906,10 +13879,13 @@ "question": "What is the full name and date of birth of Austrian drivers born between 1981 and 1991", "evidence": "Full name refers to forname, surname; Date of birth refers to dob; year(dob) BETWEEN '1981' AND '1991'; Austrian is a nationality", "difficulty": "simple", - "pred": "SELECT forname, surname, dob FROM drivers WHERE year(dob) BETWEEN 1981 AND 1991 AND nationality = 'Austria'", + "pred": "SELECT name, dob FROM drivers WHERE nationality = 'Austrian' AND year BETWEEN 1981 AND 1991", "gold": "SELECT forename, surname, dob FROM drivers WHERE nationality = 'Austrian' AND STRFTIME('%Y', dob) BETWEEN '1981' AND '1991'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 992, @@ -10917,10 +13893,13 @@ "question": "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", "evidence": "FFull name refers to forname+surname; Nationality refers to German; Date of birth refers to dob; year(dob) BETWEEN '1971' AND '1985'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.forname, t2.surname, t3.date FROM drivers AS t1 INNER JOIN events AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t2\" BETWEEN '1971' AND '1985' AND t3.\"name\" = 'Wiki Pedia'", + "pred": "SELECT name, dob FROM drivers WHERE nationality = 'Germany' AND dob BETWEEN '1971' AND '1985' ORDER BY dob DESC", "gold": "SELECT forename, surname, url, dob FROM drivers WHERE nationality = 'German' AND STRFTIME('%Y', dob) BETWEEN '1971' AND '1985' ORDER BY dob DESC", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 993, @@ -10928,10 +13907,13 @@ "question": "In which location does the Hungaroring circuit located? Also, find the country and coordinates of this circuit", "evidence": "coordinates expressed in latitude and longitude refers to (lat, lng)", "difficulty": "simple", - "pred": "SELECT t2.lat, t1.lng FROM circuits AS t1 INNER JOIN locations AS t2 ON t1.\"circuitid\" = t2.\"circuits\"id WHERE t3.name = 'Hungaroring'", + "pred": "SELECT name, lat, lng FROM circuits WHERE name = 'Hungaroring'", "gold": "SELECT country, lat, lng FROM circuits WHERE name = 'Hungaroring'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 994, @@ -10939,10 +13921,13 @@ "question": "Which constructor scored most points from Monaco Grand Prix between 1980 and 2010? List the score, name and nationality of this team", "evidence": "Monaco Grand Priz refers to the race; race in year between 1980 and 2010", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.name, t1.country FROM drivers AS t1 INNER JOIN constructorresults AS t2 ON t1.\"driverid\" = t2.\"driver\" WHERE t1\"race\" BETWEEN 1980 AND 2010 AND t1\".name\" = 'Monaco Grand Priz'", + "pred": "SELECT t2.name, t2.name, t2. nationality FROM races AS t1 INNER JOIN constructorresults AS t2 ON t1.raceid = t2.raceid INNER JOIN teams AS t3 ON t2.teamid = t3.teamid WHERE t1.raceid BETWEEN 1980 AND 2010 AND t1.name = 'Monaco Grand Priz' ORDER BY t2.points DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 995, @@ -10950,10 +13935,13 @@ "question": "What is the average score of Lewis Hamilton among all the Turkish Grand Prix", "evidence": "Average score = AVG(points)", "difficulty": "moderate", - "pred": "SELECT AVG(points) FROM drivers WHERE name = 'Lewis Hamilton'", + "pred": "SELECT AVG(t2.points) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 996, @@ -10961,10 +13949,13 @@ "question": "What is the annual average number of races held during the first 10 years of the 21st century", "evidence": "races in date between '2000-01-01' and '2010-12-31'", "difficulty": "simple", - "pred": "SELECT COUNT(raceid) FROM races WHERE date BETWEEN '2000-01-01' AND '2010-12-31'", + "pred": "SELECT CAST(SUM(raceid) AS REAL) / COUNT(raceid) FROM races WHERE date BETWEEN '2000-01-01' AND '2010-12-31'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 997, @@ -10972,10 +13963,13 @@ "question": "Which citizenship do the vast majority of the drivers hold", "evidence": "Citizenship of majority of drivers = MAX(nationality); citizenship and nationality are synonyms\n\n", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.country FROM drivers AS t1 INNER JOIN nationality AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"country\" DESC LIMIT 1", + "pred": "SELECT nationality FROM drivers GROUP BY nationality ORDER BY COUNT(driverid) DESC LIMIT 1", "gold": "SELECT nationality FROM drivers GROUP BY nationality ORDER BY COUNT(driverid) DESC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 998, @@ -10983,10 +13977,13 @@ "question": "In terms of number of points acquired, how many victories did the driver who ranked 91st acquired", "evidence": "victories refer to wins; 91st refers to points\n\n", "difficulty": "simple", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE points = (SELECT points FROM drivers)", + "pred": "SELECT SUM(t2.points) FROM drivers AS t1 INNER JOIN driverstandings AS t2 ON t1.driverid = t2.driverid WHERE t1.rank = 91", "gold": "SELECT SUM(CASE WHEN points = 91 THEN wins ELSE 0 END) FROM driverstandings", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 999, @@ -10994,10 +13991,13 @@ "question": "In terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer", "evidence": "Fastest lap speed refers to MIN(fastestLapTime)\n\n", "difficulty": "simple", - "pred": "SELECT t2.name FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"fastestlapspeed\" DESC LIMIT 1", + "pred": "SELECT t1.name FROM races AS t1 INNER JOIN laptimes AS t2 ON t1.raceid = t2.raceid ORDER BY t2.speedlapspeed LIMIT 1", "gold": "SELECT t1.name FROM races AS t1 INNER JOIN results AS t2 ON t1.raceid = t2.raceid WHERE NOT t2.fastestlaptime IS NULL ORDER BY t2.fastestlaptime ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1000, @@ -11005,10 +14005,13 @@ "question": "Which racetrack hosted the most recent race? Indicate the full location", "evidence": "full location refers to location+country; most recent race = MAX(date)\n\n", "difficulty": "simple", - "pred": "SELECT t2.location FROM races AS t1 INNER JOIN locations AS t2 ON t1.raceid = t2.\"raceid\" ORDER BY t1.\"date\" DESC LIMIT 1", + "pred": "SELECT location, country FROM races WHERE date = (SELECT MAX(date) FROM races)", "gold": "SELECT t1.location FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid ORDER BY t2.date DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1001, @@ -11016,10 +14019,13 @@ "question": "What is full name of the racer who ranked 1st in the 3rd qualifying race held in the Marina Bay Street Circuit in 2008", "evidence": "Ranked 1st in the 3rd qualifying race refer to MIN(q3); 2008 is the year of race; full name of racer = forename, surname", "difficulty": "challenging", - "pred": "SELECT forename, surname FROM drivers WHERE year = 2008 ORDER BY q3 DESC LIMIT 1", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid INNER JOIN qualifying AS t3 ON t2.raceid = t3.raceid WHERE t3.q3 = (SELECT MIN(q3) FROM races WHERE date = '2008') AND t2.raceid = (SELECT MIN(q3) FROM races WHERE date = '2008')", "gold": "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 NOT q3 IS NULL AND t3.year = 2008 AND t3.circuitid IN (SELECT circuitid FROM circuits WHERE name = 'Marina Bay Street Circuit') ORDER BY CAST(SUBSTRING(q3, 1, INSTR(q3, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTRING(q3, INSTR(q3, ':') + 1, INSTR(q3, '.') - INSTR(q3, ':') - 1) AS REAL) + CAST(SUBSTRING(q3, INSTR(q3, '.') + 1) AS REAL) / 1000 ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 1002, @@ -11027,10 +14033,13 @@ "question": "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", "evidence": "full name refers to forename+surname; Youngest racer = MAX(dob)", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.firstname, t2.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.\"driverid\" = t2.\"driver\" ORDER BY t3.dob DESC LIMIT 1", + "pred": "SELECT forename, surname, nationality FROM drivers ORDER BY dob DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1003, @@ -11038,10 +14047,13 @@ "question": "How many accidents did the driver who had the highest number accidents in the Canadian Grand Prix have", "evidence": "number of accidents refers to the number where statusid = 3; Canadian Grand Prix refers to the race of name\n", "difficulty": "moderate", - "pred": "SELECT COUNT(driverid) FROM drivers WHERE statusid = 3 AND name = 'Canadian Grand Prix'", + "pred": "SELECT COUNT(*) FROM (SELECT t1.driverid FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid INNER JOIN status AS t3 ON t2.statusid = t3.statusid WHERE t3.statusid = 3 GROUP BY t1.driverid, t1.raceid ORDER BY COUNT(t1.driverid) DESC LIMIT 1) AS t4 ON t3.raceid = t4.raceid", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1004, @@ -11049,10 +14061,13 @@ "question": "How many wins was achieved by the oldest racer? Indicate his/her full name", "evidence": "oldest racer refers to MIN(dob); full name refers to forename, surname.", "difficulty": "simple", - "pred": "SELECT MIN(t1.dob) FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverdriverid ORDER BY t2.\"dob\" DESC LIMIT 1", + "pred": "SELECT SUM(t2.w), t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid ORDER BY t2.dob LIMIT 1", "gold": "SELECT SUM(t1.wins), t2.forename, t2.surname FROM driverstandings AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.driverid ORDER BY t2.dob ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1005, @@ -11060,10 +14075,13 @@ "question": "What was the longest time a driver had ever spent at a pit stop", "evidence": "longest time spent at pitstop refers to MAX(duration)", "difficulty": "simple", - "pred": "SELECT MAX(duration) FROM drivers WHERE stop = 'stop' ORDER BY duration DESC LIMIT 1", + "pred": "SELECT MAX(duration) FROM pitstops", "gold": "SELECT duration FROM pitstops ORDER BY duration DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1006, @@ -11071,10 +14089,13 @@ "question": "Among all the lap records set on various circuits, what is the time for the fastest one", "evidence": "", "difficulty": "challenging", - "pred": "SELECT t2.time FROM circuits AS t1 INNER JOIN fastestlapspeed AS t2 ON t1.circuitid = t2.\"circuit\"id WHERE t1.\"name\" = 'Lapspeed'", + "pred": "SELECT t1.time FROM pitstops AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid INNER JOIN circuits AS t3 ON t2.circuitid = t3.circuitid ORDER BY t1.lapspeed DESC LIMIT 1", "gold": "SELECT time FROM laptimes ORDER BY (CASE WHEN INSTR(time, ':') <> INSTR(SUBSTRING(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':') THEN CAST(SUBSTRING(time, 1, INSTR(time, ':') - 1) AS REAL) * 3600 ELSE 0 END) + (CAST(SUBSTRING(time, INSTR(time, ':') - 2 * (INSTR(time, ':') = INSTR(SUBSTRING(time, INSTR(time, ':') + 1), ':') + INSTR(time, ':')), INSTR(time, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(time, INSTR(time, ':') + 1, INSTR(time, '.') - INSTR(time, ':') - 1) AS REAL)) + (CAST(SUBSTRING(time, INSTR(time, '.') + 1) AS REAL) / 1000) ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1007, @@ -11082,10 +14103,13 @@ "question": "What was the longest time that Lewis Hamilton had spent at a pit stop", "evidence": "longest time refes to MAX(duration);", "difficulty": "simple", - "pred": "SELECT MAX(duration) FROM drivers WHERE driverid = 'Lewis Hamilton' ORDER BY duration LIMIT 1", + "pred": "SELECT MAX(duration) FROM pitstops WHERE driverid = (SELECT driverid FROM drivers WHERE firstname = 'Lewis' AND lastname = 'Hamilton')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1008, @@ -11093,10 +14117,13 @@ "question": "During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.stop FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton'", + "pred": "SELECT t1.stop FROM pitstops AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid INNER JOIN drivers AS t3 ON t3.driverid = t2.driverid WHERE t3.name = 'Lewis Hamilton' AND t2.year = 2011", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1009, @@ -11104,10 +14131,13 @@ "question": "Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix", "evidence": "time spent at pit stop refers to duration", "difficulty": "simple", - "pred": "SELECT t2.duration FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"stop\" = '2011 Australian Grand Prix'", + "pred": "SELECT t1.duration FROM pitstops AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid WHERE t2.raceid = '2011 Australian Grand Prix'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1010, @@ -11115,10 +14145,13 @@ "question": "What is the lap record set by Lewis Hamilton in a Formula_1 race", "evidence": "lap recod means the fastest time recorded which refers to time", "difficulty": "simple", - "pred": "SELECT t2.lat FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"name\" = 'Lewis Hamilton'", + "pred": "SELECT t2.time FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton' ORDER BY t2.time DESC LIMIT 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1011, @@ -11126,10 +14159,13 @@ "question": "Which top 20 driver created the shortest lap time ever record in a Formula_1 race? Please give them full names", "evidence": "shortest lap time refers to MIN(time); the time format for the shortest lap time is 'MM:SS.mmm' or 'M:SS.mmm'; full name of the driver refers to forename, surname", "difficulty": "challenging", - "pred": "SELECT forename, surname FROM drivers ORDER BY time DESC LIMIT 20", + "pred": "SELECT t1.firstname, t1.lastname FROM drivers AS t1 INNER JOIN races AS t2 ON t1.driverid = t2.driverid WHERE t2.time IN ('MM:SS.mmm', 'M:SS.mmm') ORDER BY t2.time LIMIT 20", "gold": "WITH lap_times_in_seconds AS (SELECT driverid, (CASE WHEN SUBSTRING(time, 1, INSTR(time, ':') - 1) <> '' THEN CAST(SUBSTRING(time, 1, INSTR(time, ':') - 1) AS REAL) * 60 ELSE 0 END + CASE WHEN SUBSTRING(time, INSTR(time, ':') + 1, INSTR(time, '.') - INSTR(time, ':') - 1) <> '' THEN CAST(SUBSTRING(time, INSTR(time, ':') + 1, INSTR(time, '.') - INSTR(time, ':') - 1) AS REAL) ELSE 0 END + CASE WHEN SUBSTRING(time, INSTR(time, '.') + 1) <> '' THEN CAST(SUBSTRING(time, INSTR(time, '.') + 1) AS REAL) / 1000 ELSE 0 END) AS time_in_seconds FROM laptimes) SELECT t2.forename, t2.surname, t1.driverid 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 20", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1012, @@ -11137,10 +14173,13 @@ "question": "What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race", "evidence": "fastest lap refers to MIN(time)", "difficulty": "simple", - "pred": "SELECT t2.position FROM races AS t1 INNER JOIN drivers AS t2 ON t1.driverid = t2.\"driverid\" ORDER BY t1.\"time\" DESC LIMIT 1", + "pred": "SELECT t1.position FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid INNER JOIN drivers AS t3 ON t3.driverid = t2.driverid WHERE t3.firstname = 'Lewis' AND t3.lastname = 'Hamilton' ORDER BY t2.time LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 1013, @@ -11148,10 +14187,13 @@ "question": "What is the lap record for the Austrian Grand Prix Circuit", "evidence": "lap record means the fastest time recorded which refers to time", "difficulty": "simple", - "pred": "SELECT t2.lat FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.\"circuit\"id WHERE t1.\"name\" = 'Austrian Grand Prix Circuit'", + "pred": "SELECT t2.time FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t1.name = 'Austria Grand Prix Circuit' ORDER BY t2.time DESC LIMIT 1", "gold": "WITH fastest_lap_times AS (SELECT t1.raceid, t1.fastestlaptime FROM results AS t1 WHERE NOT t1.fastestlaptime IS 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1014, @@ -11159,10 +14201,13 @@ "question": "Please list the lap records for the circuits in Italy", "evidence": "lap record means the fastest time recorded which refers to time", "difficulty": "challenging", - "pred": "SELECT t2.lat FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.\"circuit\"id WHERE t1.\"country\" = 'Italy'", + "pred": "SELECT t2.time FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t1.country = 'Italy' ORDER BY t2.time DESC LIMIT 1", "gold": "WITH fastest_lap_times AS (SELECT t1.raceid, t1.fastestlaptime, (CAST(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results AS t1 WHERE NOT t1.fastestlaptime IS 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(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, '.') + 1) AS REAL) / 1000) = t4.min_time_in_seconds LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1015, @@ -11170,10 +14215,13 @@ "question": "In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set", "evidence": "lap record means the fastest time recorded which refers to time", "difficulty": "moderate", - "pred": "SELECT t2.raceid FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.\"circuit\"id WHERE t1.\"name\" = 'F1' AND t3.lat = 'Austrian Grand Prix'", + "pred": "SELECT t1.raceid FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.name = 'Austria Grand Prix' AND t1.time = (SELECT MAX(time) FROM races)", "gold": "WITH fastest_lap_times AS (SELECT t1.raceid, t1.fastestlaptime, (CAST(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results AS t1 WHERE NOT t1.fastestlaptime IS 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(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, '.') + 1) AS REAL) / 1000) = t4.min_time_in_seconds WHERE t2.name = 'Austrian Grand Prix'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1016, @@ -11181,10 +14229,13 @@ "question": "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", "evidence": "lap record means the fastest time recorded which refers to time, how long spent at pitstop refers to duration", "difficulty": "challenging", - "pred": "SELECT t2.duration FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.\"driverid\" WHERE t1.\"stop\" = 'Austria Grand Prix Circuit' AND t1\"is NULL", + "pred": "SELECT t1.time, t1.duration FROM pitstops AS t1 INNER JOIN races AS t2 ON t1.raceid = t2.raceid INNER JOIN circuits AS t3 ON t2.circuitid = t3.circuitid WHERE t3.name = 'Austria Grand Prix'", "gold": "WITH fastest_lap_times AS (SELECT t1.raceid, t1.driverid, t1.fastestlaptime, (CAST(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, '.') + 1) AS REAL) / 1000) AS time_in_seconds FROM results AS t1 WHERE NOT t1.fastestlaptime IS 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(SUBSTRING(t1.fastestlaptime, 1, INSTR(t1.fastestlaptime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTRING(t1.fastestlaptime, INSTR(t1.fastestlaptime, ':') + 1, INSTR(t1.fastestlaptime, '.') - INSTR(t1.fastestlaptime, ':') - 1) AS REAL)) + (CAST(SUBSTRING(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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1017, @@ -11192,10 +14243,13 @@ "question": "Please list the location coordinates of the circuits whose lap record is 1:29.488", "evidence": "lap records means the fastest time recorded which refers to time; coordinates are expressed as latitude and longitude which refers to (lat, lng)", "difficulty": "moderate", - "pred": "SELECT t2.lat, t1.longitude FROM circuits AS t1 INNER JOIN races AS t2 ON t1.\"circuitid\" = t2.\"raceid\" WHERE t1\"lapspeed\" = 1:29.488", + "pred": "SELECT t1.lat, t1.lng FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.circuitid WHERE t2.raceid = 1:29.488", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1018, @@ -11203,10 +14257,13 @@ "question": "What was the average time in milliseconds Lewis Hamilton spent at a pit stop during Formula_1 races", "evidence": "average time in milliseconds spent at pit stop refers to AVG(milliseconds)", "difficulty": "simple", - "pred": "SELECT AVG(t2.milliseconds) FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2. driverid GROUP BY t1.\"driverid\" ORDER BY t2.\"percentage\" DESC LIMIT 1", + "pred": "SELECT AVG(t2.minutes) FROM drivers AS t1 INNER JOIN pitstops AS t2 ON t1.driverid = t2.driverid WHERE t1.firstname = 'Lewis' AND t1.lastname = 'Hamilton'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1019, @@ -11214,10 +14271,13 @@ "question": "What is the average lap time in milliseconds of all the lap records set on the various circuits in Italy", "evidence": "average = AVG(milliseconds)", "difficulty": "moderate", - "pred": "SELECT AVG(t2.lapspeed) FROM circuits AS t1 INNER JOIN races AS t2 ON t1.circuitid = t2.raceid WHERE t1.\"country\" = 'Italy' ORDER BY t2.\"percentage\" DESC LIMIT 1", + "pred": "SELECT AVG(t1.lat) FROM races AS t1 INNER JOIN circuits AS t2 ON t1.circuitid = t2.circuitid WHERE t2.country = 'Italy'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1020, @@ -11225,10 +14285,13 @@ "question": "Which player has the highest overall rating? Indicate the player's api id", "evidence": "highest overall rating refers to MAX(overall_rating);", "difficulty": "simple", - "pred": "SELECT player_fifa_api_id FROM player ORDER BY overall_rating DESC LIMIT 1", + "pred": "SELECT player_fifa_api_id FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "gold": "SELECT player_api_id FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1021, @@ -11236,10 +14299,13 @@ "question": "What is the height of the tallest player? Indicate his name", "evidence": "tallest player refers to MAX(height);", "difficulty": "simple", - "pred": "SELECT MAX(height) FROM player ORDER BY height DESC LIMIT 1", + "pred": "SELECT height, name FROM player ORDER BY height DESC LIMIT 1", "gold": "SELECT player_name FROM player ORDER BY height DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1022, @@ -11247,10 +14313,13 @@ "question": "What is the preferred foot when attacking of the player with the lowest potential", "evidence": "preferred foot when attacking refers to preferred_foot; lowest potential refers to MIN(potential);", "difficulty": "simple", - "pred": "SELECT preferred_foot FROM player ORDER BY potential DESC LIMIT 1", + "pred": "SELECT preferred_foot FROM player_attributes ORDER BY potential LIMIT 1", "gold": "SELECT preferred_foot FROM player_attributes WHERE NOT potential IS NULL ORDER BY potential ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1023, @@ -11258,10 +14327,13 @@ "question": "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", "evidence": "overall_rating > = 60 AND overall_rating < 65; players whose going to be in all of your attack moves instead of defensing refers to defensive_work_rate = 'low';", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.player_id) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2.player WHERE t3. overall_rating > 60 AND t1.\"defensive_work_rate\" < 65 AND t2.\"defence_workrate\" = 'low'", + "pred": "SELECT COUNT(*) FROM player_attributes WHERE overall_rating BETWEEN 60 AND 65 AND defensive_work_rate = 'low'", "gold": "SELECT COUNT(id) FROM player_attributes WHERE overall_rating BETWEEN 60 AND 65 AND defensive_work_rate = 'low'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1024, @@ -11269,10 +14341,13 @@ "question": "Who are the top 5 players who perform better in crossing actions? Indicate their player id", "evidence": "perform better in crossing actions refers to MAX(crossing)", "difficulty": "simple", - "pred": "SELECT player_id FROM player ORDER BY COUNT(player_id) DESC LIMIT 5", + "pred": "SELECT player_id FROM player_attributes ORDER BY crossing DESC LIMIT 5", "gold": "SELECT id FROM player_attributes ORDER BY crossing DESC LIMIT 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1025, @@ -11280,10 +14355,13 @@ "question": "Give the name of the league had the most goals in the 2016 season", "evidence": "league that had the most goals refers to MAX(SUM(home_team_goal, away_team_goal)); 2016 season refers to season = '2015/2016';", "difficulty": "moderate", - "pred": "SELECT t2.name FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.team_api_id = t3.id GROUP BY t1.\"name\" ORDER BY SUM(t1.home_team_goal) DESC LIMIT 1", + "pred": "SELECT name FROM league WHERE season = 2016 GROUP BY name ORDER BY SUM(home_team_goal + away_team_goal) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1026, @@ -11291,10 +14369,13 @@ "question": "Which home team had lost the fewest matches in the 2016 season", "evidence": "home team lost the matches refers to SUBTRACT(home_team_goal, away_team_goal) < 0; 2016 season refers to season = '2015/2016';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.home_team_goal FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_fifa_api_id = t2._team_id WHERE t1.\"season\" = '2015/2016' GROUP BY t2.\"home team_goal\" ORDER BY COUNT(t2.match_id) ASC LIMIT 1", + "pred": "SELECT t1.team_name FROM team AS t1 INNER JOIN match AS t2 ON t1.team_id = t2.match_id WHERE t2.season = '2015/2016' GROUP BY t1.team_name ORDER BY SUM(t2.h_team_goal) ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1027, @@ -11302,10 +14383,13 @@ "question": "Indicate the full names of the top 10 players with the highest number of penalties", "evidence": "full name refers to player_name; players with highest number of penalties refers to MAX(penalties);", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY penalties DESC LIMIT 10", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id GROUP BY t1.player_name ORDER BY SUM(t2.penalties) DESC LIMIT 10", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1028, @@ -11313,10 +14397,13 @@ "question": "In Scotland Premier League, which away team won the most during the 2010 season", "evidence": "Final result should return the Team.team_long_name; Scotland Premier League refers to League.name = 'Scotland Premier League'; away team refers to away_team_api_id; away team that won the most refers to MAX(SUBTRACT(away_team_goal, home_team_goal) > 0); 2010 season refers to season = '2009/2010'; won the most refers to MAX(COUNT(*));", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.away_team_goal FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_fifa_api_id = t2.\"team_long_name\" WHERE t1.\"season\" = '2009/2010' ORDER BY COUNT(t1.t2.t1.\"away\" DESC LIMIT 1", + "pred": "SELECT t1.team_long_name FROM team AS t1 INNER JOIN match AS t2 ON t1.team_id = t2.team_fifa_api_id INNER JOIN league AS t3 ON t2.league_id = t3.id WHERE t3.name = 'Scotland Premier League' AND t2.season = 2010 GROUP BY t1.team_long_name ORDER BY COUNT(*) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1029, @@ -11324,10 +14411,13 @@ "question": "What are the speed in which attacks are put together of the top 4 teams with the highest build Up Play Speed", "evidence": "speed in which attacks are put together refers to buildUpPlaySpeed;highest build up play speed refers to MAX(buildUpPlaySpeed)", "difficulty": "moderate", - "pred": "SELECT MAX(t2.buildupplayspeed) FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.id ORDER BY t2.\"buildupPlayspeed\" DESC LIMIT 4", + "pred": "SELECT t2.buildupplayspeed FROM match AS t1 INNER JOIN team_attributes AS t2 ON t2.team_id = t1.team_fifa_api_id ORDER BY t1.buildupplayspeed DESC LIMIT 4", "gold": "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.buildupplayspeed ASC LIMIT 4", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1030, @@ -11335,10 +14425,13 @@ "question": "Give the name of the league had the most matches end as draw in the 2016 season", "evidence": "most matches end as draw refers to MAX(SUM(home_team_goal = away_team_goal)); 2016 season refers to season = '2015/2016';", "difficulty": "moderate", - "pred": "SELECT t2.name FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.\"id\" GROUP BY t1.\"name\" ORDER BY SUM(t2.home_team_goal) DESC LIMIT 1", + "pred": "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 SUM(t2.h_team_goal) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1031, @@ -11346,10 +14439,13 @@ "question": "At present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015", "evidence": "players age at present = SUBTRACT((DATETIME(), birthday)); sprint speed of no less than 97 refers to sprint_speed > = 97; between 2013 to 2015 refers to YEAR(date) > = '2013' AND YEAR(date) < = '2015'; ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.age FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.\"player_fifa_api_id\" WHERE STRFTIME('%Y', t1.\"date\") > '2013' AND t1.'date\" > '2015' AND STRFTIM('%YR', t2.'date\") < '2013%'", + "pred": "SELECT AVG(DATE(birthday) FROM player WHERE STRFTIME('%Y', date) BETWEEN '2013' AND '2015' AND sprint_speed >= 97", "gold": "SELECT DISTINCT DATETIME() - t2.birthday AS age FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_api_id = t2.player_api_id WHERE STRFTIME('%Y', t1.\"date\") >= '2013' AND STRFTIME('%Y', t1.\"date\") <= '2015' AND t1.sprint_speed >= 97", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1032, @@ -11357,10 +14453,13 @@ "question": "Give the name of the league with the highest matches of all time and how many matches were played in the said league", "evidence": " league with highest matches of all time refers to MAX(COUNT(league_id));", "difficulty": "moderate", - "pred": "SELECT t2.name, COUNT(t2.league_id) FROM match AS t1 INNER JOIN league AS t2 ON t1.id = t2.\"league\"", + "pred": "SELECT t2.name, COUNT(t2.match_id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.id GROUP BY t2.name, t2.match_id ORDER BY COUNT(t1.league_id) DESC LIMIT 1", "gold": "SELECT t2.name, t1.max_count FROM league AS t2 JOIN (SELECT league_id, MAX(cnt) AS max_count FROM (SELECT league_id, COUNT(id) AS cnt FROM match GROUP BY league_id) AS subquery) AS t1 ON t1.league_id = t2.id", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1033, @@ -11368,10 +14467,13 @@ "question": "What is the average height of players born between 1990 and 1995", "evidence": "average height = DIVIDE(SUM(height), COUNT(id)); players born between 1990 and 1995 refers to birthday > = '1990-01-01 00:00:00' AND birthday < '1996-01-01 00:00:00';", "difficulty": "simple", - "pred": "SELECT AVG(height) FROM player WHERE birthday > '1990-01-01 00:00:00'", + "pred": "SELECT AVG(height) FROM player WHERE birthday BETWEEN '1990' AND '1995'", "gold": "SELECT SUM(height) / COUNT(id) FROM player WHERE SUBSTRING(birthday, 1, 4) BETWEEN '1990' AND '1995'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1034, @@ -11379,10 +14481,13 @@ "question": "List the players' api id who had the highest above average overall ratings in 2010", "evidence": "highest above average overall ratings refers to MAX(overall_rating); in 2010 refers to substr(date,1,4) = '2010';", "difficulty": "simple", - "pred": "SELECT t2.player_api_id FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_id WHERE t1.\"date\" LIKE '2010%' ORDER BY t3.overall_rating DESC LIMIT 1", + "pred": "SELECT player_fifa_api_id FROM player_attributes WHERE overall_rating = (SELECT MAX(overall_rating) FROM player_attributes WHERE date LIKE '%2010%')", "gold": "SELECT player_api_id FROM player_attributes WHERE SUBSTRING(\"date\", 1, 4) = '2010' ORDER BY overall_rating DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1035, @@ -11390,10 +14495,13 @@ "question": "Give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed", "evidence": "teams with more than 50 but less than 60 build-up play speed refers to buildUpPlaySpeed >50 AND buildUpPlaySpeed <60; ", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.team_fifa_api_id FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.t2.t1.coach_id < 50 AND t1.\"buildupplayspeed\" > 60", + "pred": "SELECT DISTINCT t1.team_fifa_api_id FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.team_fifa_api_id = t2.team_fifa_api_id WHERE t2.buildupplayspeed > 50 AND t2.buildupplayspeed < 60", "gold": "SELECT DISTINCT team_fifa_api_id FROM team_attributes WHERE buildupplayspeed > 50 AND buildupplayspeed < 60", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1036, @@ -11401,10 +14509,13 @@ "question": "List the long name of teams with above-average build-up play passing in 2012", "evidence": "long name of teams refers to team_long_name; build-up play passing refers to buildUpPlayPassing; above-average build-up play passing = buildUpPlayPassing > DIVIDE(SUM(buildUpPlayPassing), COUNT(team_long_name) WHERE buildUpPlayPassing IS NOT NULL); in 2012 refers to strftime('%Y', date) = '2012'; ", "difficulty": "challenging", - "pred": "SELECT team_long_name FROM team_attributes WHERE STRFTIME('%Y', date) = '2012' AND buildupplaypassing = 'BuildupPlayPassing'", + "pred": "SELECT DISTINCT t2.team_long_name FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.team_fifa_api_id = t2.team_fifa_api_id WHERE t1.date LIKE '%2012%' AND t1.buildupplaypassing > (SELECT AVG(t1.buildupplaypassing) FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.team_fifa_api_id = t2.team_fifa_api_id WHERE t1.date LIKE '%2012%')", "gold": "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 SUBSTRING(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 STRFTIME('%Y', t2.\"date\") = '2012')", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1037, @@ -11412,10 +14523,13 @@ "question": "Calculate the percentage of players who prefer left foot, who were born between 1987 and 1992", "evidence": "players who prefer left foot refers to preferred_foot = 'left'; percentage of players who prefer left foot = DIVIDE(MULTIPLY((SUM(preferred_foot = 'left'), 100)), COUNT(player_fifa_api_id)); born between 1987 and 1992 refers to YEAR(birthday) BETWEEN '1987' AND '1992';", "difficulty": "challenging", - "pred": "SELECT CAST((SUM(CASE WHEN preferred_foot = 'left' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.player_fifa_api_id) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2. player_id WHERE t2.\"birthday\" BETWEEN 1987 AND 1992 AND t1.\"preferred_foot\" = 'Left'", + "pred": "SELECT CAST(SUM(CASE WHEN preferred_foot = 'left' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(player_fifa_api_id) FROM player_attributes WHERE STRFTIME('%Y', birthday) BETWEEN '1988' AND '1992'", "gold": "SELECT CAST(COUNT(CASE WHEN t2.preferred_foot = 'left' THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) AS percent FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTRING(t1.birthday, 1, 4) BETWEEN '1987' AND '1992'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1038, @@ -11423,10 +14537,13 @@ "question": "List the top 5 leagues in ascending order of the number of goals made in all seasons combined", "evidence": "number of goals made in all seasons combine = SUM(home_team_goal, away_team_goal);", "difficulty": "moderate", - "pred": "SELECT SUM(t2.home_team_goal, t2.away_team-goal) FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.\"team_player_id\" WHERE t1.\"season\" = '2015' GROUP BY t1._team_name", + "pred": "SELECT name FROM league ORDER BY away_team_goal - away_team_goal DESC LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1039, @@ -11434,10 +14551,13 @@ "question": "Find the average number of long-shot done by Ahmed Samir Farag", "evidence": "average number of long shot = DIVIDE(SUM(long_shots), COUNT(player_fifa_api_id));", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.long_shots = 'Ahmed Samir Farag' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.player_fifa_api_id) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_id", + "pred": "SELECT AVG(long_shots) FROM player WHERE player_name = 'Ahmed Samir Farag'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1040, @@ -11445,10 +14565,13 @@ "question": "List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy", "evidence": "heights are above 180 refers to Player.height > 180; average heading accuracy = DIVIDE(SUM(heading_accuracy), COUNT(player_fifa_api_id));", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_fifa_api_id AS t2 ON t1.id = t2._player_id GROUP BY t2.\"player\" ORDER BY COUNT(t1.height) DESC LIMIT 10", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_fifa_api_id = t2.id WHERE t1.height > 180 ORDER BY t2.heading_accuracy DESC LIMIT 10", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1041, @@ -11456,10 +14579,13 @@ "question": "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", "evidence": "normal build-up play dribbling class refers to buildUpPlayDribblingClass = 'Normal'; in 2014 refers to date > = '2014-01-01 00:00:00' AND date < = '2014-01-31 00:00:00'; names of the teams refers to team_long_name; less than average chance creation passing = DIVIDE(SUM(chanceCreationPassing), COUNT(id)) > chanceCreationPassing;", "difficulty": "challenging", - "pred": "SELECT DISTINCT team_long_name FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.team_id = t2.id WHERE t2.\"date\" > '2014-01-01 00:00:00' AND t1.\"buildupplaydribblingclass\" = 'Normal'", + "pred": "SELECT DISTINCT t2.team_long_name FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.team_id = t2.team_long_name WHERE t1.date BETWEEN '2014-01-01 00:00:00' AND '2014-01-31 00:00:00' GROUP BY t2.team_long_name ORDER BY CAST(SUM(t2.chancecreationpassing) AS REAL) / COUNT(t2.team_long_name) > 0", "gold": "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 SUBSTRING(t2.\"date\", 1, 4) = '2014') ORDER BY t4.chancecreationpassing DESC", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1042, @@ -11467,10 +14593,13 @@ "question": "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", "evidence": "name of league refers to League.name; average goals by the home team is higher than the away team = AVG(home_team_goal) > AVG(away_team_goal); AVG(xx_goal) = SUM(xx_goal) / COUNT(DISTINCT Match.id); 2009/2010 season refers to season = '2009/2010'", "difficulty": "challenging", - "pred": "SELECT AVG(t2.away_team_goal) FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.id GROUP BY t1.\"name\" ORDER BY COUNT(t1.zip) DESC LIMIT 1", + "pred": "SELECT t2.name FROM match AS t1 INNER JOIN league AS t2 ON t2.league_id = t1.league_id WHERE t1.season = '2009-2010' GROUP BY t2.name HAVING AVG(t1.h_team_goal) > AVG(t1.away_team_goal)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1043, @@ -11478,10 +14607,13 @@ "question": "What is the short name of the football team Queens Park Rangers", "evidence": "short name of the football team refers to team_short_name; Queens Park Rangers refers to team_long_name = 'Queens Park Rangers';", "difficulty": "simple", - "pred": "SELECT team_short_name FROM team_attributes WHERE team_long_name = 'Queens Park Rangers'", + "pred": "SELECT team_short_name FROM team WHERE team_long_name = 'Queens Park Rangers'", "gold": "SELECT team_short_name FROM team WHERE team_long_name = 'Queens Park Rangers'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1044, @@ -11489,10 +14621,13 @@ "question": "List the football players with a birthyear of 1970 and a birthmonth of October", "evidence": "players with a birthyear of 1970 and a birthmonth of October refers to substr(birthday,1,7) AS 'year-month',WHERE year = '1970' AND month = '10';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_id WHERE STRFTIME('%Y', t1.\"birthday\", 1,7) = '1970' AND SUBSTRING(t2.month) AS '10'", + "pred": "SELECT DISTINCT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE SUBSTRING(t1.birthday, 1, 7) = 'year-month' AND SUBSTRING(t1.birthday, 1, 7) = '10'", "gold": "SELECT player_name FROM player WHERE SUBSTRING(birthday, 1, 7) = '1970-10'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1045, @@ -11500,10 +14635,13 @@ "question": "What is the attacking work rate of the football playerr Franco Zennaro", "evidence": "", "difficulty": "simple", - "pred": "SELECT AVG(t2.attacking_work_rate) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2.player_fifa_api_id WHERE t1.\"playerr\" = Franco Zennaro", + "pred": "SELECT t1.attacking_work_rate FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t2.player_name = 'Franco Zennaro'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1046, @@ -11511,10 +14649,13 @@ "question": "What is the ADO Den Haag team freedom of movement in the 1st two thirds of the pitch", "evidence": "ADO Den Haag refers to team_long_name = 'ADO Den Haag'; freedom of movement in the 1st two thirds of the pitch refers to buildUpPlayPositioningClass;", "difficulty": "moderate", - "pred": "SELECT t2.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.t1.teamid = t2._team_id WHERE t1.\"team_name\" = 'ADO Den Haag'", + "pred": "SELECT t2.buildupplaypositioningclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'ADO Den Haag'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1047, @@ -11522,10 +14663,13 @@ "question": "What is the football player Francois Affolter header's finishing rate on 18/09/2014", "evidence": "header's finishing rate refers to heading_accuracy; on 18/09/2014 refers to date = '2014-09-18 00:00:00';", "difficulty": "moderate", - "pred": "SELECT t2.headward_accuracy FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2._player_id WHERE t1.\"first-year\" = ' Francois Affolter' AND t2.\"last-year' = '2014-09-18 00:00:00'", + "pred": "SELECT t2.headers_accuracy FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t1.player_name = 'Francois Affolter' AND t2.date = '2014-09-18 00:00:00'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2014-09-18'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1048, @@ -11533,10 +14677,13 @@ "question": "What is the overall rating of the football player Gabriel Tamas in year 2011", "evidence": "in year 2011 refers to strftime('%Y', date) = '2011';", "difficulty": "simple", - "pred": "SELECT overall_rating FROM player_attributes WHERE STRFTIME('%Y', date) = '2011' AND player_name = 'Gabriel Tamas'", + "pred": "SELECT overall_rating FROM player_attributes WHERE player_name = 'Gabriel Tamas' AND date LIKE '2011%'", "gold": "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 STRFTIME('%Y', t2.date) = '2011'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1049, @@ -11544,10 +14691,13 @@ "question": "How many matches in the 2015/2016 season were held in Scotland Premier League", "evidence": "Scotland Premier League refers to League.name = 'Scotland Premier League';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.match_id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.name WHERE t1.\"name\" = 'Scotland Premier League'", + "pred": "SELECT COUNT(t1.id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.id WHERE t2.name = 'Scotland Premier League' AND t1.season BETWEEN 2015 AND 2016", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1050, @@ -11555,10 +14705,13 @@ "question": "What is the preferred foot when attacking of the youngest football player", "evidence": "preferred foot when attacking refers to preferred_foot; youngest football player refers to latest birthday;", "difficulty": "simple", - "pred": "SELECT preferred_foot FROM player ORDER BY birthday DESC LIMIT 1", + "pred": "SELECT preferred_foot FROM player_attributes WHERE birthday = (SELECT MAX(birthday) FROM player)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1051, @@ -11566,10 +14719,13 @@ "question": "List all the football player with the highest potential score", "evidence": "potential score refers to potential; highest potential score refers to MAX(potential);", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY potential DESC LIMIT 1", + "pred": "SELECT t1.player_name FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id ORDER BY t1.potential DESC LIMIT 1", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1052, @@ -11577,10 +14733,13 @@ "question": "Among all the players whose weight is under 130, how many of them preferred foot in attacking is left", "evidence": "weight < 130; preferred foot in attacking refers to preferred_foot; preferred_foot = 'left';", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM player WHERE weight < 130 AND preferred_foot = 'left'", + "pred": "SELECT COUNT(DISTINCT preferred_foot) FROM player_attributes WHERE weight < 130", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1053, @@ -11588,10 +14747,13 @@ "question": "List the football teams that has a chance creation passing class of Risky. Inidcate its short name only", "evidence": "chance creation passing class refers to chanceCreationPassingClass; chanceCreationPassingClass = 'Risky'; short name refers to team_short_name;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.team_short_name FROM team_attributes AS t1 INNER JOIN team AS t2 ON t1.t2.name = t2._team_long_name WHERE t3.chancecreationpassingclass = 'Risky'", + "pred": "SELECT t1.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id INNER JOIN season AS t3 ON t2.season_id = t3.season_id INNER JOIN team AS t4 ON t3.team_fifa_api_id = t4.team_fifa_api_id WHERE t4.team_name = 'Risky' AND t3.season = 3", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1054, @@ -11599,10 +14761,13 @@ "question": "What is the defensive work rate of the football player David Wilson", "evidence": "", "difficulty": "simple", - "pred": "SELECT defensive_work_rate FROM player WHERE player_name = 'David Wilson'", + "pred": "SELECT t2.defensive_work_rate FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t1.player_name = 'David Wilson'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1055, @@ -11610,10 +14775,13 @@ "question": "When is the birthday of the football player who has the highest overall rating", "evidence": "football player who has the highest overall rating refers to MAX(overall_rating);", "difficulty": "simple", - "pred": "SELECT birthday FROM player ORDER BY overall_rating DESC LIMIT 1", + "pred": "SELECT birthday FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1056, @@ -11624,7 +14792,10 @@ "pred": "SELECT name FROM league WHERE country_id = 'Netherlands'", "gold": "SELECT t2.name FROM country AS t1 INNER JOIN league AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Netherlands'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1057, @@ -11632,10 +14803,13 @@ "question": "Calculate the average home team goal in the 2010/2011 season in the country of Poland", "evidence": "average home team goal = AVG(home_team_goal)= SUM(home_team_goal) / COUNT(DISTINCT Match.id) WHERE name = 'Poland' and season = '2010/2011';", "difficulty": "moderate", - "pred": "SELECT AVG(t2.home_team_goal) FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.id WHERE t1.\"name\" = 'Poland' AND t2.\"season\" = 2010/2011", + "pred": "SELECT AVG(t2.hom_team_goal) FROM country AS t1 INNER JOIN match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Poland' AND t2.season = '2010/2011'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1058, @@ -11643,10 +14817,13 @@ "question": "Who has the highest average finishing rate between the highest and shortest football player", "evidence": "finishing rate refers to finishing; highest average finishing rate = MAX(AVG(finishing)); highest football player refers to MAX(height); shortest football player refers to MIN(height);", "difficulty": "challenging", - "pred": "SELECT AVG(height) FROM player ORDER BY height DESC LIMIT 1", + "pred": "SELECT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id ORDER BY t1.height DESC LIMIT 1", "gold": "SELECT a FROM (SELECT AVG(finishing) AS result, 'Max' AS 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) AS result, 'Min' AS 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1059, @@ -11657,7 +14834,10 @@ "pred": "SELECT player_name FROM player WHERE height > 180", "gold": "SELECT player_name FROM player WHERE height > 180", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1060, @@ -11665,10 +14845,13 @@ "question": "How many players were born after 1990", "evidence": "born after 1990 refers to strftime('%Y', birthday) = '1990';", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT player_name) FROM player WHERE strftime('%Y', birthday) = '1990'", + "pred": "SELECT COUNT(id) FROM player WHERE STRFTIME('%Y', birthday) = '1990'", "gold": "SELECT COUNT(id) FROM player WHERE STRFTIME('%Y', birthday) > '1990'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1061, @@ -11676,10 +14859,13 @@ "question": "How many players whose first names are Adam and weigh more than 170", "evidence": "team names refers to team_long_name; speed class refers to buildUpPlaySpeedClass; buildUpPlaySpeedClass = 'Fast';", "difficulty": "simple", - "pred": "SELECT COUNT(t1.player_name) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.team_fifa_api_id = t2.id WHERE t1.\"first name\" = 'Adam' AND t2.\"weight\" = 170", + "pred": "SELECT COUNT(DISTINCT t1.player_name) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.first_name = 'Adam' AND t1.weight > 170 AND t2.makeupplayspeedclass = 'Fast'", "gold": "SELECT COUNT(id) FROM player WHERE weight > 170 AND player_name LIKE 'Adam%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1062, @@ -11687,10 +14873,13 @@ "question": "Which players had an overall rating of over 80 from 2008 to 2010? Please list player names", "evidence": "overall_rating > 80; from 2008 to 2010 refers to strftime('%Y', date) BETWEEN '2008' AND '2010';", "difficulty": "moderate", - "pred": "SELECT player_name FROM player WHERE STRFTIME('%Y', date) BETWEEN '2008' AND '2010' AND overall_rating > 80", + "pred": "SELECT DISTINCT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE STRFTIME('%Y', t2.date) BETWEEN '2008' AND '2010' AND overall_rating > 80", "gold": "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 SUBSTRING(t2.\"date\", 1, 4) BETWEEN '2008' AND '2010'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1063, @@ -11698,10 +14887,13 @@ "question": "What is Aaron Doran's potential score", "evidence": "potential score refers to potential;", "difficulty": "simple", - "pred": "SELECT potential FROM player WHERE player_name = 'Aaron Doran'", + "pred": "SELECT potential FROM player_attributes WHERE player_name = 'Aaron Doran'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1064, @@ -11709,10 +14901,13 @@ "question": "List out of players whose preferred foot is left", "evidence": "preferred_foot = 'left';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2.\"player\" WHERE t1.\" preferred_foot\" = 'left'", + "pred": "SELECT DISTINCT t1.player_name FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE preferred_foot = 'Left'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1065, @@ -11720,10 +14915,13 @@ "question": "Please list all team names which the speed class is fast", "evidence": "team names refers to team_long_name; speed class refers to buildUpPlaySpeedClass; buildUpPlaySpeedClass = 'Fast';", "difficulty": "simple", - "pred": "SELECT t2.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.coach_fifa_api_id = t3.id WHERE t4.buildupPlaySpeedClass = 'Fast'", + "pred": "SELECT t1.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_fifa_api_id INNER JOIN buildupplayspeedclass AS t3 ON t2.team_id = t3.id WHERE t3.buildupplayspeedclass = 'Fast'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1066, @@ -11731,10 +14929,13 @@ "question": "What is the passing class of CLB team", "evidence": "passing class refers to buildUpPlayPassingClass; CLB refers to team_short_name = 'CLB';", "difficulty": "simple", - "pred": "SELECT buildupplaypassingclass FROM team_attributes WHERE team_short_name = 'CLB'", + "pred": "SELECT t2.buildupplaypassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_short_name = 'CLB'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1067, @@ -11742,10 +14943,13 @@ "question": "Which teams have build up play passing more than 70? Please list their short names", "evidence": "build up play passing refers to buildUpPlayPassing; buildUpPlayPassing > 70; short names refers to team_short_name;", "difficulty": "moderate", - "pred": "SELECT team_short_name FROM team_attributes WHERE buildupplaypassing > 70", + "pred": "SELECT t1.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t2.buildupplaypassing > 70", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1068, @@ -11753,10 +14957,13 @@ "question": "From 2010 to 2015, what was the average overall rating of players who are higher than 170", "evidence": "from 2010 to 2015 refers to strftime('%Y', date) >= '2010' AND <= '2015'; average overall rating = SUM(t2.overall_rating)/ COUNT(t2.id); higher than 170 refers to Player.height > 170;", "difficulty": "moderate", - "pred": "SELECT AVG(t2.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.id WHERE STRFTIME('%Y', date) >= '2010' AND t2.\"height\" > 170", + "pred": "SELECT AVG(t2.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE STRFTIME('%Y', t2.date) >= '2010' AND STRFTIME('%Y', t2.date) >= '2015' AND t1.height > 170", "gold": "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 STRFTIME('%Y', t2.\"date\") >= '2010' AND STRFTIME('%Y', t2.\"date\") <= '2015'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1069, @@ -11764,10 +14971,13 @@ "question": "Which football player has the shortest height", "evidence": "shortest height refers to MIN(height);", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY height DESC LIMIT 1", + "pred": "SELECT player_name FROM player ORDER BY height ASC LIMIT 1", "gold": "SELECT player_name FROM player ORDER BY height ASC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1070, @@ -11775,10 +14985,13 @@ "question": "Which country is the league Italy Serie A from", "evidence": "Italy Serie A from refers to League.name = 'Italy Serie A';", "difficulty": "simple", - "pred": "SELECT t2.name FROM league AS t1 INNER JOIN country AS t2 ON t1.country_id = t2._id WHERE t1.\"name\" = 'Italy Serie A'", + "pred": "SELECT t1.country_id FROM country AS t1 INNER JOIN match AS t2 ON t1.country_id = t2.country_id INNER JOIN league AS t3 ON t2.country_id = t3.id WHERE t3.name = 'Italy Serie A'", "gold": "SELECT t1.name FROM country AS t1 INNER JOIN league AS t2 ON t1.id = t2.country_id WHERE t2.name = 'Italy Serie A'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1071, @@ -11786,10 +14999,13 @@ "question": "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", "evidence": "build up play speed refers to buildUpPlaySpeed; buildUpPlaySpeed = 31; build up play dribbling refers to buildUpPlayDribbling; buildUpPlayDribbling = 53; build up play passing refers to buildUpPlayPassing; buildUpPlayPassing = 32; short name of the team refers to team_short_name;", "difficulty": "challenging", - "pred": "SELECT t2.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.t1.name = t2._team_long_name WHERE t1.\"buildupplayspeed\" = 31 AND t2.\"makeupupplaydribbling\" = 53", + "pred": "SELECT t1.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_fifa_api_id INNER JOIN team AS t3 ON t2.team_id = t3.team_fifa_api_id WHERE t3.team_id IN (SELECT DISTINCT t1.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t2.team_fifa_api_id = t1.team_fifa_api_id IN (SELECT DISTINCT t1.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t2.team_fifa_api_id = t1.team_fifa_api_id INNER JOIN team AS t3 ON t3.team_id = t2.team_fifa_api_id WHERE t3.team_fifa_id = 31 AND t3.buildupplaydribbling = 53 GROUP BY t1.team_long_name) AS t4", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1072, @@ -11797,10 +15013,13 @@ "question": "What is the average overall rating of the football player Aaron Doran", "evidence": "average overall rating = AVG(overall_rating);", "difficulty": "simple", - "pred": "SELECT AVG(overall_rating) FROM player WHERE player_name = 'Aaron Doran'", + "pred": "SELECT AVG(overall_rating) FROM player_attributes WHERE player_name = 'Aaron Doran'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1073, @@ -11808,10 +15027,13 @@ "question": "How many matches were held in the league Germany 1. Bundesliga from August to October 2008", "evidence": "Germany 1. Bundesliga refers to League.name = 'Germany 1. Bundesliga'; from August to October 2008 refers to strftime('%Y-%m', date) BETWEEN '2008-08' AND '2008-10';", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.match_id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.name WHERE t1.\"name\" = 'Germany 1. Bundesliga' AND STRFTIME('%Y-%m', t2.\"date\") BETWEEN '2008-08' AND '2008'", + "pred": "SELECT COUNT(t2.match_id) FROM league AS t1 INNER JOIN match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Germany 1. Bundesliga' AND STRFTIME('%Y-%m', t2.date) BETWEEN '2008-08' AND '2008-10'", "gold": "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 SUBSTRING(t2.\"date\", 1, 7) BETWEEN '2008-08' AND '2008-10'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1074, @@ -11819,10 +15041,13 @@ "question": "List all the short name of the football team that had a home team goal of 10", "evidence": "short name of the football team refers to team_short_name; home team goal refers to home_team_goal; home_team_goal = 10;", "difficulty": "simple", - "pred": "SELECT team_short_name FROM team_attributes WHERE home_team_goal = 10", + "pred": "SELECT t2.team_short_name FROM match AS t1 INNER JOIN team AS t2 ON t2.team_id = t1.team_fifa_api_id WHERE t1.hom_team_goal = 10", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1075, @@ -11830,10 +15055,13 @@ "question": "List all the football player with the highest balance score and potential score of 61", "evidence": "balance score refers to balance; highest balance score refers to MAX(balance); potential score refers to potential; potential = 61;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.player_name, t2.value FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.\"player\" = t2.\"player_fifa_api_id\" ORDER BY t2._balance DESC LIMIT 1", + "pred": "SELECT t1.player_name FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t2.selection = (SELECT MAX(selection) FROM player_attributes WHERE potential = 61)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1076, @@ -11841,10 +15069,13 @@ "question": "What is the difference of the average ball control score between Abdou Diallo and Aaron Appindangoye", "evidence": "difference of the average ball control = SUBTRACT(AVG(ball_control WHERE player_name = 'Abdou Diallo'), AVG(ball_control WHERE player_name = 'Aaron Appindangoye')); AVG(ball_control WHERE player_name = 'XX XX') = SUM(CASE WHEN player_name = 'XX XX' THEN ball_control ELSE 0 END) / COUNT(CASE WHEN player_name = 'XX XX' THEN id ELSE NULL END)", "difficulty": "challenging", - "pred": "SELECT AVG(t2.ball_control) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE t1.\"player_name\" = 'Abdou Diallo'", + "pred": "SELECT AVG(ball_control) FROM player_attributes WHERE player_name = 'Abdou Diallo' AND player_name = 'Aaron Appindangoye'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1077, @@ -11855,7 +15086,10 @@ "pred": "SELECT team_long_name FROM team WHERE team_short_name = 'GEN'", "gold": "SELECT team_long_name FROM team WHERE team_short_name = 'GEN'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1078, @@ -11863,10 +15097,13 @@ "question": "Which player is older, Aaron Lennon or Abdelaziz Barrada", "evidence": "The larger the birthday value, the younger the person is, and vice versa;", "difficulty": "simple", - "pred": "SELECT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_fifa_api_id WHERE t1.\"name\" = 'Aaron Lennon' AND t2.\"first born' = 'Abdelaziziz Barrada'", + "pred": "SELECT name FROM player WHERE birthday = (SELECT birthday FROM player WHERE name = 'Aaron Lennon') OR name = 'Abdelaziz Barrada')", "gold": "SELECT player_name FROM player WHERE player_name IN ('Aaron Lennon', 'Abdelaziz Barrada') ORDER BY birthday ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1079, @@ -11877,7 +15114,10 @@ "pred": "SELECT player_name FROM player ORDER BY height DESC LIMIT 1", "gold": "SELECT player_name FROM player ORDER BY height DESC LIMIT 1", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1080, @@ -11885,10 +15125,13 @@ "question": "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", "evidence": "preferred foot when attacking was the left refers to preferred_foot = 'left'; players who would remain in his position when the team attacked refers to attacking_work_rate = 'low';", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.player_id) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.id = t2.team_id WHERE t2.\" preferred_foot\" = 'left' AND t1.\"attacking_work_rate\" LIKE 'low'", + "pred": "SELECT COUNT(DISTINCT t1.player_id) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE t2. preferred_foot = 'Left' AND t1.attempt_work_rate = 'low'", "gold": "SELECT COUNT(player_api_id) FROM player_attributes WHERE preferred_foot = 'left' AND attacking_work_rate = 'low'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1081, @@ -11896,10 +15139,13 @@ "question": "Which country is the Belgium Jupiler League from", "evidence": "Belgium Jupiler League refers to League.name = 'Belgium Jupiler League';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.country FROM league AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.\"country\" WHERE t1.\"name\" = 'Belgium Jupiler League'", + "pred": "SELECT t1.name FROM country AS t1 INNER JOIN league AS t2 ON t1.country_id = t2.country_id WHERE t2.name = 'Belgium Jupiler League'", "gold": "SELECT t1.name FROM country AS t1 INNER JOIN league AS t2 ON t1.id = t2.country_id WHERE t2.name = 'Belgium Jupiler League'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1082, @@ -11907,10 +15153,13 @@ "question": "Please list the leagues from Germany", "evidence": "Germany refers to Country.name = 'Germany';", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.league_id FROM country AS t1 INNER JOIN league AS t2 ON t1.country_id = t2.\"country\" WHERE t1.\"name\" = 'Germany'", + "pred": "SELECT t2.name FROM country AS t1 INNER JOIN league AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Germany'", "gold": "SELECT t2.name FROM country AS t1 INNER JOIN league AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Germany'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1083, @@ -11918,10 +15167,13 @@ "question": "Which player has the strongest overall strength", "evidence": "overall strength refers to overall_rating; strongest overall strength refers to MAX(overall_rating);", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY overall_rating DESC LIMIT 1", + "pred": "SELECT overall_rating FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1084, @@ -11929,10 +15181,13 @@ "question": "Among the players born before the year 1986, how many of them would remain in his position and defense while the team attacked", "evidence": "players born before the year 1986 refers to strftime('%Y', birthday)<'1986'; players who would remain in his position and defense while the team attacked refers to defensive_work_rate = 'high'; Should consider DISTINCT in the final result;", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT) FROM player WHERE strftime('%Y', birthday) < '1986' AND defensive_work_rate = 'high'", + "pred": "SELECT COUNT(DISTINCT t1.player_fifa_api_id) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2.player_fifa_api_id WHERE STRFTIME('%Y', t1.birthday) < '1986' AND t2.defensive_work_rate = 'high' AND t2.defenceteamwidth = 'high'", "gold": "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 STRFTIME('%Y', t1.birthday) < '1986' AND t2.defensive_work_rate = 'high'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1085, @@ -11940,10 +15195,13 @@ "question": "Which of these players performs the best in crossing actions, Alexis, Ariel Borysiuk or Arouna Kone", "evidence": "player who perform best in crossing actions refers to MAX(crossing);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_id ORDER BY t2.\"crossing\" DESC LIMIT 1", + "pred": "SELECT t2.player_name FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE t2.player_name IN ('Alexis', 'Borysiuk') ORDER BY t2.crossing DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1086, @@ -11951,10 +15209,13 @@ "question": "What's the heading accuracy of Ariel Borysiuk", "evidence": "", "difficulty": "simple", - "pred": "SELECT heading_accuracy FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE t3.first_year = Ariel Borysiuk AND t2.\"last-year\" = 'Ariel'", + "pred": "SELECT t2.headings_accuracy FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t1.player_name = 'Ariel Borysiuk'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1087, @@ -11962,10 +15223,13 @@ "question": "Among the players whose height is over 180, how many of them have a volley score of over 70", "evidence": "height > 180; volley score refers to volleys; volleys > 70;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT player_name) FROM player WHERE height > 180 AND volleys > 70", + "pred": "SELECT SUM(t1.volleys) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t1.height > 180 AND t1.volleys > 70", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1088, @@ -11973,10 +15237,13 @@ "question": "Please list the names of the players whose volley score and dribbling score are over 70", "evidence": "volley score are over 70 refers to volleys > 70; dribbling score refers to dribbling are over 70 refers to dribbling > 70;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.\"player\" = t2.\"player_id\" WHERE t2.volleys > 70", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t2.volleys > 70 AND t2.dribbling > 70", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1089, @@ -11984,10 +15251,13 @@ "question": "How many matches in the 2008/2009 season were held in Belgium", "evidence": "Belgium refers to Country.name = 'Belgium';", "difficulty": "simple", - "pred": "SELECT COUNT(t2.match_id) FROM match AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.name WHERE t1.\"country\" = 'Belgium'", + "pred": "SELECT SUM(CASE WHEN t2.name = 'Belgium' THEN 1 ELSE 0 END) FROM match AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.country_id WHERE t1.season BETWEEN 2008 AND 2009", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1090, @@ -11995,10 +15265,13 @@ "question": "What is the long passing score of the oldest player", "evidence": "long passing score refers to long_passing; oldest player refers to oldest birthday;", "difficulty": "simple", - "pred": "SELECT long_passing FROM player WHERE birthday = '2018'", + "pred": "SELECT long_passing FROM player ORDER BY birthday ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1091, @@ -12006,10 +15279,13 @@ "question": "How many matches were held in the Belgium Jupiler League in April, 2009", "evidence": "Belgium Jupiler League refers to League.name = 'Belgium Jupiler League'; in April, 2009 refers to SUBSTR(\"date\", 1, 7);", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.match_api_id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.name WHERE SUBSTRING(\"date\", 1, 7)", + "pred": "SELECT COUNT(t1.id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.id WHERE t2.name = 'Belgium Jupiler League' AND t1.date LIKE '1, 7%'", "gold": "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 SUBSTRING(t2.\"date\", 1, 7) = '2009-04'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1092, @@ -12017,10 +15293,13 @@ "question": "Give the name of the league had the most matches in the 2008/2009 season", "evidence": "league that had the most matches in the 2008/2009 season refers to MAX(league_name WHERE season = '2008/2009');", "difficulty": "simple", - "pred": "SELECT t2.name FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.\"id\" WHERE t1.\"season\" = '2008/2009' GROUP BY t2._league_name ORDER BY COUNT(t1.season) DESC LIMIT 1", + "pred": "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.name) DESC LIMIT 1", "gold": "SELECT t1.name FROM league AS t1 JOIN match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2008/2009' GROUP BY t1.name HAVING COUNT(t2.id) = (SELECT MAX(match_count) FROM (SELECT COUNT(t2.id) AS match_count FROM match AS t2 WHERE t2.season = '2008/2009' GROUP BY t2.league_id))", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1093, @@ -12028,10 +15307,13 @@ "question": "What is the average overall rating of the players born before the year 1986", "evidence": "average overall rating = DIVIDE(SUM(overall_rating), COUNT(id)); born before the year 1986 refers to strftime('%Y', birthday) < '1986';", "difficulty": "moderate", - "pred": "SELECT AVG(t2.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE STRFTIME('%Y', birthday) < '1986'", + "pred": "SELECT AVG(overall_rating) FROM player_attributes WHERE STRFTIME('%Y', birthday) < '1986'", "gold": "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 SUBSTRING(t1.birthday, 1, 4) < '1986'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1094, @@ -12039,10 +15321,13 @@ "question": "How much higher in percentage is Ariel Borysiuk's overall rating than that of Paulin Puel", "evidence": "how much higher in percentage = MULTIPLY(DIVIDE(SUBTRACT(overall_rating WHERE player_name = 'Ariel Borysiuk', overall_rating WHERE player_name = 'Paulin Puel'), overall_rating WHERE player_name = 'Paulin Puel'), 100);", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.player_name = 'Ariel Borysiuk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.players_id) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.id = t2._player_api_id WHERE STRFTIME('%Y', t1.\"percentage\") = '100'", + "pred": "SELECT CAST(SUM(IIF(t2.player_name = 'Ariel Borysiuk', overall_rating, 0)) AS REAL) * 100 / SUM(IIF(t2.player_name = 'Paulin Puel', overall_rating, 0)) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1095, @@ -12050,10 +15335,13 @@ "question": "How much is the average build up play speed of the Heart of Midlothian team", "evidence": "Heart of Midlothian refers to team_long_name = 'Heart of Midlothian'; average build up play speed refers to  AVG(buildUpPlaySpeed)", "difficulty": "moderate", - "pred": "SELECT AVG(t2.buildupplayspeed) FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = t2.t1.name GROUP BY t1.\"team_name\" ORDER BY COUNT(t1.\"name\") DESC LIMIT 1", + "pred": "SELECT AVG(t2.buildupplayspeed) FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Heart of Midlothian'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1096, @@ -12061,10 +15349,13 @@ "question": "Calculate the average overall rating of Pietro Marino", "evidence": "Pietro Marino refers to player_name = 'Pietro Marino'; average overall rating AVG(T1.overall_rating)", "difficulty": "moderate", - "pred": "SELECT AVG(t1.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.id WHERE player_name = 'Pietro Marino'", + "pred": "SELECT AVG(t1.overall_rating) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE t2.player_name = 'Pietro Marino'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1097, @@ -12072,10 +15363,13 @@ "question": "What is Aaron Lennox's total crossing score", "evidence": "Aaron Lennox's refers to T2.player_name = 'Aaron Lennox'; total crossing score refers to SUM(crossing)", "difficulty": "simple", - "pred": "SELECT SUM(crossing) FROM player WHERE player_name = 'Aaron Lennox'", + "pred": "SELECT SUM(t2.crossing) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t1.player_name = 'Aaron Lennox'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1098, @@ -12083,10 +15377,13 @@ "question": "What is Ajax's highest chance creation passing score and what is it classified as", "evidence": "Ajax's refers to team_long_name = 'Ajax'; chance creation passing score refers to MAX(chanceCreationPassing); classified refer to chanceCreationPassingClass", "difficulty": "moderate", - "pred": "SELECT MAX(t2.chancecreationpassing) FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = t2.name ORDER BY t3.chancecreationpassing ASC LIMIT 1", + "pred": "SELECT t2.chancecreationpassingclass, t2.chancecreationpassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Ajax' ORDER BY t2.chancecreationpassing DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1099, @@ -12094,10 +15391,13 @@ "question": "Which foot is preferred by Abdou Diallo", "evidence": "Abdou Diallo refers to player_name = 'Abdou Diallo'; foot is preferred refers to preferred_foot", "difficulty": "simple", - "pred": "SELECT preferred_foot FROM player WHERE player_name = 'Abdou Diallo'", + "pred": "SELECT preferred_foot FROM player_attributes WHERE player_name = 'Abdou Diallo'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1100, @@ -12105,10 +15405,13 @@ "question": "What is the highest overall rating received by Dorlan Pabon", "evidence": "Dorlan Pabon refers to T2.player_name = 'Dorlan Pabon'; highest overall rating refers to MAX(overall_rating)", "difficulty": "simple", - "pred": "SELECT MAX(t2.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id ORDER BY t2.\"overall\" DESC LIMIT 1", + "pred": "SELECT MAX(overall_rating) FROM player_attributes WHERE player_name = 'Dorlan Pabon'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1101, @@ -12116,10 +15419,13 @@ "question": "What is the average number of goals made by Parma as the away team while playing in Italy", "evidence": "Parma refers to team_long_name = 'Parma'; average number of goals refers to AVG(away_team_goal)", "difficulty": "moderate", - "pred": "SELECT AVG(away_team_goal) FROM team_attributes WHERE team_long_name = 'Parma'", + "pred": "SELECT AVG(t2.away_team_goal) FROM team AS t1 INNER JOIN match AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Parma' AND t2.season = 2021", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1102, @@ -12127,10 +15433,13 @@ "question": "For the players who had a 77 points overall rating on 2016/6/23, who was the oldest? Give the name of the player", "evidence": "77 points overall rating refers to overall_rating = 77; on 2016/6/23 refers to date LIKE '2016-06-23%'; The larger the birthday value, the younger the person is, and vice versa;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_api_id WHERE STRFTIME('%Y', t1.\"date\") = '2016-06-23%' AND t2.\"percentage\" = 77", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t2.overall_rating = 77 AND t2.date LIKE '2016-06-23%'", "gold": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTRING(t2.\"date\", 1, 10) = '2016-06-23' AND t2.overall_rating = 77 ORDER BY t1.birthday ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1103, @@ -12138,10 +15447,13 @@ "question": "What was the overall rating for Aaron Mooy on 2016/2/4", "evidence": "Aaron Mooy refers to player_name = 'Aaron Mooy'; on 2016/2/4 refers to date LIKE '2016-02-04%';", "difficulty": "moderate", - "pred": "SELECT overall_rating FROM player WHERE player_name = 'Aaron Mooy' AND date LIKE '2016-02-04%'", + "pred": "SELECT overall_rating FROM player_attributes WHERE date LIKE '2016-02-04%' AND player_name = 'Aaron Mooy'", "gold": "SELECT t2.overall_rating FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTRING(t2.\"date\", 1, 10) = '2016-02-04' AND t1.player_name = 'Aaron Mooy'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1104, @@ -12149,10 +15461,13 @@ "question": "What was the potiential for Francesco Parravicini on 2010/8/30", "evidence": "Francesco Parravicini refers to player_name = 'Francesco Parravicini'; on 2010/8/30 refers to date = '2010-08-30 00:00:00'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.potiential FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.\"player_id\" WHERE t1.\"playername\" = 'Francesco Parravicini' AND t1.'date\" = 2010-08-30 00:00:00'", + "pred": "SELECT t1.potiential FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE t2.date = '2010-08-30 00:00:00' AND t2.player_name = 'Francesco Parravicini'", "gold": "SELECT t2.potential FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTRING(t2.\"date\", 1, 10) = '2010-08-30' AND t1.player_name = 'Francesco Parravicini'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1105, @@ -12160,10 +15475,13 @@ "question": "How was Francesco Migliore's attacking work rate on 2015/5/1", "evidence": "Francesco Migliore refers to player_name = 'Francesco Migliore'; on 2015/5/1 refers to date LIKE '2015-05-01%';", "difficulty": "moderate", - "pred": "SELECT AVG(t2.attacking_work_rate) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE t1.\"player_name\" = 'Francesco Migliore' AND t2.\"date\" LIKE '2015-05-01%'", + "pred": "SELECT t2.attacking_work_rate FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t1.player_name = 'Francesco Migliore' AND t2.date LIKE '2015-05-01%'", "gold": "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 t2.\"date\" LIKE '2015-05-01%' AND t1.player_name = 'Francesco Migliore'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1106, @@ -12171,10 +15489,13 @@ "question": "Tell the defensive work rate for Kevin Berigaud on 2013/2/22", "evidence": "Kevin Berigaud refers to player_name = 'Kevin Berigaud'; on 2013/2/22 refers to date = '2013-02-22 00:00:00'", "difficulty": "moderate", - "pred": "SELECT defensive_work_rate FROM player WHERE player_name = 'Kevin Berigaud' AND date = '2013-02-22 00:00:00'", + "pred": "SELECT t2.defensive_work_rate FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE t1.player_name = 'Kevin Berigaud' AND t2.date = '2013-02-22 00:00:00'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2013-02-22' AND t1.player_name = 'Kevin Berigaud'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1107, @@ -12182,10 +15503,13 @@ "question": "When was the first time did Kevin Constant have his highest crossing score? Give the date", "evidence": "Kevin Constant refers to player_name = 'Kevin Constant'; highest crossing score refers to MAX(crossing)", "difficulty": "moderate", - "pred": "SELECT t2.date FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2._player_id WHERE t1.\"player_name\" = 'Kevin Constant' ORDER BY COUNT(t2.crossing) DESC LIMIT 1", + "pred": "SELECT t2.date FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t1.player_name = 'Kevin Constant' ORDER BY t2.crossing DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1108, @@ -12193,10 +15517,13 @@ "question": "What was the build up play speed class for \"Willem II\" on 2011/2/22", "evidence": "\"Willem II\" refers to team_long_name = 'Willem II'; on 2011/2/22 refers to date = '2012-02-22'", "difficulty": "moderate", - "pred": "SELECT t2.name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = 'Willem II' AND t1.\"date\" = '2012-02-22'", + "pred": "SELECT t2.buildupplayspeedclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Willem II' AND t2.date = '2012-02-22'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2011-02-22'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1109, @@ -12204,10 +15531,13 @@ "question": "How was the build up play dribbling class for \"LEI\" on 2015/9/10", "evidence": "\"LEI\" refers to team_short_name = 'LEI'; on 2015/9/10 refers to  date = '2015-09-10 00:00:00'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.dribblingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = t2.\"team_short_name\" AND t1.\"date\" = '2015-09-10 00:00:00'", + "pred": "SELECT t2.makeupplaydribblingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_short_name = 'LEI' AND t2.date = '2015-09-10 00:00:00'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2015-09-10'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1110, @@ -12215,10 +15545,13 @@ "question": "Tell the build Up play passing class for \"FC Lorient\" on 2010/2/22", "evidence": "\"FC Lorient\" refers to team_long_name = 'FC Lorient'; on 2010/2/22 refers to date LIKE '2010-02-22%';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.playpassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = 'FC Lorient' AND t1.\"date\" = '2010-02-22'", + "pred": "SELECT t2.makeupplaypassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'FC Lorient' AND t2.date LIKE '2010-02-22%'", "gold": "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 t2.\"date\" LIKE '2010-02-22%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1111, @@ -12226,10 +15559,13 @@ "question": "State the chance creation passing class for \"PEC Zwolle\" on 2013/9/20", "evidence": "\"PEC Zwolle\" refers to team_long_name = 'PEC Zwolle'; on 2013/9/20 refers to date = '2013-09-20 00:00:00'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.chancecreationpassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = 'PEC Zwolle'", + "pred": "SELECT t2.chancecreationpassingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'PEC Zwolle' AND t2.date = '2013-09-20 00:00:00'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2013-09-20'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1112, @@ -12237,10 +15573,13 @@ "question": "What was the chance creation crossing class for \"Hull City\" on 2010/2/22", "evidence": "\"Hull City\" refers to team_long_name = 'Hull City'; on 2010/2/22 refers to date = '2010-02-22 00:00:00'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.chancecreationcrossingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_long_name = 'Hull City'", + "pred": "SELECT t2.chancecreationcrossingclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Hull City' AND t2.date = '2010-02-22 00:00:00'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) = '2010-02-22'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1113, @@ -12248,10 +15587,13 @@ "question": "For the team \"Hannover 96\", what was its defence aggression class on 2015/9/10", "evidence": "\"Hannover 96\" refers to team_long_name = 'Hannover 96'; on 2015/9/10 refers to date LIKE '2015-09-10%';", "difficulty": "moderate", - "pred": "SELECT defenceaggressionclass FROM team_attributes WHERE team_long_name = 'Hannover 96' AND date LIKE '2015-09-10%'", + "pred": "SELECT t2.defenceteamwidthclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'Hannover 96' AND t2.date LIKE '2015-09-10%'", "gold": "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 t2.\"date\" LIKE '2015-09-10%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1114, @@ -12259,10 +15601,13 @@ "question": "What was the average overall rating for Marko Arnautovic from 2007/2/22 to 2016/4/21", "evidence": "average overall rating refers to avg(overall_rating); Marko Arnautovic refers to player_name = 'Marko Arnautovic'; from 2007/2/22 to 2016/4/21 refers to the first 10 characters of date BETWEEN '2007-02-22' and '2016-04-21'", "difficulty": "challenging", - "pred": "SELECT AVG(t2.overall_rating) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player WHERE t1.\"player_name\" = 'Marko Arnautovic' AND t2.\"date\" BETWEEN '2007-02-22' AND '2016-04-21'", + "pred": "SELECT AVG(overall_rating) FROM player_attributes WHERE player_name = 'Marko Arnautovic' AND date BETWEEN '2007-02-22' AND '2016-04-21'", "gold": "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 SUBSTRING(t2.\"date\", 1, 10) BETWEEN '2007-02-22' AND '2016-04-21'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1115, @@ -12270,10 +15615,13 @@ "question": "What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12", "evidence": "Landon Donovan's refers to player_name = 'Landon Donovan'; Jordan Bowery refers to player_name = 'Jordan Bowery'; percentage refers to DIVIDE(SUBTRACT(player_name = 'Landon Donovan' overall_rating; player_name = 'Jordan Bowery' overall_rating), player_name = 'Landon Donovan' overall_rating)*100", "difficulty": "challenging", - "pred": "SELECT CAST(SUBSTRING(CASE WHEN player_name = 'Landon Donovan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.player_name) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2. player_id WHERE t1.\"player_id\" = 'Jordan Bowery' AND t2.\"playtime\" = 2013/7/12", + "pred": "SELECT CAST(SUM(CASE WHEN t2.player_name = 'Landon Donovan' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t2.player_name = 'Jordan Bowery' THEN 1 ELSE 0 END) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t2.date = '2013-07-12'", "gold": "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) AS lvsj_percent FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE SUBSTRING(t2.\"date\", 1, 10) = '2013-07-12'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1116, @@ -12281,10 +15629,13 @@ "question": "List down most tallest players' name", "evidence": "tallest refers to rank based on the height in descending order; Most tallest players refers to rank = 1 ", "difficulty": "simple", - "pred": "SELECT name FROM player WHERE rank = 1 ORDER BY height DESC LIMIT 1", + "pred": "SELECT player_name FROM player WHERE rank = 1 ORDER BY height DESC", "gold": "SELECT player_name FROM (SELECT player_name, height, DENSE_RANK() OVER (ORDER BY height DESC) AS rank FROM player) WHERE rank = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1117, @@ -12292,10 +15643,13 @@ "question": "What are the player api id of 10 heaviest players", "evidence": "heaviest refers to MAX(weight)", "difficulty": "simple", - "pred": "SELECT player_api_id FROM player ORDER BY weight DESC LIMIT 10", + "pred": "SELECT player_fifa_api_id FROM player ORDER BY weight DESC LIMIT 10", "gold": "SELECT player_api_id FROM player ORDER BY weight DESC LIMIT 10", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1118, @@ -12303,10 +15657,13 @@ "question": "List down the name of players who are 35 years old and above", "evidence": "35 years old and above refers to datetime(CURRENT_TIMESTAMP,'localtime') - datetime(birthday) > 34", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.\"player\" = t2.\"player_id\" WHERE t2.birthday LIKE '35%' AND STRFTIME('%Y', CURRENT_TIMESTAMP) > 'localtime'", + "pred": "SELECT DISTINCT player_name FROM player WHERE CURRENT_TIMESTAMP('localtime') - CURRENT_birthday > 34", "gold": "SELECT player_name FROM player WHERE CAST((JULIANDAY('now') - JULIANDAY(birthday)) AS REAL) / 365 >= 35", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1119, @@ -12314,10 +15671,13 @@ "question": "How many home team goal have been scored by Aaron Lennon", "evidence": "Aaron Lennon refers to player_name = 'Aaron Lennon'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.home_team_goal) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.player_id = t2.id WHERE t1.\"player_name\" = 'Aaron Lennon'", + "pred": "SELECT COUNT(*) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_id WHERE t1.player_name = 'Aaron Lennon'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1120, @@ -12325,10 +15685,13 @@ "question": "Sum up the away team goal scored by both Daan Smith and Filipe Ferreira", "evidence": "Daan Smith refers to player_name = 'Daan Smith'; Filipe Ferreira refers to player_name = 'Filipe Ferreira'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.away_team_goal FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.player_api_id = t2._player_id WHERE t1.\"player_name\" = 'Daan Smith' AND t2.\"playtime\" = 1 AND t3.playtime = 'Filipe Ferreira'", + "pred": "SELECT away_team_goal FROM player WHERE player_name IN ('Daan Smith', 'Filipe Ferreira')", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1121, @@ -12336,10 +15699,13 @@ "question": "Calculate the total home team goal scored by players whose age are 30 years old and below", "evidence": "age are 30 years old and below refers to SUBTRACT(datetime(CURRENT_TIMESTAMP,'localtime'), datetime(birthday) < 31)", "difficulty": "moderate", - "pred": "SELECT SUM(t2.home_team_goal) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.player_id = t2.id WHERE t1.\"age\" < 30 AND t2.\"birthday\" < 31", + "pred": "SELECT SUM(CASE WHEN t1.birthday < 31 THEN 1 ELSE 0 END) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1122, @@ -12347,10 +15713,13 @@ "question": "State the name of the most strongest player", "evidence": "strongest players refers to player has MAX(overall_rating)", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY overall_rating LIMIT 1", + "pred": "SELECT player_name FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1123, @@ -12358,10 +15727,13 @@ "question": "What is the name of players with the highest potential", "evidence": "highest potential refers to MAX(potential)", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2._player_fifa_api_id ORDER BY t1.\"potential\" DESC LIMIT 1", + "pred": "SELECT player_name FROM player_attributes WHERE potential = (SELECT MAX(potential) FROM player_attributes)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1124, @@ -12369,10 +15741,13 @@ "question": "Who are the players that tend to be attacking when their mates were doing attack moves? List down their name", "evidence": "tend to be attacking when their mates were doing attack moves refers to attacking_work_rate = 'high';", "difficulty": "moderate", - "pred": "SELECT t2.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1. player_fifa_api_id = t2.\"player_id\" WHERE t1.\"attacking_work_rate\" = 'high' AND t1.'attack_rate' = 'High'", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t2.attacking_work_rate = 'high'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1125, @@ -12380,10 +15755,13 @@ "question": "Among the players with finishing rate of 1, pick the eldest player and state the player's name", "evidence": "eldest player refers to MAX(SUBTRACT(datetime(CURRENT_TIMESTAMP,'localtime'),datetime(birthday))); finishing rate of 1 refers to finishing = 1", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.player_name, t2.birthday FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.\"player_id\" = t2.\"player\" GROUP BY t2._player_title ORDER BY CURRENT_TIMESTAMP DESC LIMIT 1", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id WHERE t1.finished = 1 GROUP BY t1.player_name ORDER BY CURRENT_TIMESTAMP - CURRENT_TIMESTAMP - (localtime - (birthday)) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1126, @@ -12391,10 +15769,13 @@ "question": "State the name of players who came from Belgium", "evidence": "name of players refers to player_name; Belgium is name of country", "difficulty": "simple", - "pred": "SELECT player_name FROM country WHERE name = 'Belgium'", + "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.id WHERE t2.name = 'Belgium'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1127, @@ -12402,10 +15783,13 @@ "question": "Locate players with vision scores of 90 and above, state the country of these players", "evidence": "vision scores of 90 and above refers to vision > 89", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.country FROM player AS t1 INNER JOIN match AS t2 ON t1.player_fifa_api_id = t2._id WHERE t3.vision > 89", + "pred": "SELECT t2.country FROM player AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.country_id WHERE t1.vision > 89", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1128, @@ -12413,10 +15797,13 @@ "question": "Which country's players have the heaviest average weights", "evidence": "heaviest average weights refers to MAX(AVG(weight))", "difficulty": "simple", - "pred": "SELECT t1.player_name FROM player AS t1 INNER JOIN country AS t2 ON t2.country_id = t3.id ORDER BY AVG(t2.weight) DESC LIMIT 1", + "pred": "SELECT t2.name FROM player AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.country_id GROUP BY t2.country_id ORDER BY AVG(t1.weight) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1129, @@ -12424,10 +15811,13 @@ "question": "List down the long name for slow speed class team", "evidence": "slow speed class refers to buildUpPlaySpeedClass = 'Slow'; long name refers to team_long_name", "difficulty": "simple", - "pred": "SELECT team_long_name FROM team_attributes WHERE buildupplayspeedclass = 'Slow'", + "pred": "SELECT t1.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t2.buildupplayspeedclass = 'Slow'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1130, @@ -12435,10 +15825,13 @@ "question": "What are the short name of team who played safe while creating chance of passing", "evidence": "played safe while creating chance of passing refers to chanceCreationPassingClass = 'Safe'; short name of team refers to team_short_name", "difficulty": "moderate", - "pred": "SELECT t2.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.name = t2._team_long_name WHERE t3.chancecreationpassingclass = 'Safe'", + "pred": "SELECT t1.team_short_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t2.chancecreationpassingclass = 'Safe'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1131, @@ -12446,10 +15839,13 @@ "question": "What is the average heights of Italy players", "evidence": "average heights refers to Avg(height); Italy is name of country", "difficulty": "simple", - "pred": "SELECT AVG(height) FROM player WHERE name = 'Italy' ORDER BY height DESC LIMIT 1", + "pred": "SELECT AVG(t1.height) FROM player AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.id WHERE t2.name = 'Italy'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1132, @@ -12460,7 +15856,10 @@ "pred": "SELECT player_name FROM player WHERE height > 180 ORDER BY height DESC LIMIT 3", "gold": "SELECT player_name FROM player WHERE height > 180 ORDER BY player_name LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1133, @@ -12468,10 +15867,13 @@ "question": "How many football players born after the 1990s have the first name \"Aaron\"", "evidence": "first name \"Aaron\" refers to player_name LIKE 'Aaron%'; born after the 1990s refers to birthday > '1990'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM player WHERE player_name LIKE 'Aaron%' AND birthday > '1990'", + "pred": "SELECT COUNT(*) FROM player WHERE birthday > '1990' AND player_name LIKE 'Aaron%'", "gold": "SELECT COUNT(id) FROM player WHERE birthday > '1990' AND player_name LIKE 'Aaron%'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1134, @@ -12479,10 +15881,13 @@ "question": "What is the difference between players 6 and 23's jumping scores", "evidence": "difference between players 6 and 23's jumping scores refers to SUBTRACT(jumping AND id = 6,jumping AND id = 23)", "difficulty": "simple", - "pred": "SELECT SUBSTRING(t1.jumping, t1.id = 6, t2.id) AS REAL) / 23 FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.\"player\" = t2.\"player_id\" WHERE t2._id = 23", + "pred": "SELECT SUM(IIF(jumping AND id = 6, jumping AND id = 23, 1, 0)) - SUM(IIF(jumping AND id = 23, 1, 0)) FROM player", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1135, @@ -12490,10 +15895,13 @@ "question": "Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking", "evidence": "lowest potential players refers to MIN(potential); prefer to use the right foot when attacking refers to preferred_foot = 'right'", "difficulty": "moderate", - "pred": "SELECT player_id FROM player WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 5", + "pred": "SELECT player_fifa_api_id FROM player_attributes WHERE preferred_foot = 'right' ORDER BY potential LIMIT 5", "gold": "SELECT id FROM player_attributes WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1136, @@ -12501,10 +15909,13 @@ "question": "How many players had the highest potential score for crossing that preferred to use their left foots while attacking", "evidence": "highest potential score for crossing refers to MAX(crossing); preferred to use their left foots while attacking refers to preferred_foot = 'left'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.player_id) FROM player AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.id ORDER BY t2.\"crossing\" DESC LIMIT 1", + "pred": "SELECT COUNT(DISTINCT t1.player_id) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_id = t2.player_id WHERE t2.preferred_foot = 'left' ORDER BY t1.crossing DESC LIMIT 1", "gold": "SELECT COUNT(t1.id) FROM player_attributes AS t1 WHERE t1.preferred_foot = 'left' AND t1.crossing = (SELECT MAX(crossing) FROM player_attributes)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1137, @@ -12512,10 +15923,13 @@ "question": "What percentage of players have a strength and stamina score of more than 80", "evidence": "strength and stamina score of more than 80 refers to stamina > 80 and strength > 80", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT player_name) FROM player WHERE stamina > 80 AND strength > 80", + "pred": "SELECT CAST(SUM(CASE WHEN stamina > 80 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN stamina > 80 THEN 1 ELSE 0 END) FROM player", "gold": "SELECT CAST(COUNT(CASE WHEN strength > 80 AND stamina > 80 THEN id ELSE NULL END) AS REAL) * 100 / COUNT(id) FROM player_attributes AS t", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1138, @@ -12523,10 +15937,13 @@ "question": "In what country did the Poland Ekstraklasa take place", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.country FROM match AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.\"country\" WHERE t1.\"name\" = 'Poland Ekstraklasa'", + "pred": "SELECT t2.name FROM match AS t1 INNER JOIN country AS t2 ON t1.country_id = t2.country_id WHERE t2.name = 'Poland Ekstraklasa'", "gold": "SELECT name FROM country WHERE id IN (SELECT country_id FROM league WHERE name = 'Poland Ekstraklasa')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1139, @@ -12534,10 +15951,13 @@ "question": "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", "evidence": "September 24, 2008 refers to date like '2008-09-24%'; in the Belgian Jupiler League refers to League.name = 'Belgium Jupiler League'; final score for home team refers to home_team_goal; final score for away team refers to away_team_goal", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.home_team_goal FROM match AS t1 INNER JOIN team_attributes AS t2 ON t1.team_fifa_api_id = t2._team_id WHERE t1.\"date\" LIKE '2008-09-24%' AND t2.\"away_team-goal\" = 'Home Team' AND STRFTIME('%Y', t2.'date\") = '2008'", + "pred": "SELECT t1.hom_team_goal, t1.away_team_goal FROM team AS t1 INNER JOIN match AS t2 ON t1.team_id = t2.team_id INNER JOIN league AS t3 ON t2.league_id = t3.id WHERE t3.name = 'Belgium Jupiler League' AND t2.date LIKE '2008-09-24%'", "gold": "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 t2.\"date\" LIKE '2008-09-24%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1140, @@ -12545,10 +15965,13 @@ "question": "What are Alexis Blin's sprint speed, agility, and acceleration scores", "evidence": "Alexis Blin's refers to player_name = 'Alexis Blin'", "difficulty": "simple", - "pred": "SELECT sprint_speed, agility, acceleration FROM player WHERE player_name = 'Alexis Blin'", + "pred": "SELECT t2.sprints_speed, t2. agility, t2.acceleration FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.id WHERE t1.player_name = 'Alexis Blin'", "gold": "SELECT sprint_speed, agility, acceleration FROM player_attributes WHERE player_api_id IN (SELECT player_api_id FROM player WHERE player_name = 'Alexis Blin')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1141, @@ -12556,10 +15979,13 @@ "question": "Does the KSV Cercle Brugge team have a slow, balanced or fast speed class", "evidence": "KSV Cercle Brugge refers to team_long_name = 'KSV Cercle Brugge'; speed class refers to buildUpPlaySpeedClass", "difficulty": "moderate", - "pred": "SELECT t2.team_long_name FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.t2.coach_id = t3.id WHERE t1.\"team_name\" = 'KSV Cercle Brugge' ORDER BY t2.\"speed\" DESC LIMIT 1", + "pred": "SELECT t2.buildupplayspeedclass FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.team_id WHERE t1.team_long_name = 'KSV Cercle Brugge'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1142, @@ -12567,10 +15993,13 @@ "question": "In the 2015–2016 season, how many games were played in the Italian Serie A league", "evidence": "In the 2015–2016 season refers to season = '2015/2016'", "difficulty": "simple", - "pred": "SELECT COUNT(t1.id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.id WHERE t2.\"season\" = '2015/2016' AND t1.\"league\" LIKE 'Italian Serie A'", + "pred": "SELECT COUNT(t1.id) FROM match AS t1 INNER JOIN league AS t2 ON t1.league_id = t2.id WHERE t2.name = 'Italian Serie A' AND t1.season BETWEEN 2015 AND 2016", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1143, @@ -12578,10 +16007,13 @@ "question": "What was the highest score of the home team in the Netherlands Eredivisie league", "evidence": "highest score of the home team refers to MAX(home_team_goal)", "difficulty": "simple", - "pred": "SELECT MAX(t2.home_team_goal) FROM team AS t1 INNER JOIN team_attributes AS t2 ON t1.team_id = t2.t1.id GROUP BY team_fifa_api_id HAVING COUNT(team_player_id) > 100 ORDER BY t3.havings DESC LIMIT 1", + "pred": "SELECT t1.hom_team_goal FROM match AS t1 INNER JOIN team_attributes AS t2 ON t2.team_id = t1.team_id INNER JOIN team AS t3 ON t3.team_fifa_api_id = t2.team_fifa_api_id WHERE t3.name = 'Netherlands Eredivisie' ORDER BY t1.hom_team_goal DESC LIMIT 1", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.5, + "table_f1": 0.4 }, { "idx": 1144, @@ -12589,10 +16021,13 @@ "question": "Please state the finishing rate and curve score of the player who has the heaviest weight", "evidence": "finishing rate refer to finishing; curve score refer to curve; heaviest weight refers to MAX(weight)", "difficulty": "simple", - "pred": "SELECT finishing, curve FROM player ORDER BY weight DESC LIMIT 1", + "pred": "SELECT t2.finished, t2. curve FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_id = t2.player_fifa_api_id ORDER BY t1.weight DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1145, @@ -12600,10 +16035,13 @@ "question": "Which top 4 leagues had the most games in the 2015-2016 season", "evidence": "in the 2015-2016 season refers to season = '2015/2016'; league with most games refers to League.name where MAX(COUNT(id))", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM league AS t1 INNER JOIN match AS t2 ON t1.id = t2._league_id WHERE t1.\"season\" = '2015-2016' ORDER BY COUNT(t2.id) DESC LIMIT 4", + "pred": "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 COUNT(t2.name) DESC LIMIT 4", "gold": "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 4", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1146, @@ -12611,10 +16049,13 @@ "question": "Please provide the full name of the away team that scored the most goals", "evidence": "full name refers to team_long_name; away team refers to away_team_api_id; scored the most goals refers to MAX(away_team_goal)", "difficulty": "moderate", - "pred": "SELECT t2.team_long_name FROM away_team_goal AS t1 INNER JOIN team AS t2 ON t1.t2.t1.coach_fifa_api_id = t3.id ORDER BY t1.\"away_team-goal\" DESC LIMIT 1", + "pred": "SELECT t2.team_long_name FROM match AS t1 INNER JOIN team_attributes AS t2 ON t2.team_id = t1.team_id WHERE t1.away_team_goal = (SELECT MAX(away_team_goal) FROM match)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1147, @@ -12622,10 +16063,13 @@ "question": "Please name one player whose overall strength is the greatest", "evidence": "overall strength is the greatest refers to MAX(overall_rating)", "difficulty": "simple", - "pred": "SELECT player_name FROM player ORDER BY overall_rating DESC LIMIT 1", + "pred": "SELECT player_name FROM player_attributes ORDER BY overall_rating DESC LIMIT 1", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1148, @@ -12633,10 +16077,13 @@ "question": "What is the percentage of players that are under 180 cm who have an overall strength of more than 70", "evidence": "percentage refers to DIVIDE(COUNT(height < 180 AND overall_rating > 70),COUNT(id)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN height < 180 AND overall_rating > 70 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.player_id) FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.id = t2.player", + "pred": "SELECT CAST(SUM(IIF(t2.height < 180 AND t2.overall_rating > 70, 1, 0)) AS REAL) * 100 / COUNT(t1.player_fifa_api_id) FROM player_attributes AS t1 INNER JOIN player AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id", "gold": "SELECT CAST(COUNT(CASE WHEN t2.overall_rating > 70 THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) AS percent FROM player AS t1 INNER JOIN player_attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height < 180", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1149, @@ -12644,10 +16091,13 @@ "question": "Are there more in-patient or outpatient who were male? What is the deviation in percentage", "evidence": "male refers to SEX = 'M'; in-patient refers to Admission = '+'; outpatient refers to Admission = '-'; percentage = DIVIDE(COUNT(ID) where SEX = 'M' and Admission = '+', COUNT(ID) where SEX  = 'M' and Admission = '-')", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.sEX = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t1. Admission = '+'", + "pred": "SELECT CAST(SUM(CASE WHEN admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM patient WHERE sex = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1150, @@ -12655,10 +16105,13 @@ "question": "What is the percentage of female patient were born after 1930", "evidence": "female refers to Sex = 'F'; patient who were born after 1930 refers to year(Birthday) > '1930'; calculation = DIVIDE(COUNT(ID) where year(Birthday) > '1930' and SEX = 'F'), (COUNT(ID) where SEX = 'F')", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE STRFTIME('%Y', t1.\"birthday\") > '1930'", + "pred": "SELECT CAST(SUM(IIF(sex = 'F', 1, 0)) AS REAL) * 100 / COUNT(id) FROM patient WHERE STRFTIME('%Y', birthday) > '1930'", "gold": "SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient WHERE sex = 'F'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1151, @@ -12666,10 +16119,13 @@ "question": "For patient born between Year 1930 to 1940, how many percent of them were inpatient", "evidence": "patient born between Year 1930 to 1940 refers to year(Birthday) BETWEEN '1930-01-01' AND '1940-12-31'; inpatient refers to Admission = '+'", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.year(year) BETWEEN '1930-01-01' AND '1940-12-31' AND admission = '+'", + "pred": "SELECT CAST(SUM(CASE WHEN t1. Admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t1.birthday) BETWEEN '1930' AND '1940'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1152, @@ -12677,10 +16133,13 @@ "question": "What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient", "evidence": "'SLE' diagnosed patient means Diagnosis = 'SLE'; inpatient refers to Admission = '+'; outpatient refers to Admission = '-'; calculation = DIVIDE(COUNT(ID) where Diagnosis = 'SLE' and Admission = '+', COUNT(ID) where Diagnosis = 'SLE' and Admission = '-')", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.laborer = t2.\"laborer\" WHERE t1.\"description\" = '%SLE%' AND t3. Admission = '+'", + "pred": "SELECT CAST(SUM(CASE WHEN t1. Admission = '+' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t1. Admission = '+' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.diagnosis = 'SLE'", "gold": "SELECT SUM(CASE WHEN admission = '+' THEN 1.0 ELSE 0 END) / SUM(CASE WHEN admission = '-' THEN 1 ELSE 0 END) FROM patient WHERE diagnosis = 'SLE'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1153, @@ -12688,10 +16147,13 @@ "question": "What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient", "evidence": "'30609' is the Patient ID; disease means Diagnosis", "difficulty": "simple", - "pred": "SELECT DATE FROM patient WHERE diagnosis = '30609'", + "pred": "SELECT DISTINCT t1.description, t2.\"date\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.id = 30609", "gold": "SELECT t1.diagnosis, t2.date FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t1.id = 30609", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1154, @@ -12699,10 +16161,13 @@ "question": "State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had", "evidence": "When was the examination taken refers to \"Examination Date\"", "difficulty": "simple", - "pred": "SELECT sex, birthday FROM patient WHERE id = '163109'", + "pred": "SELECT t1.sex, t1.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.id = 163109", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1155, @@ -12710,10 +16175,13 @@ "question": "List the patient ID, sex and birthday of patient with LDH beyond normal range", "evidence": "LDH beyond normal range refers to LDH > '500';", "difficulty": "simple", - "pred": "SELECT id, sex, birthday FROM patient WHERE LDH > '500'", + "pred": "SELECT t1.id, t1.sex, t1.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labyrinthine WHERE t2.lh > 500", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1156, @@ -12721,10 +16189,13 @@ "question": "State the ID and age of patient with positive degree of coagulation", "evidence": "age refers to SUBTRACT(year(current_timestamp), year(Birthday)); positive degree of coagulation refers to RVVT = '+';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2\"vvvft\" = '+'", + "pred": "SELECT DISTINCT t1.id, STRFTIME('%Y', t1.birthday) - STRFTIME('%Y', t1.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.vacation = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1157, @@ -12732,10 +16203,13 @@ "question": "For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with", "evidence": "severe degree of thrombosis refers to thrombosis = 2; disease refers to diagnosis;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id, t2.sex, t3.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"patient\" = t2.\"id\" WHERE t2\".thrombosis\" = 2", + "pred": "SELECT id, sex, diagnosis FROM patient WHERE thrombosis = 2", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1158, @@ -12743,10 +16217,13 @@ "question": "List all patients who were born in 1937 whose total cholesterol was beyond the normal range", "evidence": "who were born in 1937 refers to year(birthday) = '1937'; total cholesterol was beyond the normal range refers to \"T-CHO\" > = '250'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.name FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"t-cho\" > '250' AND STRFTIME('%Y', t2\"birthday\") = '1937'", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t1.\"birthday\") = '1937' AND t1.\"t-cho\" >= 250", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1159, @@ -12754,10 +16231,13 @@ "question": "For patient with albumin level lower than 3.5, list their ID, sex and diagnosis", "evidence": "albumin level lower than 3.5 refers to ALB < 3.5;", "difficulty": "simple", - "pred": "SELECT id, sex, diagnosis FROM patient WHERE ALB < 3.5", + "pred": "SELECT id, sex, diagnosis FROM patient WHERE alb < 3.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1160, @@ -12765,10 +16245,13 @@ "question": "What is the percentage of female patient had total protein not within the normal range", "evidence": "female refers to sex = 'F'; total protein not within the normal range refers to TP < '6.0' or TP > '8.5'; calculation = DIVIDE((ID where sex = 'F' and TP < '6.0' or TP > '8.5'), COUNT(ID)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST((SUM(CASE WHEN sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"sex\" < '6.0' AND t2.\"TP > '8.5'", + "pred": "SELECT CAST(SUM(CASE WHEN sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM patient WHERE TP < '6.0' OR TP > '8.5'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1161, @@ -12776,10 +16259,13 @@ "question": "For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration", "evidence": "in-patient refers to Admission = '+'; age 50 and above refers to SUBTRACT(year(current_timestamp), year(Birthday)) >= '50'; average anti-cardiolipin antibody (IgG) concentration refers to AVG(aCL IgG)", "difficulty": "challenging", - "pred": "SELECT AVG(t1.aCL IgG) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t2.\"age 50\" AND t1.\"birthday\" >= '50' GROUP BY t2\"t1.\"date\" ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT AVG(aCL IgG) FROM patient WHERE admission = '+' AND year(birthday) >= 50", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1162, @@ -12787,10 +16273,13 @@ "question": "How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic", "evidence": "female refers to sex = 'F'; came at the hospital in 1997 refers to year(Description) = '1997'; immediately followed at the outpatient clinic refers to Admission = '-'", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.sex = 'F' AND t2 \"description\" = '1997'", + "pred": "SELECT COUNT(id) FROM patient WHERE description LIKE '1997%' AND sex = 'F' AND admission = '-'", "gold": "SELECT COUNT(*) FROM patient WHERE STRFTIME('%Y', description) = '1997' AND sex = 'F' AND admission = '-'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1163, @@ -12798,10 +16287,13 @@ "question": "What was the age of the youngest patient when they initially arrived at the hospital", "evidence": "age refers to SUBTRACT(YEAR(\"First Date\"),YEAR(Birthday))", "difficulty": "simple", - "pred": "SELECT AVG(t2.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id GROUP BY t1.\"patient\" ORDER BY t2.\"first date\" DESC LIMIT 1", + "pred": "SELECT STRFTIME('%Y', birthday) - STRFTIME('%Y', birthday) FROM patient ORDER BY STRFTIME('%Y', birthday) DESC LIMIT 1", "gold": "SELECT MIN(STRFTIME('%Y', \"first date\") - STRFTIME('%Y', birthday)) FROM patient", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1164, @@ -12809,10 +16301,13 @@ "question": "How many of the patients with the most serious thrombosis cases examined in 1997 are women", "evidence": "the most serious thrombosis refers to Thrombosis = '1' (the most severe one); women refers to sex = 'F'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.sex = 'F' AND t1.thrombosis = '1'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE STRFTIME('%Y', t2.date) = '1997' AND t1.sex = 'F' AND t2.thrombosis = '1'", "gold": "SELECT COUNT(*) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.sex = 'F' AND STRFTIME('%Y', t2.\"examination date\") = '1997' AND t2.thrombosis = 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1165, @@ -12820,10 +16315,13 @@ "question": "What is the age gap between the youngest and oldest patient with a normal triglyceride recorded", "evidence": "age gap refers to SUBTRACT(MAX(year(Birthday)) - MIN(year(Birthday))); normal triglyceride refers to tg > = 200", "difficulty": "moderate", - "pred": "SELECT MAX(t1.year) - MIN(t2.birthday) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE tg > 200", + "pred": "SELECT MAX(t1.birthday) - MIN(t1.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.tg > 200", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1166, @@ -12831,10 +16329,13 @@ "question": "What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis", "evidence": "The larger the birthday value, the younger the person is, and vice versa; symptoms observed refers to the symptoms is not NULL", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.symptom FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"birthday\" = '2018' AND t3.is NULL", + "pred": "SELECT DISTINCT t1.description, t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.birthday = (SELECT MIN(birthday) FROM patient)", "gold": "SELECT t2.symptoms, t1.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE NOT t2.symptoms IS NULL ORDER BY t1.birthday DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1167, @@ -12842,10 +16343,13 @@ "question": "For the year that concluded on December 31, 1998, how many male patients on average were tested in the lab each month", "evidence": "the year that concluded on December 31, 1998 refers to Date BETWEEN '1998-01-01' AND '1998-12-31'; male refers to SEX = 'M'; calculation = DIVIDE(COUNT(ID), 12)", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"lab\" = t2.id WHERE t2.\"date\" BETWEEN '1998-01-01' AND '1999-12-31'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'M' THEN 1 ELSE 0 END) AS REAL) / 12 FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.date) = '1998'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1168, @@ -12853,10 +16357,13 @@ "question": "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", "evidence": "The larger the birthday value, the younger the person is, and vice versa; 'SJS' refers to diagnosis; (SUBTRACT(year(\"First Date\")), year(Birthday)); age of the patients when they initially arrived at the hospital refers to year(Birthday)", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.date, t2.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" WHERE t1\"description = 'SJS' AND t1 \"first date\" = 'date'", + "pred": "SELECT STRFTIME('%Y', t1.\"date\") - STRFTIME('%Y', t1.\"birthday\") FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.description = 'SJS'", "gold": "SELECT t1.date, STRFTIME('%Y', t2.\"first date\") - STRFTIME('%Y', t2.birthday), t2.birthday FROM laboratory AS t1 INNER JOIN patient AS t2 ON t1.id = t2.id WHERE t2.diagnosis = 'SJS' AND NOT t2.birthday IS NULL ORDER BY t2.birthday ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1169, @@ -12864,10 +16371,13 @@ "question": "What is the ratio of male to female patients among all those with abnormal uric acid counts", "evidence": "male refers to SEX = 'M'; female refers to SEX = 'F'; abnormal uric acid refers to UA < = '8.0' where SEX = 'M', UA < = '6.5' where SEX = 'F'; calculation = DIVIDE(SUM(UA <= '8.0' and SEX = 'M'), SUM(UA <= '6.5 and SEX = 'F'))", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.sEX = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber WHERE t1.\"sEX\" = 'F'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.ua < 8.0 AND t2.ua < 6.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1170, @@ -12875,10 +16385,13 @@ "question": "How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit", "evidence": "hadn't undergone a medical examination until at least a year refers to SUBTRACT(year(\"Examination Date\"), year(\"First Date\")) > = 1", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t2.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE STRFTIME('%Y', t1.\"examination date\") > 1 AND SUBSTRING(t2.year, t1\"date) > 1", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.\"examination date\") - STRFTIME('%Y', t2.\"first date\")) > 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1171, @@ -12886,10 +16399,13 @@ "question": "How many underage patients were examined during the course of the three-year period from 1990 to 1993", "evidence": "underage patients refers to year(Birthday) < 18; three-year period from 1990 to 1993 refers to year(\"Examination Date\") between '1990' and '1993'", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.birthday < 18 AND STRFTIME('%Y', t2.'examination date\") BETWEEN '1990' AND '1993'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.\"examination date\") BETWEEN '1990' AND '1993' AND t1.birthday < 18", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1172, @@ -12897,10 +16413,13 @@ "question": "How many male patients have elevated total bilirubin count", "evidence": "male refers to SEX = 'M'; elevated means above the normal range; total bilirubin above the normal range refers to \"T-BIL\" >= '2.0'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"t-bil\" >= '2.0'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.\"t-bil\" >= 2.0 AND t1.sex = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1173, @@ -12908,10 +16427,13 @@ "question": "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", "evidence": "the most common illness refers to MAX(COUNT(Diagnosis)); lab work between 1/1/1985 and 12/31/1995 refers to \"Examination Date\" between '1985-01-01' and '1995-12-31 '", "difficulty": "challenging", - "pred": "SELECT MAX(t1.diagnosis) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"examination date\" BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY t1.\"description\" ORDER BY COUNT(t2.description) DESC LIMIT 1", + "pred": "SELECT t2.diagnosis FROM examination AS t1 INNER JOIN patient AS t2 ON t1.id = t2.patient WHERE t1.\"examination date\" BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY t2.diagnosis ORDER BY COUNT(t2.id) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1174, @@ -12919,10 +16441,13 @@ "question": "What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991", "evidence": "average age of patients as of year 1999 refers to AVG(SUBTRACT('1999', year(Birthday))); October of 1991 refers to Date BETWEEN '1991-10-01' AND '1991-10-30'", "difficulty": "moderate", - "pred": "SELECT AVG(t2.birthday) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"date\" BETWEEN '1991-10-01' AND '1991-'10-30'", + "pred": "SELECT AVG(t1.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.date) = '1999'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1175, @@ -12930,10 +16455,13 @@ "question": "How old was the patient who had the highest hemoglobin count at the time of the examination, and what is the doctor's diagnosis", "evidence": "How old the patient refers to SUBTRACT(year(\"Examination Date\"), year(Birthday)); the highest hemoglobin count refers to MAX(HGB)", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.date, t1.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"patient\" = t2.\"id\" GROUP BY t2\".date\" ORDER BY COUNT(t1.hgb) DESC LIMIT 1", + "pred": "SELECT STRFTIME('%Y', t1.\"examination date\") - STRFTIME('%Y', t1.birthday), t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.hg = (SELECT MAX(hg) FROM patient)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1176, @@ -12941,10 +16469,13 @@ "question": "What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2", "evidence": "anti-nucleus antibody refers to ANA; 1996/12/2 refers to \"Examination Date\" = '1996-12-02'", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t1.a = '3605340' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.id = 3605340", + "pred": "SELECT t1.\"ana pattern\" FROM examination AS t1 INNER JOIN patient AS t2 ON t1.id = t2.patient WHERE t2.id = 3605340 AND t1.\"examination date\" = '1996-12-02'", "gold": "SELECT ana FROM examination WHERE id = 3605340 AND \"examination date\" = '1996-12-02'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1177, @@ -12952,10 +16483,13 @@ "question": "Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level", "evidence": "total cholesterol normal level refers to N < 250", "difficulty": "simple", - "pred": "SELECT SUM(CASE WHEN n < 250 THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"id\" = 2927464 AND t1.\"date\" = '1995-9-4'", + "pred": "SELECT SUM(IIF(N < 250, 1, 0)) FROM patient WHERE id = 2927464 AND date = '1995-09-4'", "gold": "SELECT CASE WHEN \"t-cho\" < 250 THEN 'Normal' ELSE 'Abnormal' END FROM laboratory WHERE id = 2927464 AND date = '1995-09-04'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1178, @@ -12963,10 +16497,13 @@ "question": "What was the gender of the first AORTITIS diagnosed patient", "evidence": "gender means SEX; 'AORTITIS' refers to Diagnosis;", "difficulty": "simple", - "pred": "SELECT sex FROM patient WHERE diagnosis = 'AORTITIS'", + "pred": "SELECT t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.description = 'AORTITIS'", "gold": "SELECT sex FROM patient WHERE diagnosis = 'AORTITIS' AND NOT \"first date\" IS NULL ORDER BY \"first date\" ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1179, @@ -12974,10 +16511,13 @@ "question": "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", "evidence": "diagnosed with SLE refers to Diagnosis = 'SLE'; 1994/2/19 refers to Description = '1994-02-19'; anti-Cardiolipin refers to aCL IgM; 1993/11/12 refers to Examination Date = '1993/11/12'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"description\" = 'SLE' AND t1\"description = '1994-02-19'", + "pred": "SELECT t1.avgma FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.description = 'SLE' AND t2.description = '1994-02-19' AND t2.description = '1994-03-19' AND t2.albosis = 'SLE' AND t2.description = '1994-03-19'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1180, @@ -12985,10 +16525,13 @@ "question": "Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12", "evidence": "man refers to SEX = 'M'; women refers to SEX = 'F'; ALT glutamic pylvic transaminase status got 9 GPT = '9'; 1992/6/12 refers to Date = '1992-06-12'", "difficulty": "moderate", - "pred": "SELECT t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE STRFTIME('%Y', t1.\"date\") = '1992-06-12' AND t1 \"sex\" = 'M' AND 'sEX = 'F'", + "pred": "SELECT t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.date = '1992-06-12' AND t2.gpt = 9 AND t1.sex = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1181, @@ -12996,10 +16539,13 @@ "question": "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", "evidence": "how old at that time refers to SUBTRACT(year(test date), year(Birthday)); uric acid level as 8.4 refers to UA = '8.4'; 1991/10/21 refers to Date = '1991-10-21'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.date FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"date\" = '1991-10-21' AND t1\"unit = '8.4'", + "pred": "SELECT STRFTIME('%Y', t1.\"date\") - STRFTIME('%Y', t1.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.date = '1991-10-21' AND t2.ua = 8.4", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1182, @@ -13007,10 +16553,13 @@ "question": "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", "evidence": "1991/6/13 refers to \"First Date\" = '1991-06-13'; 'SJS' refers to Diagnosis; total number of his/her Laboratory tests refers to COUNT(ID); 1995 refers to Date", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.diagnosis = 'SJS' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"first date\" = '1991-06-13'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"first date\" = '1991-06-13' AND t1.diagnosis = 'SJS'", "gold": "SELECT COUNT(*) FROM laboratory WHERE id = (SELECT id FROM patient WHERE \"first date\" = '1991-06-13' AND diagnosis = 'SJS') AND STRFTIME('%Y', date) = '1995'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1183, @@ -13018,10 +16567,13 @@ "question": "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", "evidence": "'SLE' AND original diagnose refers to diagnosis; 1997/1/27 refer to \"Examination Date\" = '1997-01-27'; first came to the hospital refers to patient.\"First Date\"", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"first date\" = '1997-01-27'", + "pred": "SELECT DISTINCT t2.\"first date\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.description = 'First Date' AND t1.description = 'SLE' AND t2.\"examination date\" = '1997-01-27'", "gold": "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\"", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1184, @@ -13029,10 +16581,13 @@ "question": "For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.symptom FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"birthday\" = 1959/3/27", + "pred": "SELECT DISTINCT t2. symptoms FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.birthday = '1961-03-27'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1185, @@ -13040,10 +16595,13 @@ "question": "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", "evidence": "born on 1959/2/18 refers to Birthday = '1959-02-18'; calculation = SUBTRACT(SUM(Birthday = '1959-02-18' and Date like '1981-11-%' THEN \"T-CHO\"), SUM(Birthday = '1959-02-18' and Date like '1981-12-%' THEN \"T-CHO\"))", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.birthday = '1959-02-18' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(t2.date) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labyrinth\"", + "pred": "SELECT SUM(CASE WHEN t1.birthday = '1959-02-18' THEN 1 ELSE 0 END) - SUM(CASE WHEN t1.birthday = '1981-12-18' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.\"date\") BETWEEN '1961-01-18' AND '1981-12-18'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1186, @@ -13051,10 +16609,13 @@ "question": "Lists all patients by ID who were diagnosed with Behcet's and had their exams between 01/01/197 and 12/31/1997", "evidence": "'Behcet' refers to diagnosis; exam between 01/01/1997 and 12/31/1997 refers to YEAR(Description) > = '1997-1-1' AND YEAR(Description) < '1998-1-1'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.description LIKE 'Behcet%' AND t3.year BETWEEN '1997-01-01' AND '12-31-31'", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.description LIKE '%Behcet%' AND t2.date BETWEEN '1997-01-01' AND '1997-12-31'", "gold": "SELECT id FROM examination WHERE \"examination date\" BETWEEN '1997-01-01' AND '1997-12-31' AND diagnosis = 'Behcet'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1187, @@ -13062,10 +16623,13 @@ "question": "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", "evidence": "examined between 1987/7/6 and 1996/1/31 refers to Date BETWEEN '1987-07-06' AND '1996-01-31'; GPT level greater than 30 refers to GPT > 30; ALB level less than 4 ALB < 4", "difficulty": "moderate", - "pred": "SELECT COUNT(id) FROM patient WHERE date BETWEEN '1987-07-06' AND '1996-01-31' AND gpt > 30 AND ALB < 4", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.date BETWEEN '1987-07-06' AND '1996-01-31' AND t2.gpt > 30 AND t2.alb < 4", "gold": "SELECT DISTINCT id FROM laboratory WHERE date BETWEEN '1987-07-06' AND '1996-01-31' AND gpt > 30 AND alb < 4", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1188, @@ -13073,10 +16637,13 @@ "question": "How many female patients born in 1964 were admitted to the hospital? List them by ID", "evidence": "female refers to SEX = 'F'; born in 1964 refers to YEAR(Birthday) = 1964; admitted to the hospital refers to Admission = '+'", "difficulty": "simple", - "pred": "SELECT COUNT(id) FROM patient WHERE sex = 'F' AND admission = '+'", + "pred": "SELECT COUNT(id) FROM patient WHERE SUBSTRING(birthday, 1, 4) = '1964' AND admission = '+'", "gold": "SELECT id FROM patient WHERE STRFTIME('%Y', birthday) = '1964' AND sex = 'F' AND admission = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1189, @@ -13084,10 +16651,13 @@ "question": "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", "evidence": "thrombosis level 2 refers to Thrombosis = 2; ANA pattern of only S refers to ANA = 'S'; average anti-Cardiolip in antibody (IgM) refers to AVG(\"aCL IgM\"); calculation = MULTIPLY(AVG + AVG, 0.2)", "difficulty": "challenging", - "pred": "SELECT COUNT(*) FROM patient WHERE thrombosis = 2 AND ANA = 'S' AND AVG(\"aCL IgM\") > 20", + "pred": "SELECT CAST(SUM(CASE WHEN t1.aCL IgM = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.thrombosis = 2 AND t1.a = 'S'", "gold": "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')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1190, @@ -13095,10 +16665,13 @@ "question": "What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range", "evidence": "proteinuria level within the normal range refers to \"U-PRO\" > 0 AND \"U-PRO\" < 30; uric acid level below the normal range refers to UA < = 6.5; calculation = MULTIPLY(DIVIDE(UA < = 6.5, \"U-PRO\" > 0 AND \"U-PRO\" < 30),100)", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN \"U-PRO\" > 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient WHERE \"u-pro\" < 30", + "pred": "SELECT CAST(SUM(CASE WHEN t1.\"u-pro\" > 0 AND t1.\"u-PRO\" < 30 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labels WHERE t2.\"u-pro\" > 0 AND t2.\"u-PRO\" < 30", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1191, @@ -13106,10 +16679,13 @@ "question": "What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET", "evidence": "male refers to SEX = 'M'; first presented to the hospital in 1981 refers to YEAR(\"FIRST DATE\") = '1981'; BEHCET refers to diagnosis; calculation = DIVIDE(SUM(DIAGNOSIS = 'BEHCET') where YEAR(\"FIRST DATE\") = '1981', MULTIPLY(COUNT(YEAR(\"FIRST DATE\") = '1981')), 100)", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.sex = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.laborer = t2.\"laborer\" WHERE STRFTIME('%Y', t1.\"first date\") = '1981'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t1.\"date\") = '1981' AND t1.sex = 'M'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1192, @@ -13117,10 +16693,13 @@ "question": "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", "evidence": "followed up at the outpatient clinic refers to Admission = '-'; laboratory test in April 1981 refers to Date like '1991-10%'; blood bilirubin level within the normal range refers to T-BIL < 2.0; ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.patient FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"date\" LIKE '1991-10%' AND t1 \"t-bil\" < 2.0 AND t3.description LIKE '%%%'", + "pred": "SELECT t1.first, t1.last FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.date LIKE '1991-10%' AND t1. Admission = '-' AND t1.\"t-bil\" < 2.0", "gold": "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 t2.date LIKE '1991-10-%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1193, @@ -13128,10 +16707,13 @@ "question": "Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989", "evidence": "Excluding all P only ANA Pattern refers to \"ANA Pattern\"! = 'P'; women refers to SEX = 'F'; born between 1980 and 1989 refers to BIRTHDAY", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"patient\" = t2.id WHERE t2.\"ana pattern\" = 'P' AND t1.sex = 'F'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.\"ana pattern\" = 'P' AND t1.birthday = 'F' AND t1.sex = 'F'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1194, @@ -13139,10 +16721,13 @@ "question": "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", "evidence": "PSS' refers to diagnosis; blood level of C-reactive protein de 2+refers to CRP > 2; createnine 1 refers to CRE = 1; LDH 123 refers to LDH = 123", "difficulty": "challenging", - "pred": "SELECT t2.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"c-reactive protein de 2+refers to CRP > 2 AND t1\"lh = 123", + "pred": "SELECT t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.description = 'Physical Examination' AND t2.cp > 2 AND t2.lp = 1 AND t2.description = 'LDH 123'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1195, @@ -13150,10 +16735,13 @@ "question": "What is the average blood albumin level for female patients with a PLT greater than 400 who have been diagnosed with SLE", "evidence": "average blood albumin level refers to AVG(ALB); female refers to SEX = 'F'; PLT greater than 400 refers to PLT > 400; diagnosed with SLE refers to Diagnosis= 'SLE'", "difficulty": "moderate", - "pred": "SELECT AVG(t1.alb) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"plt\" > 400 AND t2.\"diagnosis\" = 'SLE'", + "pred": "SELECT AVG(t1.alb) FROM laboratory AS t1 INNER JOIN patient AS t2 ON t1.id = t2.labrasa WHERE t2.sex = 'F' AND t2.diagnosis = 'SLE' AND t2.plt > 400", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1196, @@ -13161,10 +16749,13 @@ "question": "What is the most common sign of patients with SLE disease", "evidence": "the most common sign refers to MAX(symptoms); 'SLE' refers to diagnosis", "difficulty": "simple", - "pred": "SELECT MAX(t1.symptoms) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id ORDER BY t1.\"symptoms\" DESC LIMIT 1", + "pred": "SELECT iga FROM patient WHERE diagnosis = 'SLE' GROUP BY iga ORDER BY COUNT( iga) DESC LIMIT 1", "gold": "SELECT symptoms FROM examination WHERE diagnosis = 'SLE' GROUP BY symptoms ORDER BY COUNT(symptoms) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1197, @@ -13172,10 +16763,13 @@ "question": "When was the medical information on patient number 48473 first documented, and what disease did she have", "evidence": "medical information first documented refers to Description; disease refers to diagnosis; patient number refers to id", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.description, t1.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t1\"id = 48473", + "pred": "SELECT t2.\"date\", t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.id = 48473", "gold": "SELECT \"first date\", diagnosis FROM patient WHERE id = 48473", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1198, @@ -13183,10 +16777,13 @@ "question": "How many female patients were given an APS diagnosis", "evidence": "female refers to SEX = 'F'; APS diagnosis refers to Diagnosis='APS'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE diagnosis = 'APS' AND sex = 'F'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.sex = 'F' AND t2.diagnosis = 'APS'", "gold": "SELECT COUNT(id) FROM patient WHERE sex = 'F' AND diagnosis = 'APS'", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1199, @@ -13194,10 +16791,13 @@ "question": "How many patients who underwent testing in 1997 had protein levels outside the normal range", "evidence": "underwent testing in 1997 refers to YEAR(DATE) = '1997'; protein levels within the normal range refers to tp > 6 and tp < 8.5", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE STRFTIME('%Y', tp > 6 AND tp < 8.5", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE STRFTIME('%Y', t2.\"date\") = '1997' AND t2.tp > 6 AND t2.tp < 8.5", "gold": "SELECT COUNT(id) FROM laboratory WHERE (alb <= 6.0 OR alb >= 8.5) AND STRFTIME('%Y', date) = '1997'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1200, @@ -13205,10 +16805,13 @@ "question": "What proportion of patients who had signs of thrombocytopenia had SLE diagnosed", "evidence": "thrombocytopenia' refers to symptoms; 'SLE' refers to diagnosis; calculation = DIVIDE(SUM(DIAGNOSIS LIKE '%ITP%'), SUM(DIAGNOSIS LIKE '%SLE%')) MULTIPLY 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.symptom LIKE '%SLE%' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.id WHERE t2.\"diagnosis\" = 'SLE'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t2.diagnosis = 'SLE' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient", "gold": "SELECT CAST(SUM(CASE WHEN diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM examination WHERE symptoms = 'thrombocytopenia'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1201, @@ -13216,10 +16819,13 @@ "question": "What percentage of patients who were born in 1980 and were diagnosed with RA are women", "evidence": "born in 1980 refers to YEAR(BIRTHDAY) = '1980'; 'RA' refers to Diagnosis='RA' ; women refers to SEX = 'F'; calculation = DIVIDE(SUM(SEX = 'F'), COUNT(SEX)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.diagnosis = 'RA'", + "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.sex) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t1.birthday) = '1980' AND t2.diagnosis = 'RA'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1202, @@ -13227,10 +16833,13 @@ "question": "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", "evidence": "male refers to SEX = 'M'; underwent testing between 1995 and 1997 refers to \"Examination Date\" between '1995' and '1997'; Behcet refers to diagnosis; did not stay in the hospital refers to Admission = '-'", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.sEX = 'M' AND t1\"description\" = 'Behcet Disease'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'M' AND t2.description = 'Male' AND t2.description = 'Examination Date' BETWEEN '1995' AND '1997' AND t2.description = 'Male' AND t2.diagnosis = 'Bcet'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1203, @@ -13238,10 +16847,13 @@ "question": "How many patients who were female got white blood cells that were below 3.5", "evidence": "female refers to SEX = 'F'; white blood cells that were below 3.5 refers to WBC < 3.5", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'F' AND wbc < 3.5", + "pred": "SELECT COUNT(id) FROM patient WHERE sex = 'F' AND wbc < 3.5", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1204, @@ -13249,10 +16861,13 @@ "question": "How long did it take after patient number 821298 arrived at the hospital for the first time before her evaluation began", "evidence": "DATEDIFF(\"Examination Date\", \"First Date\")", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.date FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"patient number 821298\" = '821298'", + "pred": "SELECT STRFTIME('%J', t2.\"date\") - STRFTIME('%J', t2.\"first date\") FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.id = 821298", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1205, @@ -13260,10 +16875,13 @@ "question": "Was the patient with the number 57266's uric acid within a normal range", "evidence": "uric acid within a normal range refers to UA > 8.0 and SEX = 'M'OR UA > 6.5 and SEX = 'F'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"u-pro\" = 57266", + "pred": "SELECT DISTINCT t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.id = 57266 AND t1.ssa = 'M' OR t1.ssa = 'F'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1206, @@ -13271,10 +16889,13 @@ "question": "When is the laboratory examination of patient '48473' where his/her AST glutamic oxaloacetic transaminase (GOT) index is above the normal range", "evidence": "AST glutamic oxaloacetic transaminase (GOT) index is above the normal range refers to GOT > = 60; when refers to DATE", "difficulty": "simple", - "pred": "SELECT DATE FROM patient WHERE GOT > 60 AND gpt > 60", + "pred": "SELECT t2.\"date\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.id = 48473 AND t2.gpt > 60", "gold": "SELECT date FROM laboratory WHERE id = 48473 AND got >= 60", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1207, @@ -13282,10 +16903,13 @@ "question": "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", "evidence": "AST glutamic oxaloacetic transaminase (GOT) index is within normal range refers to GOT < 60; examination in 1994 refers to year(Date) = 1994", "difficulty": "moderate", - "pred": "SELECT t2.sex, t2.\"date\" FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2._labernumber WHERE STRFTIME('%Y', t1.\"date\") = '1994' AND GOT < 60", + "pred": "SELECT t1.sex, t1.date FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.\"date\") = '1994' AND t2.gpt < 60", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1208, @@ -13293,10 +16917,13 @@ "question": "Provide IDs for male patients with ALT glutamic pylvic transaminase (GPT) that have history of ALT glutamic pylvic transaminase (GPT) exceed the normal range", "evidence": "male refers to SEX = 'M'; ALT glutamic pylvic transaminase (GPT) exceed the normal range refers to GPT > = 60", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"sex\" = 'M' AND t2 \"gpt\" > 60 AND t3.gpt > 60", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE t2.gpt > 60 AND t1.sex = 'M'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1209, @@ -13304,10 +16931,13 @@ "question": "Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth", "evidence": "ALT glutamic pylvic transaminase beyond the normal range refers to GPT > 60; The larger the birthday value, the younger the person is, and vice versa; ", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.date FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"gpt\" > 60 AND t1\"gpt > 60", + "pred": "SELECT diagnosis FROM patient WHERE gpt > 60 ORDER BY birthday DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1210, @@ -13315,10 +16945,13 @@ "question": "What is the average index of the lactate dehydrogenase (LDH) for all patients with lactate dehydrogenase (LDH) within the normal range", "evidence": "average index of the lactate dehydrogenase (LDH) refers to AVG(LDH); (LDH) within the normal range refers to LDH < 500", "difficulty": "simple", - "pred": "SELECT AVG(LDH) FROM patient WHERE LDH < 500", + "pred": "SELECT AVG(LDH) FROM laboratory WHERE ldh < 500", "gold": "SELECT AVG(ldh) FROM laboratory WHERE ldh < 500", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1211, @@ -13326,10 +16959,13 @@ "question": "Provide the ID and age of patient with lactate dehydrogenase (LDH) between 100-300 index above the normal range", "evidence": "age refers to SUBTRACT(year(current_timestamp), year(Birthday)); lactate dehydrogenase (LDH) between 100-300 index above the normal range refers to LDH between 600 and 800;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" GROUP BY t3.id HAVING CAST(SUBSTRING(t3.current_timestamp) AS REAL) * 100 / COUNT(t2.id) > 800", + "pred": "SELECT t1.id, STRFTIME('%Y', t1.birthday) - STRFTIME('%Y', t1.birthday) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE t2.ldh BETWEEN 600 AND 800", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1212, @@ -13337,10 +16973,13 @@ "question": "For patients with alkaliphophatase (ALP) within normal range, were they treated as inpatient or outpatient", "evidence": "alkaliphophatase (ALP) within normal range refers to ALP < 300; inpatient refers to admission = '+'; outpatient refers to admission = '-'", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.inpatient, t2. outpatient FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" WHERE t2._alp < 300 AND t1.'s admission = '+'", + "pred": "SELECT t1.description FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE t1.alp < 300 AND t2.inspection = '+'", "gold": "SELECT t1.admission FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.alp < 300", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1213, @@ -13348,10 +16987,13 @@ "question": "Name the ID of the patient who is born on the April 1st, 1982. Is his/her alkaliphophatase (ALP) within normal range", "evidence": "alkaliphophatase (ALP) within normal range refers to ALP < 300", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"alp\" < 300", + "pred": "SELECT id FROM patient WHERE birthday = '1982-04-01' AND alp < 300", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1214, @@ -13359,10 +17001,13 @@ "question": "List ID, sex and date of birth of patient whose total protein (TP) below the lower range of the normal index", "evidence": "total protein (TP) below the lower range of the normal index refers to TP < 6.0", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id, t2.sex, t1.\"first date\" FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.\"labernumber\" = t3.id WHERE t3.\"total protein (TP)' < 6.0", + "pred": "SELECT t1.id, t1.sex, t1.\"date\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.p < 6.0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1215, @@ -13370,10 +17015,13 @@ "question": "For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP idex from the normal", "evidence": "female refers to SEX = 'F'; total protein (TP) beyond the normal index refers to TP > 8.5; deviation of TP index from normal refers to SUBTRACT(TP, 8.5)", "difficulty": "moderate", - "pred": "SELECT SUBSTRING(t1.pt) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t2.\"sEX\" > 8.5 AND t1.\"sx\" = 'F'", + "pred": "SELECT t2.difference FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.sex = 'F' AND t2.TP > 8.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1216, @@ -13381,10 +17029,13 @@ "question": "Sort in descending order all patients by birthday for male patient with albumin not within range", "evidence": "male = SEX = 'M'; albumin not within range refers to ALB < = 3.5 or ALB > = 5.5", "difficulty": "simple", - "pred": "SELECT birthday FROM patient WHERE sex = 'M' AND ALB > 5.5", + "pred": "SELECT birthday FROM patient WHERE sex = 'M' AND alb BETWEEN 3.5 AND 5.5", "gold": "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 DESC", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1217, @@ -13392,10 +17043,13 @@ "question": "For all patient born in 1982, state if their albumin is within normal range", "evidence": "Year(Birthday) = '1982'; albumin is within normal range refers to ALB between 3.5 and 5.5", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.alb FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE STRFTIME('%Y', t1.\"birthday\") BETWEEN 3.5 AND 5.5", + "pred": "SELECT t1.alb FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.lab_id WHERE t1.birthday LIKE '1982%' AND t2.alb BETWEEN 3.5 AND 5.5", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1218, @@ -13403,10 +17057,13 @@ "question": "What is the percentage of the female patient whose uric acid (UA) beyond the normal range", "evidence": "uric acid (UA) beyond the normal range refers to UA > 8.0 and SEX = 'M' or UA > 6.5 and SEX = 'F'; female refers to Sex = 'F'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"u-pro\" > 8.0 AND t2.\"sEX\" = 'M' AND t1\"ssex\" > 6.5", + "pred": "SELECT CAST(SUM(IIF(t1.sex = 'M', 1, 0)) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.ua > 8.0 AND t1.ua > 6.5 AND t1.sex = 'F'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1219, @@ -13414,10 +17071,13 @@ "question": "For all patients with normal uric acid (UA), what is the average UA index based on their latest laboratory examination result", "evidence": "uric acid (UA) with normal range refers to UA < 8.0 and SEX = 'M' or UA < 6.5 and SEX = 'F'; average UA index refers to AVG(UA)", "difficulty": "moderate", - "pred": "SELECT AVG(t1.age) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"u-pro\" = 'U-pro' AND t2.\"sEX\" < 6.5", + "pred": "SELECT AVG(t1.UA) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.ssa = 'M' OR t1.ssa = 'F' AND t2.ua < 8.0", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1220, @@ -13425,10 +17085,13 @@ "question": "Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing", "evidence": "urea nitrogen (UN) just within the borderline of passing refers to UN = 29; ", "difficulty": "simple", - "pred": "SELECT id, sex, birthday FROM patient WHERE UN = 29 AND ua = 29", + "pred": "SELECT t1.id, t1.sex, t1.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labels WHERE t2.un = 29", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1221, @@ -13436,10 +17099,13 @@ "question": "Provide the ID, sex, birthday of all patients diagnosed with 'RA' that are within the UN normal index", "evidence": "within the UN normal index refers to UN < 30; Diagnosis = 'RA'", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id, t2.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t1\".un\" < 30", + "pred": "SELECT t1.id, t1.sex, t1.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.diagnosis = 'RA' AND t2.units = 30", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1222, @@ -13447,10 +17113,13 @@ "question": "How many male patients are are with creatinine index out of the normal range", "evidence": "creatinine (CRE) out of the normal range refers to CRE > = 1.5; Male refers to Sex = 'M'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'M' AND CRE > 1.5", + "pred": "SELECT COUNT(id) FROM patient WHERE sex = 'M' AND CRE >= 1.5", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1223, @@ -13458,10 +17127,13 @@ "question": "Are there more male patients with creatinine not within the normal range than female? True or False", "evidence": "creatinine (CRE) not within the normal range refers to CRE > = 1.5; male refers to Sex = 'M'; female refers to Sex = 'F'; calculation = (SUM(SEX = 'M') > SUM(SEX = 'F')) where CRE > = 1.5", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN sex = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"cre\" > 1.5", + "pred": "SELECT SUM(CASE WHEN t1.sex = 'M' THEN 1 ELSE 0 END) - SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.cre > 1.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1224, @@ -13469,10 +17141,13 @@ "question": "What is the highest total bilirubin level recorded? List out the patient details with ID, sex and birthday with that index", "evidence": "the highest total bilirubin refers to MAX(T-BIL)", "difficulty": "simple", - "pred": "SELECT t1.id, t2.sex, t3.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" ORDER BY t1\".t-bil\" DESC LIMIT 1", + "pred": "SELECT t1.id, t1.sex, t1.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE t2.\"t-bil\" = (SELECT MAX(t2.\"t-bil\") FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1225, @@ -13480,10 +17155,13 @@ "question": "List and group all patients by sex for total bilirubin (T-BIL) level not within the normal range", "evidence": "List refers to GROUP_CONCAT(DISTINCT ID); total bilirubin (T-BIL) not within normal range refers to T-BIL > = 2.0", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"t-bil\" > 2.0", + "pred": "SELECT t1.sex, GROUP_CONCAT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labels WHERE t2.\"t-bil\" >= 2.0", "gold": "SELECT t1.id, t1.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.\"t-bil\" >= 2.0 GROUP BY t1.sex, t1.id", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1226, @@ -13491,10 +17169,13 @@ "question": "Who is the oldest patient with the highest total cholesterol (T-CHO). State the patient ID and T-CHO index", "evidence": "oldest patient refers to MIN(birthday); highest total cholesterol refers to MAX(T-CHO);", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id, t1.\"t-cho\" index FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber ORDER BY t2.\"total cholesterol\" DESC LIMIT 1", + "pred": "SELECT t1.id, t1.\"t-cho\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id ORDER BY t2.\"t-cho\" DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1227, @@ -13502,10 +17183,13 @@ "question": "What is the average age of the male patient with high cholesterol", "evidence": "average age = DIVIDE(SUM(SUBTRACT(YEAR(NOW()), YEAR(birthday))), COUNT(ID)); male patient refers to sex = 'M'; high cholesterol refers to \"T-CHO\" > = 250;", "difficulty": "moderate", - "pred": "SELECT AVG(t2.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.\"t-cho\" > 250", + "pred": "SELECT AVG(STRFTIME('%Y', birthday) - STRFTIME('%Y', birthday)) FROM patient WHERE sex = 'M' AND \"t-cho\" > 250", "gold": "SELECT AVG(STRFTIME('%Y', DATE('NOW')) - 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1228, @@ -13513,10 +17197,13 @@ "question": "Provide list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range", "evidence": "triglyceride (TG) index greater than 100 of the normal range refers to TG > 300;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.triglyceride (TG) > 300", + "pred": "SELECT t1.id, t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.gpt > 300", "gold": "SELECT t1.id, t1.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.tg > 300", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1229, @@ -13524,10 +17211,13 @@ "question": "For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years", "evidence": "triglyceride (TG) level beyond the normal range refers to TG > = 200; more than 50 years of age = SUBTRACT(year(current_timestamp), year(Birthday)) > 50; Should consider DISTINCT in the final result;", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.labernumber = t2.id WHERE STRFTIME('%Y', t1.\"date\") > 50 AND t2.\"gpt\" > 200", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.gpt > 200 AND t1.birthday > 50", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1230, @@ -13535,10 +17225,13 @@ "question": "List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids", "evidence": "outpatient refers to Admission = '-'; normal range of creatinine phosphokinase refers to CPK < 250;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.application = '-' AND t3.pk < 250", + "pred": "SELECT DISTINCT igg FROM patient WHERE admission = '-' AND cpk < 250", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1231, @@ -13546,10 +17239,13 @@ "question": "For patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range", "evidence": "born between 1936-1956 refers to year(Birthday) BETWEEN '1936' AND '1956'; male patients refers to sex = 'M'; creatinine phosphokinase beyond the normal range refers to CPK > = 250; Should consider DISTINCT in the final result;", "difficulty": "challenging", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'M' AND creatinine phosphokinase > 250", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'M' AND t1.ckt > 250 AND t1.birthday BETWEEN '1936' AND '1956'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1232, @@ -13557,10 +17253,13 @@ "question": "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", "evidence": "age = SUBTRACT(year(current_timestamp), year(Birthday)); blood glucose (GLU) not within normal range refers to GLU > = 180; total cholesterol(T-CHO) within normal range refers to \"T-CHO\" < 250; ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.sex, t2.age FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" GROUP BY t3.id HAVING COUNT(t1.id) > 250", + "pred": "SELECT t1.id, t1.sex, STRFTIME('%Y', t1.birthday) - STRFTIME('%Y', t1.birthday) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labyrinthine WHERE t1.glu > 180 AND t2.\"t-cho\" < 250", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1233, @@ -13568,10 +17267,13 @@ "question": "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", "evidence": "blood glucose (GLU) index that were within normal range refers to GLU < 180; data that was first recorded in 1991 refers to year(Description) = 1991;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.glu FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" WHERE STRFTIME('%Y', t2.'date\") = '1991' AND t2\"glu\" < 180", + "pred": "SELECT t1.id, t1.glu FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE STRFTIME('%Y', t1.description) = '1991' AND t1.glu < 180", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1234, @@ -13579,10 +17281,13 @@ "question": "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", "evidence": "abnormal white blood cell count refers to WBC < = 3.5 or WBC > = 9.0;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.sex, t3.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.\"abnormal white blood cell count\" WHERE STRFTIME('%Y', t3.\"wbc\" > 3.5 AND t2.'wbc > 9.0", + "pred": "SELECT id, sex, birthday FROM patient WHERE wbc BETWEEN 3.5 AND 9.0 ORDER BY birthday DESC", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1235, @@ -13590,10 +17295,13 @@ "question": "What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age", "evidence": "patient's diagnosis refers to Diagnosis; lower red blood cell refers to RBC < 3.5; age = SUBTRACT(year(current_timestamp), year(Birthday)); ", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.age FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"patient\" = t2.\"id\" WHERE t2.'rbc\" < 3.5", + "pred": "SELECT DISTINCT t1.diagnosis, t1.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.rbc < 3.5", "gold": "SELECT DISTINCT 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1236, @@ -13601,10 +17309,13 @@ "question": "For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital", "evidence": "female patient refers to Sex = 'F'; age 50 and above = SUBTRACT(year(current_timestamp), year(Birthday)) > = 50; abnormal red blood cell count refers to RBC < = 3.5 or RBC > = 6.0; Admission = '+' means the patient was admitted to the hospital; Admission = '-' means the patient was not admitted to the hospital;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"sex\" = 'F' AND t2 \"rbc\" > 3.5 AND t3.rbc > 6.0", + "pred": "SELECT t1.first date, t1.last date FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'F' AND t2.rbc BETWEEN 3.5 AND 6.0 AND t1.gender = 'F'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1237, @@ -13612,10 +17323,13 @@ "question": "Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex", "evidence": "outpatients refers to Admission = '-'; low hemoglobin level refers to HBG < 10;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id, t2.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.'s admission = '-' AND t1.'s HBG < 10", + "pred": "SELECT DISTINCT t1.id, t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2. Admission = '-' AND t1.hgb < 10", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1238, @@ -13623,10 +17337,13 @@ "question": "Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex", "evidence": "diagnosed with SLE refers to Diagnosis = 'SLE'; The larger the birthday value, the younger the person is, and vice versa; normal hemoglobin level refers to 10 < HGB < 17;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id, t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" WHERE t3.diagnosis = 'SLE'", + "pred": "SELECT t1.id, t1.sex FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.diagnosis = 'SLE' AND t1.hg > 17", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1239, @@ -13634,10 +17351,13 @@ "question": "Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range", "evidence": "age = SUBTRACT(year(current_timestamp), year(Birthday)); patient with two or more laboratory examinations refers to COUNT(ID) > 2; hematoclit level exceeded the normal range refers to HCT > = 52;", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.id, t2.birthday FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t1\"hct > 52 AND t1 \"hct\" > 52", + "pred": "SELECT t1.id, STRFTIME('%Y', t1.birthday) - STRFTIME('%Y', t1.birthday) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.hct > 52", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1240, @@ -13648,7 +17368,10 @@ "pred": "SELECT AVG(hct) FROM examination WHERE date LIKE '1991%' AND hct < 29", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1241, @@ -13656,10 +17379,13 @@ "question": "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", "evidence": "abnormal platelet level refers to PLT <= 100 or PLT >= 400; platelet level lower than normal range refers to PLT < 100; calculation = SUBTRACT(SUM(PLT < 100), SUM(PLT > 400)); platelet level higher than normal range refers to PLT > 400;", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.plt < 100 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber WHERE t1.\"plt\" >= 400", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.plt < 100 AND t1.plt > 400", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1242, @@ -13667,10 +17393,13 @@ "question": "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level", "evidence": "laboratory examinations take in 1984 refers to YEAR(Date) = '1984'; below 50 years old = SUBTRACT(year(current_timestamp), year(Birthday)) < 50; normal platelet level refers to PLT between 100 and 400; ", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.name FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.plt BETWEEN 100 AND 400", + "pred": "SELECT DISTINCT t1.first, t1.last FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.\"date\") = '1984' AND t1.plt BETWEEN 100 AND 400", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1243, @@ -13678,10 +17407,13 @@ "question": "For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)", "evidence": "older than 55 years old = SUBTRACT(year(current_timestamp), year(Birthday)) > 55; abnormal prothrombin time (PT) refers to PT > = 14; percentage = DIVIDE(SUM(PT > = 14 AND SEX = 'F'), SUM(PT > = 14)) * 100; female refers to sex = 'F'; ", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber WHERE t1.\"age\" > 55 AND t2.\"birthday\" > 14", + "pred": "SELECT CAST(SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN t1.sex = 'F' THEN 1 ELSE 0 END) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE STRFTIME('%Y', t2.current_timestamp) - STRFTIME('%Y', t2.birthday) > 55", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1244, @@ -13689,10 +17421,13 @@ "question": "List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal", "evidence": "first came to the hospital after year 1992 refers to year(\"First Date\") > 1992; prothrombin time (PT) level that are normal refers to PT < 14;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.patient FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"first date\" > '1992' AND STRFTIME('%Y', t2\"first date\") > '1993'", + "pred": "SELECT t1.firstname, t1.lastname FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE STRFTIME('%Y', t1.\"first date\") > '1992' AND t2.pt < 14", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1245, @@ -13700,10 +17435,13 @@ "question": "For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time", "evidence": "examinations done after 1997/1/1 refers to \"Examination Date\" > '1997-01-01'; normal activated partial prothrom bin time refesr to APTT < 45;", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.id) FROM examination AS t1 INNER JOIN laboratory AS t2 ON t2.id = t1.labernumber WHERE t1.\"examination date\" > '1997-01-01' AND t2.\"apTT\" < 45", + "pred": "SELECT COUNT(id) FROM examination WHERE \"examination date\" > '1997-01-01' AND result = 'Normal activated partial prothrom bin time refesr to APTT < 45'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1246, @@ -13711,10 +17449,13 @@ "question": "For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis", "evidence": "abnormal activated partial prothrom bin time refers to APTT > 45; does not have thrombosis refers to Thrombosis = 0; Only count ones without repetitive.", "difficulty": "moderate", - "pred": "SELECT COUNT(id) FROM patient WHERE thrombosis > 45", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.thrombosis = 0 AND t2.apTT > 45", "gold": "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 = 0 AND t2.aptt > 45", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1247, @@ -13722,10 +17463,13 @@ "question": "Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level", "evidence": "male patients refers to Sex = 'M'; normal level of white blood cells refers to WBC > 3.5 and WBC <9.0; abnormal fibrinogen level refers to FG < = 150 or FG > = 450; Don't compute repetitive ones.", "difficulty": "challenging", - "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t1.labernumber WHERE t2.\"sex\" = 'M' AND t1.\"wbc\" > 3.5 AND t2\"wbc < 9.0", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'M' AND t2.wbc > 3.5 AND t2.wbc <9.0 AND t2.fg > 450", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1248, @@ -13733,10 +17477,13 @@ "question": "How many patients born after 1980/1/1 have an abnormal fibrinogen level", "evidence": "born after 1980/1/1 refers to Birthday > '1980-01-01'; normal fibrinogen level refers to FG between 150 and 450; Should return the number of distinct patients.", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM patient WHERE birthday > '1980-01-01' AND fg > 150 AND rf > 450", + "pred": "SELECT COUNT(id) FROM patient WHERE birthday > '1980-01-01' AND fg BETWEEN 150 AND 450", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1249, @@ -13744,10 +17491,13 @@ "question": "Please list the disease names of the patients that have a proteinuria level higher than normal", "evidence": "disease names refers to Diagnosis; proteinuria level higher than normal refers to \"U-PRO\" > = 30;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"u-pro\" > 30", + "pred": "SELECT DISTINCT t1.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"u-pro\" > 30", "gold": "SELECT t1.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.\"u-pro\" >= 30", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1250, @@ -13755,10 +17505,13 @@ "question": "Which patient has a normal proteinuria level and is diagnosed with SLE? Please give his or her patient ID", "evidence": "normal proteinuria level refers to 0 < \"U-PRO\" < 30; diagnosed with SLE refers to Diagnosis = 'SLE';", "difficulty": "moderate", - "pred": "SELECT t2.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"u-pro\" < 30", + "pred": "SELECT patient FROM patient WHERE diagnosis = 'SLE' AND \"u-pro\" < 30", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1251, @@ -13766,10 +17519,13 @@ "question": "How many patients with an Ig G higher than normal", "evidence": "Ig G higher than normal refers to IGG >= 2000; Should consider DISTINCT in the final result;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t2.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"gg\" >= 2000 AND t1\"gg >= 2000", + "pred": "SELECT COUNT(id) FROM patient WHERE g >= 2000", "gold": "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 >= 2000", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1252, @@ -13777,10 +17533,13 @@ "question": "Among the patients with a normal Ig G level, how many of them have symptoms", "evidence": "normal Ig G level refers to IGG > 900 and IGG < 2000; have symptoms refers to Symptoms IS NOT NULL;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"ig\" > 900 AND t3.ig < 2000", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1. igg > 900 AND t1.ig < 2000 AND NOT t2.description IS NULL", "gold": "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 NOT t3.symptoms IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1253, @@ -13788,10 +17547,13 @@ "question": "For the patient who has the highest Ig A within the normal range, what is his or her diagnosis", "evidence": "highest Ig A within the normal range refers to MAX(IGA BETWEEN 80 AND 500);", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"isiga\" BETWEEN 80 AND 500 GROUP BY t2._diagnosis ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT diagnosis FROM patient WHERE iga BETWEEN 80 AND 500 ORDER BY igg DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1254, @@ -13799,10 +17561,13 @@ "question": "How many patients with a normal Ig A level came to the hospital after 1990/1/1", "evidence": "normal Ig A level refers to IGA > 80 AND IGA < 500; came to the hospital after 1990/1/1 refers to YEAR(\"First Date\") > = 1990;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE STRFTIME('%Y', t2.\"first date\") > '1990' AND \"last date\" > '1991' AND iga > 80 AND IGA < 500", + "pred": "SELECT COUNT(id) FROM patient WHERE \"first date\" LIKE '%1990%' AND iga > 80 AND ga < 500", "gold": "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 STRFTIME('%Y', t1.\"first date\") > '1990'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1255, @@ -13810,10 +17575,13 @@ "question": "For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with", "evidence": "abnormal Ig M level refers to IGM <=40 OR IGM >= 400; most common disease refers to MAX(COUNT(Diagnosis));", "difficulty": "moderate", - "pred": "SELECT MAX(t1.diagnosis) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE STRFTIME('%Y', t2.\"iGM\" >= 40 OR t1.\"ig\" >= 400 GROUP BY t3.\"diagnosis\" ORDER BY COUNT(t3.id) DESC LIMIT 1", + "pred": "SELECT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1. ig >= 40 OR t1.iog >= 400 GROUP BY t2.diagnosis ORDER BY COUNT(t2.id) DESC LIMIT 1", "gold": "SELECT t1.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE NOT t2.igm BETWEEN 40 AND 400 GROUP BY t1.diagnosis ORDER BY COUNT(t1.diagnosis) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1256, @@ -13824,7 +17592,10 @@ "pred": "SELECT COUNT(id) FROM patient WHERE description IS NULL AND crp = '+'", "gold": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE (t2.crp = '+') AND t1.description IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1257, @@ -13832,10 +17603,13 @@ "question": "Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet", "evidence": "creatinine level is abnormal refers to CRE >= 1.5; aren't 70 yet refers to SUBTRACT((YEAR(CURDATE()), YEAR(Birthday))) < 70; ", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"CRE >= 1.5\" AND STRFTIME('%Y', t2.'birthday\") < 70", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.crate >= 1.5 AND STRFTIME('%Y', t2.date) - STRFTIME('%Y', t2.birthday) < 70", "gold": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.cre >= 1.5 AND STRFTIME('%Y', DATE('now')) - STRFTIME('%Y', t1.birthday) < 70", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1258, @@ -13843,10 +17617,13 @@ "question": "How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation", "evidence": "normal Rhuematoid Factor refers TO RA IN('-', '+-'); positive measure of degree of coagulation refers to KCT = '+'; Should compute the number of distinct ones", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"ra\" = '-', '+'", + "pred": "SELECT COUNT(id) FROM patient WHERE ra IN ('-', '+-') AND kct = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1259, @@ -13854,10 +17631,13 @@ "question": "Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor", "evidence": "diseases refers to Diagnosis; born after 1985/1/1 refers to YEAR(Birthday) > = 1985; normal Rhuematoid Factor refers to RA IN('-', '+-');", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE STRFTIME('%Y', t1.\"birthday\") > '1985' AND rf = 'Normal' AND RA IN('-', '+-'", + "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE STRFTIME('%Y', t1.birthday) > 1985 AND t1.ra IN ('-', '+-')", "gold": "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 > '1985-01-01'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1260, @@ -13865,10 +17645,13 @@ "question": "Please list the ID of the patient whose RF is normal and who is older than 60", "evidence": "RF is normal refers to RF < 20; older than 60 = SUBTRACT((YEAR(CURDATE()), YEAR(Birthday))) > 60;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.rf < 20 AND STRFTIME('%Y', CAST((SUBSTRING(t2.birthday) AS REAL) * 60) > 60", + "pred": "SELECT id FROM patient WHERE Rf < 20 AND STRFTIME('%Y', birthday) - STRFTIME('%Y', birthday) > 60", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1261, @@ -13876,10 +17659,13 @@ "question": "How many patients with a normal RF don't have thrombosis", "evidence": "normal RF refers to RF < 20; don't have thrombosis refers to Thrombosis = '0';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE thrombosis = '0' AND RF < 20", + "pred": "SELECT COUNT(id) FROM patient WHERE thrombosis = 0 AND RF < 20", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1262, @@ -13887,10 +17673,13 @@ "question": "How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination", "evidence": "normal level of complement 3 refers to C3 > 35; have a P pattern observed in the sheet of ANA examination refers to ANA Pattern = 'P'; Should compute the number of distinct ones", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM patient WHERE C3 > 35 AND \"ana pattern\" = 'P'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.c3 > 35 AND t2.\"ana pattern\" = 'P'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1263, @@ -13898,10 +17687,13 @@ "question": "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", "evidence": "Hematoclit is normal refers to 29 < N < 52; highest anti-Cardiolipin antibody concentration refers to MAX(\"aCL IgA\");", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"aCL IgA\" < 52 AND t1\"is normal", + "pred": "SELECT id FROM patient WHERE iga < 29 AND iga < 52 ORDER BY aCL IgA DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1264, @@ -13909,10 +17701,13 @@ "question": "Among the patients have blood clots in veins, how many of them have a normal level of complement 4", "evidence": "APS will result in Blood Clots in veins; normal level of complement 4 refers to C4 > 10; Should compute the number of different ones", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.c4 > 10", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.c4 > 10 AND t2.apss = 'Blood Clots in veins'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1265, @@ -13920,10 +17715,13 @@ "question": "How many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital", "evidence": "normal level of anti-ribonuclear protein refers to RNP = '-', '+-'; And'-' means 'negative'; '+-' refers to '0'; admitted to the hospital refers to Admission = '+'; Should consider DISTINCT in the final result;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT) FROM patient WHERE RNP = '-', '+-' AND admission = '+'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.rn = '-' AND t1. Admission = '+-'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1266, @@ -13931,10 +17729,13 @@ "question": "Which is the youngest patient with an abnormal anti-ribonuclear protein level? Please list his or her date of birth", "evidence": "youngest patient refers to MAX(Birthday); abnormal anti-ribonuclear protein level refers to RNP NOT IN('-', '+-'); date of birth refers to Birthday;", "difficulty": "moderate", - "pred": "SELECT birthday FROM patient ORDER BY birthday DESC LIMIT 1", + "pred": "SELECT birthday FROM patient WHERE rn IN ('-', '+-') ORDER BY birthday DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1267, @@ -13942,10 +17743,13 @@ "question": "Among the patients with normal anti-SM, how many of them does not have thrombosis", "evidence": "normal anti-SM refers to SM IN('-', '+-'); SM = 'negative' means '-'; SM = '0' means '+-'; SM = '1' means '+'; does not have thrombosis refers to Thrombosis = 0;", "difficulty": "moderate", - "pred": "SELECT COUNT(id) FROM patient WHERE SM = '0' AND thrombosis = 0", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.thrombosis = 0 AND t2.sm IN ('-', '+-')", "gold": "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 = 0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1268, @@ -13953,10 +17757,13 @@ "question": "For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones", "evidence": "abnormal anti-SM refers to SM NOT IN ('negative', '0'); youngest refers to MAX(Birthday);", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.sm NOT IN ('negative', '0')", + "pred": "SELECT id FROM patient WHERE sm NOT IN ('negative', '0') ORDER BY birthday DESC LIMIT 3", "gold": "SELECT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE NOT t2.sm IN ('negative', '0') ORDER BY t1.birthday DESC LIMIT 3", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1269, @@ -13964,10 +17771,13 @@ "question": "Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70", "evidence": "examination done after 1997/1/1 refers to \"Examination Date\" > 1997-01-01; normal anti-scl70 refers to SC170 IN('negative','0');", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"examination date\" > '1997-01-01'", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"examination date\" > '1997-01-01' AND t2.sc170 IN ('negative', '0')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1270, @@ -13975,10 +17785,13 @@ "question": "Among the patients who has a normal anti-scl70, how many of them are female and does not have any symptom", "evidence": "normal anti-scl70 refers to SC170 IN('negative', '0'); female refers to Sex = 'F'; does not have any symptom refers to symptoms IS NULL; Should consider DISTINCT in the final result;", "difficulty": "challenging", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'F' AND sc170 IN ('negative', '0') AND symptoms IS NULL", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.sex = 'F' AND t2.sc170 IN ('negative', '0') AND t1.sex = 'F'", "gold": "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 = 'negative' OR t2.sc170 = '0') AND t1.sex = 'F' AND t3.symptoms IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1271, @@ -13986,10 +17799,13 @@ "question": "How many patients with a normal anti-SSA came to the hospital before 2000", "evidence": "normal anti-SSA refers to SSA IN('-','+-'); came to the hospital before 2000 refers to YEAR(\"First Date\") < 2000; Should compute the number of distinct ones", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.ssa IN ('-','+-'') AND STRFTIME('%Y', t2.'first date\") < 2000", + "pred": "SELECT COUNT(id) FROM patient WHERE STRFTIME('%Y', \"first date\") < 2000 AND ssa IN ('-','+-')", "gold": "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) < '2000'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1272, @@ -13997,10 +17813,13 @@ "question": "Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID", "evidence": "first patient refers to ID with MIN(\"First Date\"); abnormal anti-SSA refers to SSA NOT IN('negative', '0');", "difficulty": "moderate", - "pred": "SELECT t2.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"ssa\" NOT IN ('negative', '0') AND t1\"ssa = 'negative'", + "pred": "SELECT id FROM patient WHERE ssa IN ('negative', '0') ORDER BY \"first date\" LIMIT 1", "gold": "SELECT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE NOT t1.\"first date\" IS NULL AND NOT t2.ssa IN ('negative', '0') ORDER BY t1.\"first date\" ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1273, @@ -14008,10 +17827,13 @@ "question": "How many patients have a normal anti-SSB and are diagnosed with SLE in the examination", "evidence": "normal anti-SSB refers to SSB IN('-', '+-'); '-' is expressed as 'negative' and '+-' is expressed as '0' in the database ; diagnosed with SLE refers to Diagnosis = 'SLE'; Should compute the number of distinct ones", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.ssb IN('-', '+-') AND t3.diagnosis = 'SLE'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.ssb IN ('-', '+-') AND t2.diagnosis = 'SLE'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1274, @@ -14019,10 +17841,13 @@ "question": "For the patients whose anti-SSB are normal, how many of them have other symptoms observed in their examination", "evidence": "anti-SSB are normal refers to SSB IN ('negative', '0'); have other symptoms refers to Symptoms IS NOT NULL; Should compute the number of distinct ones", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.ssb IN ('negative', '0' AND t2.'sssb\" IN ('positive', '1' AND STRFTIME('%Y', t2\".date\") = '2016' AND NOT t2\"sssB\" IN 'negative', ''", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.ssb IN ('negative', '0')", "gold": "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 NOT t1.symptoms IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1275, @@ -14030,10 +17855,13 @@ "question": "Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male", "evidence": "normal level of anti-centromere refers to CENTROMEA IN('-', '+-'); normal level of anti-SSB refers to SSB IN('-', '+-'); male refers to Sex = 'M'; Should consider DISTINCT in the final result;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"sex\" = 'M' AND SUBSTRING(t1.sex) IN ('-', '+-')", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'M' AND t2.ssb IN ('-', '+-'')", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1276, @@ -14041,10 +17869,13 @@ "question": "For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with", "evidence": "abnormal level of anti-DNA refers to DNA > = 8; diseases refers to Diagnosis;", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.\"patient\" WHERE t1.\"DNA > 8\"", + "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.chromosome = 8", "gold": "SELECT DISTINCT (t1.diagnosis) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.dna >= 8", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1277, @@ -14052,10 +17883,13 @@ "question": "How many patients have a normal anti-DNA level, yet their data are not recorded", "evidence": "normal anti-DNA level refers to DNA < 8; data are not recorded refers to Description IS NULL; Should compute the number of unique ones", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM patient WHERE description IS NULL AND DNA < 8", + "pred": "SELECT COUNT(id) FROM patient WHERE description IS NULL AND DNA < 8", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1278, @@ -14063,10 +17897,13 @@ "question": "Of the patients with an normal level of IGG, how many of them admitted to the hospital", "evidence": "normal level of IGG refers to 900 < IGG < 2000; admitted to the hospital refers to Admission = '+';", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.income < 900 AND t1 admission = '+'", + "pred": "SELECT COUNT(id) FROM patient WHERE admission = '+' AND 900 < IGG < 2000", "gold": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.igg > 900 AND t2.igg < 2000 AND t1.admission = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1279, @@ -14074,10 +17911,13 @@ "question": "What is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with SLE", "evidence": "abnormal level of glutamic oxaloacetic transaminase refers to GOT > = 60; percentage = MULTIPLY(DIVIDE(COUNT(ID WHERE GOT > = 60 AND Diagnosis = 'SLE'), COUNT(ID WHERE GOT > = 60)), 1.0);", "difficulty": "moderate", - "pred": "SELECT CAST((SUM(CASE WHEN GOT > 60 THEN diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE STRFTIME('%Y', t1.\"date\") = '2016' AND t1 \"diagnosis\" = 'sLE'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.gpt > 60", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1280, @@ -14085,10 +17925,13 @@ "question": "How many male patients have their glutamic oxaloacetic transaminase in the normal range", "evidence": "male refers to Sex = 'M'; glutamic oxaloacetic transaminase in the normal range refers to GOT < 60;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'M' AND GOT < 60", + "pred": "SELECT COUNT(id) FROM patient WHERE sex = 'M' AND got < 60", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1281, @@ -14096,10 +17939,13 @@ "question": "Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born", "evidence": "abnormal level of glutamic oxaloacetic transaminase refers to GOT > = 60; The larger the birthday value, the younger the person is, and vice versa;", "difficulty": "moderate", - "pred": "SELECT birthday FROM patient WHERE GOT > 60 AND got > 60", + "pred": "SELECT t1.birthday FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t2.genres = (SELECT MAX(genres) FROM patient) AND t1. GOT > 60", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1282, @@ -14110,7 +17956,10 @@ "pred": "SELECT birthday FROM patient WHERE gpt < 60 ORDER BY gpt DESC LIMIT 3", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1283, @@ -14118,10 +17967,13 @@ "question": "For the patients with the normal glutamic pylvic transaminase level, how many of them are male", "evidence": "normal glutamic pylvic transaminase level refers to GOT < 60; male refers to Sex = 'M';", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM patient WHERE sex = 'M' AND GOT < 60", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labels WHERE t1.sex = 'M' AND t2.gpt < 60", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1284, @@ -14129,10 +17981,13 @@ "question": "For the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded", "evidence": "highest lactate dehydrogenase in the normal range refers to MAX(LDH < 500); when the data first recorded refers to MIN(First Date);", "difficulty": "moderate", - "pred": "SELECT MIN(t2.date) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"lh\" < 500 ORDER BY t2.\"LDH\" DESC LIMIT 1", + "pred": "SELECT MIN(\"date\") FROM patient WHERE ldh < 500 ORDER BY ldh DESC LIMIT 1", "gold": "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 ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1285, @@ -14140,10 +17995,13 @@ "question": "When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase", "evidence": "latest patient refers to ID with MAX('First Date'); abnormal level of lactate dehydrogenase refers to LDH > = 500;", "difficulty": "moderate", - "pred": "SELECT MAX('first date\") FROM patient WHERE LDH > 500", + "pred": "SELECT MAX(\"date\") FROM patient WHERE ldh > 500", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1286, @@ -14151,10 +18009,13 @@ "question": "For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital", "evidence": "abnormal alkaliphophatase level refers to ALP > = 300; admitted to the hospital refers to Admission = '+';", "difficulty": "simple", - "pred": "SELECT COUNT(id) FROM patient WHERE ALP > 300 AND admission = '+'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.alp > 300 AND t2. Admission = '+'", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1287, @@ -14162,10 +18023,13 @@ "question": "Among the patients followed at the outpatient clinic, how many of them have a normal level of alkaliphophatase", "evidence": "followed at the outpatient clinic refers to Admission = '-'; normal level of alkaliphophatase refers to ALP < 300;", "difficulty": "moderate", - "pred": "SELECT COUNT(id) FROM patient WHERE admission = '-' AND ALP < 300", + "pred": "SELECT COUNT(id) FROM patient WHERE admission = '-' AND alb < 300", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1288, @@ -14173,10 +18037,13 @@ "question": "Please list the diagnosis of the patients whose total protein is lower than normal", "evidence": "total protein is lower than normal refers to TP < 6.0;", "difficulty": "simple", - "pred": "SELECT DISTINCT diagnosis FROM patient WHERE TP < 6.0", + "pred": "SELECT DISTINCT t2.description FROM laboratory AS t1 INNER JOIN patient AS t2 ON t1.id = t2.labrasa WHERE t1.p < 6.0", "gold": "SELECT t1.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.tp < 6.0", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1289, @@ -14184,10 +18051,13 @@ "question": "For the patients who are diagnosed with SJS, how many of them have a normal level of total protein", "evidence": "diagnosed with SJS refers to Diagnosis = 'SJS'; normal level of total protein refers to TP > 6.0 and TP < 8.5;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.diagnosis = 'SJS' AND t2 TP > 6.0 AND t1 TP < 8.5", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.diagnosis = 'SJS' AND t1.p > 6.0 AND t1.p < 8.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1290, @@ -14195,10 +18065,13 @@ "question": "What is the examination date of the patient whose albumin is the highest in the normal range", "evidence": "examination date refers to Date; albumin is the highest in the normal range refers to MAX(ALB > 3.5 and ALB < 5.5);", "difficulty": "simple", - "pred": "SELECT t2.\"date\" FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"alb\" > 3.5 AND MAX(alb) < 5.5", + "pred": "SELECT t2.\"date\" FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.alb > 3.5 AND t1.alb < 5.5", "gold": "SELECT date FROM laboratory WHERE alb > 3.5 AND alb < 5.5 ORDER BY alb DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1291, @@ -14206,10 +18079,13 @@ "question": "How many male patients have a normal level of both albumin and total protein", "evidence": "male refers to Sex = 'M'; normal level of both albumin and total protein refers to ALB > 3.5 and ALB < 5.5 AND TP between 6.0 and 8.5;", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t1.labernumber WHERE t1.\"sex\" = 'M' AND t2.\"alb\" < 5.5 AND t1\" < 8.5", + "pred": "SELECT COUNT(id) FROM patient WHERE sex = 'M' AND ALb > 3.5 AND ALb < 5.5 AND TP BET 6.0 AND 8.5", "gold": "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 > 3.5 AND t2.alb < 5.5 AND t2.tp BETWEEN 6.0 AND 8.5", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1292, @@ -14217,10 +18093,13 @@ "question": "What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range", "evidence": "anti Cardiolipin antibody concentration refers to \"aCL IgG\", \"aCL IgM\", \"aCL IgA\"; female patient refers to Sex = F'; highest uric acid level in the normal range refers to MAX(UA > 6.50);", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.sex FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"aCL IgG\" = 'ACL IgM' ORDER BY t1\".UA > 6.50 DESC LIMIT 1", + "pred": "SELECT t1.aCL IgG, t1.aCL IgM, t1.aCL IgM, t1.aCL IgA FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = F AND t2.ua > 6.50", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1293, @@ -14228,10 +18107,13 @@ "question": "What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level", "evidence": "highest anti-nucleus antibody concentration level refers to MAX(ANA); normal creatinine level refers to CRE < 1.5;", "difficulty": "moderate", - "pred": "SELECT MAX(ANA) FROM patient WHERE CRE < 1.5", + "pred": "SELECT MAX(ANA) FROM examination WHERE CRE < 1.5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1294, @@ -14239,10 +18121,13 @@ "question": "Please list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest", "evidence": "creatinine level is normal refers to CRE < 1.5; anti Cardiolipin antibody concentration level is the highest refers to MAX(aCL IgA);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber WHERE t1.\"cre\" < 1.5 ORDER BY t2.\"aCL IgA\" DESC LIMIT 1", + "pred": "SELECT id FROM laboratory WHERE CRE < 1.5 AND iga = (SELECT MAX(aCL IgA) FROM laboratory)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1295, @@ -14250,10 +18135,13 @@ "question": "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", "evidence": "total bilirubin is over the normal range refers to \"T-BIL\" > = 2.0; peripheral pattern is observed in the sheet of ANA examination refers to that ANA Pattern contains 'P';", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.id WHERE t2.\"t-bil\" > 2.0 AND t1 \"a pattern\" > 'P'", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"ana pattern\" LIKE '%P%' AND t1.\"t-bil\" > 2.0", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1296, @@ -14261,10 +18149,13 @@ "question": "What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range", "evidence": "anti-nucleus antibody concentration refers to ANA; total bilirubin is the highest in the normal range refers to MAX(\"T-BIL\" < 2.0);", "difficulty": "moderate", - "pred": "SELECT MAX(\"t-bil\") FROM patient WHERE total bilirubin < 2.0 GROUP BY t1.id ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT t1.a FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.\"t-bil\" < 2.0 ORDER BY t2.\"t-bil\" DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1297, @@ -14272,10 +18163,13 @@ "question": "For the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation", "evidence": "total cholesterol is higher than normal refers to \"T-CHO\" > = 250; negative measure of degree of coagulation refers to KCT = '-' ;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"t-cho\" > 250 AND \"t-co\" = '-'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.\"t-cho\" >= 250 AND t2.kct = '-'", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1298, @@ -14283,10 +18177,13 @@ "question": "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", "evidence": "total cholesterol is within the normal range refers to \"T-CHO\" < 250; P pattern observed in the sheet of ANA examination refers to ANA Pattern = 'P';", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.id WHERE t2.\"t-cho\" < 250", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.\"t-cho\" < 250 AND t2.\"ana pattern\" = 'P'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1299, @@ -14294,10 +18191,13 @@ "question": "Among the patients with the normal level of triglyceride, how many of them have other symptoms observed", "evidence": "normal level of triglyceride refers to TG < 200; have other symptoms refers to Symptoms is not null;", "difficulty": "simple", - "pred": "SELECT COUNT(t2.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"gpt\" < 200", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.gpt < 200 AND NOT t2. symptoms IS NULL", "gold": "SELECT COUNT(t1.id) FROM examination AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.tg < 200 AND NOT t1.symptoms IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1300, @@ -14305,10 +18205,13 @@ "question": "What is the disease name of the patient who has the highest level of triglyceride within the normal range", "evidence": "disease name referse to Diagnosis; highest level of triglyceride within the normal range refers to MAX(TG < 200);", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.\"labernumber\" WHERE t1.\"gpt\" < 200 GROUP BY t2._diagnosis ORDER BY COUNT(t2.id) DESC LIMIT 1", + "pred": "SELECT DISTINCT t1.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t2.gpt < 200 AND t2.thrombosis = (SELECT MAX(t2.thrombosis) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.gpt < 200)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1301, @@ -14316,10 +18219,13 @@ "question": "Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase", "evidence": "no thrombosis refers to Thrombosis = 0 ; abnormal level of creatinine phosphokinase refers to CPK < 250;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN laboratory AS t2 ON t2.id = t3.labernumber WHERE t1.\"thrombosis\" < 250 AND t3.\"occurrences\" > 250", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.chp < 250 AND t2.thrombosis = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1302, @@ -14327,10 +18233,13 @@ "question": "For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation", "evidence": "normal range of creatinine phosphokinase refers to CPK < 250; positive measure of degree of coagulation refers to KCT = '+' or RVVT = '+' or LAC = '+' ;", "difficulty": "challenging", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"labernumber\" = t2.id WHERE t2.\"pk\" < 250 AND t2 \"vacvvt\" = '+'", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labrasa WHERE t1.ckt < 250 AND t2.rvVT = '+' OR t2.lac = '+'", "gold": "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 = '+')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1303, @@ -14338,10 +18247,13 @@ "question": "When is the birthday of the oldest patient whose blood glucose is abnormal", "evidence": "oldest patient refers to MIN(Birthday); blood glucose is abnormal refers to GLU > 180;", "difficulty": "simple", - "pred": "SELECT MIN(birthday) FROM patient WHERE GLU > 180", + "pred": "SELECT birthday FROM patient WHERE glu > 180 ORDER BY birthday LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1304, @@ -14349,10 +18261,13 @@ "question": "Among the patients with a normal blood glucose, how many of them don't have thrombosis", "evidence": "normal blood glucose refers to GLU < 180; don't have thrombosis refers to Thrombosis = 0;", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM patient WHERE glu < 180 AND thrombosis = 0", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.glu < 180 AND t2.thrombosis = 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1305, @@ -14363,7 +18278,10 @@ "pred": "SELECT COUNT(id) FROM patient WHERE admission = '+' AND wbc BETWEEN 3.5 AND 9.0", "gold": "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 = '+'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1306, @@ -14371,10 +18289,13 @@ "question": "How many patients diagnosed with SLE have a normal white blood cell level", "evidence": "diagnosed with SLE refers to Diagnosis = 'SLE'; normal white blood cell level refers to WBC between 3.5 and 9.0;", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.id WHERE t2.\"diagnosis\" = 'SLE' AND t2\"wbc\" BETWEEN 3.5 AND 9.0", + "pred": "SELECT COUNT(id) FROM patient WHERE diagnosis = 'SLE' AND wbc BETWEEN 3.5 AND 9.0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1307, @@ -14382,10 +18303,13 @@ "question": "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", "evidence": "RBC < = 3.5 or RBC > = 6.0 means the patient has an abnormal level of red blood cell; 3.5 < RBC < 6.0 means the patient has a normal level of red blood cell; followed at the outpatient clinic refers to Admission = '-';", "difficulty": "challenging", - "pred": "SELECT DISTINCT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.id WHERE t2.\"abnormal\" < 3.5", + "pred": "SELECT t1.id FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1. Admission = '-' AND t2.rbc BETWEEN 3.5 AND 6.0", "gold": "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 = '-'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1308, @@ -14393,10 +18317,13 @@ "question": "Among the patients who have a normal platelet level, how many of them have other symptoms observed", "evidence": "normal platelet level refers to PLT > 100 and PLT < 400; have other symptoms refers to Diagnosis is not null;", "difficulty": "moderate", - "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.\"id\" = t2.\"patient\" WHERE t2.plt > 100 AND t1.'plt < 400", + "pred": "SELECT COUNT(DISTINCT t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.plt > 100 AND t1.plt < 400 AND NOT t2.diagnosis IS NULL", "gold": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.id WHERE t2.plt > 100 AND t2.plt < 400 AND NOT t1.diagnosis IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1309, @@ -14404,10 +18331,13 @@ "question": "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD", "evidence": "PLT > 100 and PLT < 400 means platelet level is within the normal range; PLT < 100 and PLT > 400 means platelet level is not within the normal range; diagnosed with MCTD refers to Diagnosis = 'MCTD';", "difficulty": "moderate", - "pred": "SELECT DISTINCT t1.patelet level, t2.diagnosis FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.\"id\" = t2.\"labernumber\" WHERE t2.'plt\" > 100 AND t2\"plt < 400 AND t3.\"diagnosis\" = 'MCTD'", + "pred": "SELECT t1.plateletlevel, t2.description FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t2.description = 'MCTD' AND t1.plt < 100 AND t1.plt < 400", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1310, @@ -14415,10 +18345,13 @@ "question": "For the male patients that have a normal prothrombin time, what is their average prothrombin time", "evidence": "male refers to Sex = 'M'; normal prothrombin time refer to PT < 14; average prothrombin time = AVG(PT);", "difficulty": "simple", - "pred": "SELECT AVG(t1.pt) FROM patient AS t1 INNER JOIN laboratory AS t2 ON t1.id = t2.labernumber WHERE t1.\"sex\" = 'M' AND t2.\"pt\" < 14", + "pred": "SELECT AVG(t1.pt) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.patient WHERE t1.sex = 'M' AND t2.PT < 14", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1311, @@ -14426,10 +18359,13 @@ "question": "How many patients with severe thrombosis have a normal prothrombin time", "evidence": "severe thrombosis refers to Thrombosis = 2 or 1; normal prothrombin time refers to PT < 14;", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM patient WHERE thrombosis = 2 or 1 AND PT < 14", + "pred": "SELECT COUNT(t1.id) FROM patient AS t1 INNER JOIN examination AS t2 ON t1.id = t2.id WHERE t1.thrombosis = 2 OR 1 AND t2.pt < 14", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1312, @@ -14437,10 +18373,13 @@ "question": "What's Angela Sanders's major", "evidence": "Angela Sanders is the full name; full name refers to first_name, last_name; major refers to major_name.", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM major WHERE major_name = 'Angela Sanders'", + "pred": "SELECT major_name FROM major WHERE first_name = 'Angela' AND last_name = 'Sanders'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1313, @@ -14448,10 +18387,13 @@ "question": "How many students in the Student_Club are from the College of Engineering", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM student_Club WHERE college = 'College of Engineering'", + "pred": "SELECT COUNT(*) FROM major WHERE college = 'Engineering'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1314, @@ -14459,10 +18401,13 @@ "question": "Please list the full names of the students in the Student_Club that come from the Art and Design Department", "evidence": "full name refers to first_name, last_name;", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM student_Club WHERE department = 'Art and Design'", + "pred": "SELECT first_name, last_name FROM student WHERE department = 'Art and Design'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1315, @@ -14470,10 +18415,13 @@ "question": "How many students of the Student_Club have attended the event \"Women's Soccer\"", "evidence": "Women's Soccer is an event name", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM event WHERE event_name = 'Women's Soccer'", + "pred": "SELECT COUNT(t1.student_id) FROM attendance AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'Women% Soccer'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1316, @@ -14481,10 +18429,13 @@ "question": "Please list the phone numbers of the students from the Student_Club that has attended the event \"Women's Soccer\"", "evidence": "Women's Soccer is an event name; phone numbers refers to phone", "difficulty": "moderate", - "pred": "SELECT phone FROM student_Club WHERE event_name = 'Women's Soccer'", + "pred": "SELECT t1.phone FROM member AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'Women% Soccer'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1317, @@ -14492,10 +18443,13 @@ "question": "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", "evidence": "Women's Soccer is an event name; T-shirt that is in medium size refers to t_shirt_size = 'Medium'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.student_id) FROM event AS t1 INNER JOIN member AS t2 ON t1.id = t2.member_id WHERE t_shirt_size = 'Medium' AND t_event_name = 'Women's Soccer'", + "pred": "SELECT COUNT(t1.student_id) FROM student AS t1 INNER JOIN attendance AS t2 ON t1.student_id = t2.student_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'Women''s Soccer' AND t1.t_shirt_size = 'Medium'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 1318, @@ -14503,10 +18457,13 @@ "question": "What is the event that has the highest attendance of the students from the Student_Club", "evidence": "event with highest attendance refers to MAX(COUNT(link_to_event))", "difficulty": "simple", - "pred": "SELECT t2.event_name FROM attendance AS t1 INNER JOIN event AS t2 ON t1.link_to_event = (SELECT MAX(t2.zip) FROM event)", + "pred": "SELECT t2.event_name FROM attendance AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id GROUP BY t2.event_name ORDER BY COUNT(t1.link_to_event) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1319, @@ -14514,10 +18471,13 @@ "question": "Which college is the vice president of the Student_Club from", "evidence": "Vice President is a position of the Student Club", "difficulty": "simple", - "pred": "SELECT college FROM student_Club WHERE position = 'Vice President'", + "pred": "SELECT college FROM major WHERE position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1320, @@ -14525,10 +18485,13 @@ "question": "Please list the event names of all the events attended by Maya Mclean", "evidence": "", "difficulty": "simple", - "pred": "SELECT event_name FROM event WHERE first_name = 'Maya' AND last_name IS NULL", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN member AS t2 ON t1.event_id = t2.event_id WHERE t2.first_name = 'Maya' AND t2.last_name = 'Mclean'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1321, @@ -14536,10 +18499,13 @@ "question": "How many events of the Student_Club did Sacha Harrison attend in 2019", "evidence": "events attended in 2019 refers to YEAR(event_date) = 2019", "difficulty": "moderate", - "pred": "SELECT COUNT(event_id) FROM event WHERE event_name = 'Sacha Harrison' AND event_date = '2019'", + "pred": "SELECT COUNT(t2.event_id) FROM student AS t1 INNER JOIN attendance AS t2 ON t1.student_id = t2.student_id WHERE t1.first_name = 'Sacha' AND t1.last_name = 'Harrison' AND STRFTIME('%Y', t2.event_date) = '2019'", "gold": "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 SUBSTRING(t1.event_date, 1, 4) = '2019'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1322, @@ -14547,10 +18513,13 @@ "question": "Among the events attended by more than 10 members of the Student_Club, how many of them are meetings", "evidence": "meetings events refers to type = 'Meeting'; attended by more than 10 members refers to COUNT(event_id) > 10", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.event_id) FROM event AS t1 INNER JOIN zip_code AS t2 ON t1.zip_code = t2.zip WHERE t2.\"type\" = 'Meeting' GROUP BY t1.\"date\" ORDER BY COUNT(\"date\") DESC LIMIT 10", + "pred": "SELECT COUNT(t2.event_id) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE t1.type = 'Meeting' GROUP BY t2.event_id HAVING COUNT(t2.event_id) > 10", "gold": "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) > 10 EXCEPT SELECT t1.event_name FROM event AS t1 WHERE t1.type = 'Meeting'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1323, @@ -14558,10 +18527,13 @@ "question": "List all the names of events that had an attendance of over 20 students but were not fundraisers", "evidence": "name of events refers to event_name; attendance of over 20 students COUNT(event_id) > 20.", "difficulty": "moderate", - "pred": "SELECT event_name FROM event WHERE attendance < 20 AND fundraisers > 20", + "pred": "SELECT t2.event_name FROM attendance AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t1.cOUNT(t1.event_id) > 20", "gold": "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 EXCEPT SELECT t1.event_name FROM event AS t1 WHERE t1.type = 'Fundraiser'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1324, @@ -14569,10 +18541,13 @@ "question": "What is the average attendance of meetings in 2020", "evidence": "meetings in 2020 refers to type = 'Meeting' where YEAR(event_date) = 2020; average = DIVIDE(COUNT(event_id), COUNT(DISTINCT event_name))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.type = 'Meeting' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.event_id) FROM event AS t1 INNER JOIN zip_code AS t2 ON t1.\"zip_code\" = t2.\"zip\" WHERE t1.date\" = '2020'", + "pred": "SELECT CAST(COUNT(t2.event_id) AS REAL) / COUNT(DISTINCT t2.event_name) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE STRFTIME('%Y', t1.event_date) = '2020' AND t1.type = 'Meeting'", "gold": "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 SUBSTRING(t1.event_date, 1, 4) = '2020' AND t1.type = 'Meeting'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1325, @@ -14580,10 +18555,13 @@ "question": "What is the most expensive item that was spent in support of club events", "evidence": "item in support of club events refers to expense_description; most expensive refers to MAX(cost)", "difficulty": "simple", - "pred": "SELECT t2.cost FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.\"budget\" ORDER BY t1.\"cost\" DESC LIMIT 1", + "pred": "SELECT t1.cost FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id ORDER BY t1.cost DESC LIMIT 1", "gold": "SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1326, @@ -14591,10 +18569,13 @@ "question": "How many members of the Student_Club have majored Environmental Engineering", "evidence": "'Environmental Engineering' is the major name", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE major_name = 'Environmental Engineering'", + "pred": "SELECT COUNT(t1.member_id) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.major_name = 'Environmental Engineering'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1327, @@ -14602,10 +18583,13 @@ "question": "List the full name of all the members of the Student_Club who attended the \"Laugh Out Loud\" event", "evidence": "full name of members refers to first_name, last_name; 'Laugh Out Loud' is an event name;", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM member WHERE event_name = 'Laugh Out Loud'", + "pred": "SELECT first_name, last_name FROM member AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'Laugh Out Loud'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1328, @@ -14613,10 +18597,13 @@ "question": "List the last name of all the students who majored Law and Constitutional Studies", "evidence": "'Law and Constitutional Studies' is the major name", "difficulty": "simple", - "pred": "SELECT last_name FROM major WHERE major_name = 'Law and Constitutional Studies'", + "pred": "SELECT t1.last_name FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.major_name = 'Law and Constitutional Studies'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1329, @@ -14624,10 +18611,13 @@ "question": "What county did Sherri Ramsey grew up", "evidence": "", "difficulty": "simple", - "pred": "SELECT county FROM zip_code WHERE first_name = 'Sherri' AND last_name <> 'Ramsey'", + "pred": "SELECT county FROM zip_code WHERE first_name = 'Sherri' AND last_name = 'Ramsey'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1330, @@ -14635,10 +18625,13 @@ "question": "What college offers the major that Tyler Hewitt took", "evidence": "", "difficulty": "simple", - "pred": "SELECT college FROM major WHERE major_name = 'Tyler Hewitt'", + "pred": "SELECT college FROM major WHERE first_name = 'Tyler' AND last_name = 'Hewitt'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1331, @@ -14646,10 +18639,13 @@ "question": "What is the amount of the funds that the Vice President received", "evidence": "'Vice President' is a position of Student Club; funds received refers to amount.", "difficulty": "simple", - "pred": "SELECT amount FROM income WHERE position = 'Vice President'", + "pred": "SELECT amount FROM budget WHERE position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1332, @@ -14657,10 +18653,13 @@ "question": "How much did the Student_Club members spend on food in September Meeting", "evidence": "amount spent refers to spent; spend on food in September Meeting refers to category = 'Food' where event_name = 'September Meeting'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.member_id) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.zip_code WHERE t2.\"category\" = 'Food' AND t1.\"event_name\" LIKE 'September Meeting'", + "pred": "SELECT SUM(t1.totaldue) FROM budget AS t1 INNER JOIN attendance AS t2 ON t1.budget_id = t2.budget_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.category = 'Food' AND t2.event_name = 'September Meeting'", "gold": "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 SUBSTRING(t1.event_date, 6, 2) = '09'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1333, @@ -14671,7 +18670,10 @@ "pred": "SELECT city, state FROM zip_code WHERE position = 'President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1334, @@ -14679,10 +18681,13 @@ "question": "List the full name of the Student_Club members that grew up in Illinois state", "evidence": "full name of member refers to first_name, last_name", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM member WHERE state = 'Illinois'", + "pred": "SELECT first_name, last_name FROM member WHERE state = 'IL'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1335, @@ -14690,10 +18695,13 @@ "question": "How much did the Student_Club members spend on advertisement in September Meeting", "evidence": "amount spent refers to spent; spend on food in September Meeting refers to category = 'Advertisement' where event_name = 'September Meeting'", "difficulty": "moderate", - "pred": "SELECT SUM(t2.spent) FROM budget AS t1 INNER JOIN attendance AS t2 ON t1.budget_id = t2.zip_code WHERE t1.\"category\" = 'Sponsor' AND t2.\"event_name\" LIKE 'September Meeting'", + "pred": "SELECT SUM(t1.totaldue) FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.budget_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.category = 'Advertisement' AND t2.event_name = 'September Meeting'", "gold": "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 SUBSTRING(t1.event_date, 6, 2) = '09'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1336, @@ -14701,10 +18709,13 @@ "question": "What department offers the major that Pierce and Guidi took", "evidence": "", "difficulty": "simple", - "pred": "SELECT department FROM major WHERE department = 'Pierce and Guidi'", + "pred": "SELECT t1.department FROM major AS t1 INNER JOIN member AS t2 ON t1.major_id = t2.major_id WHERE t2.first_name = 'Pierce' AND t2.last_name = 'Guidi'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1337, @@ -14712,10 +18723,13 @@ "question": "What is the total budgeted amount for all category in \"October Speaker\" event", "evidence": "total budgeted amount refers to SUM(amount) where event_name = 'October Speaker'", "difficulty": "simple", - "pred": "SELECT SUM(amount) FROM budget WHERE event_name = 'October Speaker'", + "pred": "SELECT SUM(t1.amount) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'October Speaker'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1338, @@ -14723,10 +18737,13 @@ "question": "Was each expense in October Meeting on October 8, 2019 approved", "evidence": "event_name = 'October Meeting' where event_date = '2019-10-08'; approved = True means expenses was approved; approved = False means expenses was not approved", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.cost FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.\"event\" WHERE t1.\"event_date\" = '2019-10-08' AND approved = 'Yes'", + "pred": "SELECT t2.aidation FROM event AS t1 INNER JOIN expense AS t2 ON t1.event_id = t2.event_id WHERE t1.event_date = '2019-10-08' AND t1.event_name = 'October Meeting'", "gold": "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%'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1339, @@ -14734,10 +18751,13 @@ "question": "Calculate the total average cost that Elijah Allen spent in the events on September and October", "evidence": "Elijah Allen is the full name; full name refers to first_name, last_name; The 5th and 6th string of the expense_date in the expense table can refer to month; events in September and October refers to month(expense_date) = 9 OR month(expense_date) = 10", "difficulty": "challenging", - "pred": "SELECT SUM(t2.cost) FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.budget-id WHERE t1.\"first_name\" = 'Elijah' AND t3.last_name = 'Allen'", + "pred": "SELECT SUM(t1.cost) / COUNT(t1.cost) FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.first_name = 'Elijah' AND t2.last_name = 'Allen' AND t2.month BETWEEN 9 AND 10", "gold": "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 (SUBSTRING(t2.expense_date, 6, 2) = '09' OR SUBSTRING(t2.expense_date, 6, 2) = '10')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1340, @@ -14745,10 +18765,13 @@ "question": "Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020", "evidence": "The first 4 strings of the event_date values in the event table can represent year; The difference of the total amount spent = SUBTRACT(spent where YEAR(event_date) = 2019, spent where YEAR(event_date) = 2020)", "difficulty": "moderate", - "pred": "SELECT SUM(t2.event_date) FROM event AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.zip_code WHERE STRFTIME('%Y', t2.\"date\") = '2019' AND t1.\"year\" = '2020'", + "pred": "SELECT SUM(t2.spent) - SUM(t2.spent) FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE SUBSTRING(t1.event_date, 1, 4) = '2019' AND SUBSTRING(t1.event_date, 1, 4) = '2020'", "gold": "SELECT SUM(CASE WHEN SUBSTRING(t1.event_date, 1, 4) = '2019' THEN t2.spent ELSE 0 END) - SUM(CASE WHEN SUBSTRING(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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1341, @@ -14759,7 +18782,10 @@ "pred": "SELECT location FROM event WHERE event_name = 'Spring Budget Review'", "gold": "SELECT location FROM event WHERE event_name = 'Spring Budget Review'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1342, @@ -14767,10 +18793,13 @@ "question": "What was the cost for the \"Posters\" on 2019/9/4", "evidence": "'Poster' is an event description; on 2019/9/14 refers to event_date = '2019-09-04'", "difficulty": "simple", - "pred": "SELECT cost FROM expense WHERE event_date = '2019-09-04' AND event_description = 'Posters'", + "pred": "SELECT cost FROM event WHERE event_date = '2019-09-04' AND event_name = 'Posters'", "gold": "SELECT cost FROM expense WHERE expense_description = 'Posters' AND expense_date = '2019-09-04'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1343, @@ -14778,10 +18807,13 @@ "question": "With the biggest budget for the \"Food\", what was the remaining of it", "evidence": "remaining of budget refers to remaining, biggest budget for 'Food' refers to MAX(budget.amount) where category = 'Food'", "difficulty": "simple", - "pred": "SELECT MAX(amount) FROM budget WHERE category = 'Food' ORDER BY budget DESC LIMIT 1", + "pred": "SELECT budget_id FROM budget WHERE category = 'Food' ORDER BY amount DESC LIMIT 1", "gold": "SELECT remaining FROM budget WHERE category = 'Food' AND amount = (SELECT MAX(amount) FROM budget WHERE category = 'Food')", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1344, @@ -14789,10 +18821,13 @@ "question": "What was the notes of the fundraising on 2019/9/14", "evidence": "fundraising on 2019/9/14 refers to source = 'Fundraising' where date_received = '2019-09-14'", "difficulty": "simple", - "pred": "SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'", + "pred": "SELECT notes FROM income WHERE date_received = '2019-09-14' AND source = 'Fundraising'", "gold": "SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1345, @@ -14800,10 +18835,13 @@ "question": "How many majors are there in \"College of Humanities and Social Sciences\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT major_id) FROM major WHERE college = 'College of Humanities and Social Sciences'", + "pred": "SELECT COUNT(name) FROM major WHERE college = 'College of Humanities and Social Sciences'", "gold": "SELECT COUNT(major_name) FROM major WHERE college = 'College of Humanities and Social Sciences'", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1346, @@ -14811,10 +18849,13 @@ "question": "Tell the phone number of \"Carlo Jacobs\"", "evidence": "Carlo Jacobs is the full name; full name refers to first_name, last_name;", "difficulty": "simple", - "pred": "SELECT phone FROM phone WHERE first_name = 'Carlo Jacobs'", + "pred": "SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'", "gold": "SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1347, @@ -14822,10 +18863,13 @@ "question": "Tell the hometown county for \"Adela O'Gallagher\"", "evidence": "hometown county refers to county", "difficulty": "simple", - "pred": "SELECT county FROM county WHERE county = 'Adela O'Gallagher'", + "pred": "SELECT county FROM zip_code WHERE first_name = 'Adela' AND last_name = 'O''Gallagher'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1348, @@ -14833,10 +18877,13 @@ "question": "For all the budgets for \"November Meeting\", how many of them had exceeded the budget", "evidence": "'November Meeting' is an event name; remaining < 0 means the cost had exceeded the budget", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM budget WHERE event_name = 'November Meeting'", + "pred": "SELECT COUNT(t1.budget_id) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'November Meeting' AND t1. remaining < 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1349, @@ -14844,10 +18891,13 @@ "question": "Provide the total number of the budget amount for \"September Speaker\" event", "evidence": "'September Speaker' is an event name; total number of budget amount refers to SUM(amount)", "difficulty": "simple", - "pred": "SELECT SUM(amount) FROM budget WHERE event_name = 'September Speaker'", + "pred": "SELECT SUM(t1.amount) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'September Speaker'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1350, @@ -14855,10 +18905,13 @@ "question": "What is the status of the event which bought \"Post Cards, Posters\" on 2019/8/20", "evidence": "'Post Cards, Posters' is an expense description; on 2019/8/20 refers to expense_date = '2019-8-20'; status of event refers to event_status", "difficulty": "moderate", - "pred": "SELECT event_status FROM event WHERE expense_description = 'Post Cards, Posters' AND expense_date = '2019-8-20'", + "pred": "SELECT t2.event_status FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t1.expense_date = '2019-8-20' AND t1.item_description = 'Post Cards, Posters'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1351, @@ -14866,10 +18919,13 @@ "question": "What was Brent Thomason's major", "evidence": "Brent Thomason is the full name; full name refers to first_name, last_name; major refers to major_name", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM major WHERE major_name = 'Brent Thomason'", + "pred": "SELECT major_name FROM major WHERE first_name = 'Brent' AND last_name = 'Thomason'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1352, @@ -14877,10 +18933,13 @@ "question": "For all the club members from \"Business\" major, how many of them wear medium size t-shirt", "evidence": "'Business' is a major name; wear medium size t-shirt refers to t_shirt_size = 'Medium'", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM member WHERE t_shirt_size = 'Medium'", + "pred": "SELECT COUNT(t1.member_id) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.name = 'Business' AND t1.t_shirt_size = 'Medium'", "gold": "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 = 'Business' AND t1.t_shirt_size = 'Medium'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1353, @@ -14888,10 +18947,13 @@ "question": "What's Christof Nielson's zip code type", "evidence": "", "difficulty": "simple", - "pred": "SELECT type FROM zip_code WHERE type = 'zip code'", + "pred": "SELECT t1.zip_code FROM zip_code AS t1 INNER JOIN member AS t2 ON t1.zip_code = t2.zip_code WHERE t2.first_name = 'CHRISTO' AND t2.last_name = 'NIEL'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1354, @@ -14902,7 +18964,10 @@ "pred": "SELECT major_name FROM major WHERE position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1355, @@ -14910,10 +18975,13 @@ "question": "Where is the hometown state for \"Sacha Harrison\"", "evidence": "hometown state refers to state;", "difficulty": "simple", - "pred": "SELECT short_state FROM zip_code WHERE state = 'Sacha Harrison'", + "pred": "SELECT state FROM zip_code WHERE first_name = 'Sacha' AND last_name = 'Harrison'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1356, @@ -14921,10 +18989,13 @@ "question": "Which department was the President of the club in", "evidence": "'President' is a position of Student Club", "difficulty": "simple", - "pred": "SELECT department FROM department WHERE position = 'President'", + "pred": "SELECT t2.department FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t1.position = 'President'", "gold": "SELECT t2.department FROM member AS t1 INNER JOIN major AS t2 ON t1.link_to_major = t2.major_id WHERE t1.position = 'President'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1357, @@ -14932,10 +19003,13 @@ "question": "State the date Connor Hilton paid his/her dues", "evidence": "Connor Hilton is the full name; full name refers to first_name, last_name; date the dues was paid refers to date_received where source = 'Dues';", "difficulty": "simple", - "pred": "SELECT date_received FROM income WHERE source = 'Dues'", + "pred": "SELECT date_received FROM income WHERE source = 'Dues' AND first_name = 'Connor' AND last_name = 'Hilton'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1358, @@ -14943,10 +19017,13 @@ "question": "Who was the first one paid his/her dues? Tell the full name", "evidence": "full name refers to first_name, last_name; first paid dues refers to MIN(received_date) where source = 'Dues'", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM income WHERE source = 'Dues' ORDER BY received_date DESC LIMIT 1", + "pred": "SELECT first_name, last_name FROM income WHERE source = 'Dues' ORDER BY received_date LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1359, @@ -14954,10 +19031,13 @@ "question": "How many times was the budget in Advertisement for \"Yearly Kickoff\" meeting more than \"October Meeting\"", "evidence": "budget in Advertisement refer to category = 'Advertisement' in the budget table; DIVIDE(SUM(amount when event_name = 'Yearly Kickoff'), SUM(amount when event_name = 'October Meeting'))", "difficulty": "challenging", - "pred": "SELECT CAST((SUM(CASE WHEN event_name = 'Yearly Kickoff' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.budget_id) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.events_id WHERE t1.\"category\" = 'Advertisement'", + "pred": "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.event_id = t2.event_id", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1360, @@ -14965,10 +19045,13 @@ "question": "What percentage was the budget for Parking to the total budget for the \"November Speaker\"", "evidence": "DIVDE(SUM( amount where category = 'Parking' and event_name = 'November Speaker'), COUNT(event_name = 'November Speaker)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.category = 'Parking' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.event_name) FROM budget AS t1 INNER JOIN event AS t2 ON t1.events_id = t2.\"event_id\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.category = 'Parking' THEN t2.amount ELSE 0 END) AS REAL) * 100 / SUM(t2.amount) FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t1.event_name = 'November Speaker'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1361, @@ -14976,10 +19059,13 @@ "question": "What is the total cost of the pizzas for all the events", "evidence": "total cost of the pizzas refers to SUM(cost) where expense_description = 'Pizza'", "difficulty": "simple", - "pred": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'", + "pred": "SELECT SUM(t2.cost) FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t1.expense_description = 'Pizza'", "gold": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1362, @@ -14990,7 +19076,10 @@ "pred": "SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'", "gold": "SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1363, @@ -14998,10 +19087,13 @@ "question": "List all of the College of Humanities and Social Sciences' departments", "evidence": "", "difficulty": "simple", - "pred": "SELECT department FROM department WHERE department = 'Humanities and Social Sciences'", + "pred": "SELECT department FROM major WHERE college = 'Humanities and Social Sciences'", "gold": "SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1364, @@ -15009,10 +19101,13 @@ "question": "Where is Amy Firth's hometown", "evidence": "hometown refers to city, county, state", "difficulty": "simple", - "pred": "SELECT city, county, state FROM person WHERE state = 'Amy Firth'", + "pred": "SELECT city, county, state FROM zip_code WHERE first_name = 'Amy' AND last_name = 'Firth'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1365, @@ -15020,10 +19115,13 @@ "question": "What are the expenses of the budget with the lowest remaining", "evidence": "expense of budget refers to expense_description; lowest remaining refers to MIN(remaining)", "difficulty": "simple", - "pred": "SELECT t2.expense_description FROM budget AS t1 INNER JOIN expense AS t2 ON t1.budget_id = t2.\"budget\" ORDER BY t1.\"remaining\" DESC LIMIT 1", + "pred": "SELECT t2.expense_description FROM budget AS t1 INNER JOIN expense AS t2 ON t1.budget_id = t2.budget_id ORDER BY t1.remaining LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1366, @@ -15031,10 +19129,13 @@ "question": "List all the members who attended the event \"October Meeting\"", "evidence": "'October Meeting' is an event name;", "difficulty": "simple", - "pred": "SELECT DISTINCT t1.first_name, t2.last_name FROM event AS t1 INNER JOIN member AS t2 ON t1.\"link_to_event\" = t2.\"event_id\" WHERE t3.event_name = 'October Meeting'", + "pred": "SELECT t1.first_name, t1.last_name FROM person AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'October Meeting'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 1367, @@ -15045,7 +19146,10 @@ "pred": "SELECT college FROM major GROUP BY college ORDER BY COUNT(college) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1368, @@ -15053,10 +19157,13 @@ "question": "What does the person with the phone number \"809-555-3360\" major in", "evidence": "major in refers to major_name", "difficulty": "simple", - "pred": "SELECT phone FROM major WHERE phone = '809-555-3360'", + "pred": "SELECT major_name FROM major WHERE phone = '809-555-3360'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1369, @@ -15064,10 +19171,13 @@ "question": "Which event has the highest budget amount", "evidence": "event refers to event_name; highest budget amount refers to MAX(amount)", "difficulty": "simple", - "pred": "SELECT event_name FROM budget ORDER BY amount DESC LIMIT 1", + "pred": "SELECT event_name FROM event WHERE amount = (SELECT MAX(amount) FROM budget)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1370, @@ -15075,10 +19185,13 @@ "question": "List all the expenses incurred by the vice president", "evidence": "expense refers to expense_description; 'Vice President' is a position of the Student Club", "difficulty": "simple", - "pred": "SELECT expense_description FROM expense WHERE position = 'Vice President'", + "pred": "SELECT t1.expense_description FROM expense AS t1 INNER JOIN member AS t2 ON t1.member_id = t2.member_id WHERE t2.position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1371, @@ -15086,10 +19199,13 @@ "question": "How many members attended the \"Women's Soccer\" event", "evidence": "'Women's Soccer' is the event name;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM attendance WHERE event_name = 'Women's Soccer'", + "pred": "SELECT COUNT(t2.member_id) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE t1.event_name = 'Women% Soccer'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1372, @@ -15097,10 +19213,13 @@ "question": "When did the member, Casey Mason, received the income", "evidence": "when the income was received refers to date_received", "difficulty": "simple", - "pred": "SELECT t2.date_received FROM income AS t1 INNER JOIN member AS t2 ON t1.member_id = t2.\"member\" WHERE t1.\"first_name\" = 'Casey Mason'", + "pred": "SELECT t1.date_received FROM income AS t1 INNER JOIN member AS t2 ON t1.member_id = t2.member_id WHERE t2.first_name = 'Casey' AND t2.last_name = 'Mason'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1373, @@ -15108,10 +19227,13 @@ "question": "How many of the members' hometowns are from Maryland state", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE state = 'Maryland'", + "pred": "SELECT COUNT(*) FROM zip_code WHERE state = 'MD'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1374, @@ -15119,10 +19241,13 @@ "question": "How many events did the member with the phone number \"954-555-6240\" attend", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE phone = '954-555-6240'", + "pred": "SELECT COUNT(t2.event_name) FROM member AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id WHERE t1.phone = '954-555-6240'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1375, @@ -15133,7 +19258,10 @@ "pred": "SELECT first_name, last_name FROM member WHERE department = 'School of Applied Sciences, Technology and Education'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1376, @@ -15141,10 +19269,13 @@ "question": "Among all the closed events, which event has the highest spend-to-budget ratio", "evidence": "closed events refers to event_name where status = 'Closed'; highest spend-to budget ratio refers to MAX(DIVIDE(spent, amount))", "difficulty": "moderate", - "pred": "SELECT event_name FROM event WHERE status = 'Closed' ORDER BY budget DESC LIMIT 1", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t1.status = 'Closed' GROUP BY t1.event_name ORDER BY SUM(t2.spent * t2.amount) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1377, @@ -15155,7 +19286,10 @@ "pred": "SELECT COUNT(*) FROM member WHERE position = 'President'", "gold": "SELECT COUNT(member_id) FROM member WHERE position = 'President'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1378, @@ -15163,10 +19297,13 @@ "question": "What is the highest amount of budget spend for an event", "evidence": "highest amount of budget spend refers to MAX(spent)", "difficulty": "simple", - "pred": "SELECT MAX(spent) FROM budget ORDER BY budget DESC LIMIT 1", + "pred": "SELECT MAX(t1.spent) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id", "gold": "SELECT MAX(spent) FROM budget", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1379, @@ -15174,10 +19311,13 @@ "question": "How many meeting events were held in 2020", "evidence": "meeting events refers to type = 'Meeting'; held in 2020 refers to YEAR(event_date) = 2020", "difficulty": "simple", - "pred": "SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND STRFTIME('%Y', event_date) = '2020'", + "pred": "SELECT COUNT(event_id) FROM event WHERE SUBSTRING(event_date, 1, 4) = '2020' AND type = 'Meeting'", "gold": "SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND SUBSTRING(event_date, 1, 4) = '2020'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1380, @@ -15185,10 +19325,13 @@ "question": "What is the total amount of money spent for food", "evidence": "total amount of money spent refers to SUM(spent); spent for food refers to category = 'Food'", "difficulty": "simple", - "pred": "SELECT SUM(t2.spent) FROM budget AS t1 INNER JOIN department AS t2 ON t1.department_id = t2.zip_code WHERE t1.\"category\" = 'Food'", + "pred": "SELECT SUM(t1.spent) FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.budget_id WHERE t2.category = 'Food'", "gold": "SELECT SUM(spent) FROM budget WHERE category = 'Food'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1381, @@ -15196,10 +19339,13 @@ "question": "List the name of students that have attended more than 7 events", "evidence": "name of students means the full name; full name refers to first_name, last_name; attended more than 7 events refers to COUNT(link_to_event) > 7", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM event WHERE COUNT(link_to_event) > 7", + "pred": "SELECT t1.first_name, t1.last_name FROM person AS t1 INNER JOIN attendance AS t2 ON t1.person_id = t2.person_id GROUP BY t1.first_name, t1.last_name HAVING COUNT(t2.link_to_event) > 7", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1382, @@ -15207,10 +19353,13 @@ "question": "Among the students majored in interior design, who have attended the Community Theater event", "evidence": "majored in music refers to major_name = 'Interior Design'; 'Community Theater' is the event name;", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM major WHERE major_name = 'Interior Design'", + "pred": "SELECT COUNT(t1.name) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id INNER JOIN major AS t3 ON t2.link_to_event = t3.event_id WHERE t1.event_name = 'Community Theater' AND t3.major_name = 'Interior Design'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.75, + "table_f1": 0.8571428571428571 }, { "idx": 1383, @@ -15218,10 +19367,13 @@ "question": "State the name of students from Georgetown, South Carolina", "evidence": "name of students means the full name; full name refers to first_name, last_name; Georgetown is a city; South Carolina is a state", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM zip_code WHERE state = 'South Carolina'", + "pred": "SELECT first_name, last_name FROM student WHERE city = 'Georgetown' AND state = 'South Carolina'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1384, @@ -15229,10 +19381,13 @@ "question": "How many income generated by Grant Gilmour", "evidence": "income generated refers to income.amount", "difficulty": "simple", - "pred": "SELECT COUNT(income_id) FROM income WHERE source = 'Grant Gilmour'", + "pred": "SELECT SUM(amount) FROM income WHERE first_name = 'Grant' AND last_name = 'Gilmour'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1385, @@ -15240,10 +19395,13 @@ "question": "Which student was able to generate income more than $40", "evidence": "name of students means the full name; full name refers to first_name, last_name; generate income more than $50 refers to income.amount > 40", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM income WHEREamount > 40", + "pred": "SELECT t1.first_name, t1.last_name FROM student AS t1 INNER JOIN income AS t2 ON t1.income_id = t2.income_id WHERE t2.amount > 40", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1386, @@ -15251,10 +19409,13 @@ "question": "What is the total expense for the Yearly Kickoff", "evidence": "'Yearly Kickoff' is an event name; total expense refers to SUM(cost)", "difficulty": "simple", - "pred": "SELECT SUM(cost) FROM expense WHERE event_name = 'Yearly Kickoff'", + "pred": "SELECT SUM(t1.cost) FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'Yearly Kickoff'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1387, @@ -15262,10 +19423,13 @@ "question": "Which student has been entrusted to manage the budget for the Yearly Kickoff", "evidence": "name of students means the full name; full name refers to first_name, last_name;'Yearly Kickoff' is an event name;", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM budget WHERE event = 'Yearly Kickoff'", + "pred": "SELECT t1.first_name, t1.last_name FROM student AS t1 INNER JOIN budget AS t2 ON t1.student_id = t2.student_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'Yearly Kickoff'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.5, + "table_f1": 0.5714285714285715 }, { "idx": 1388, @@ -15273,10 +19437,13 @@ "question": "Which students manage to generate the highest income. State his/her full name along with the income source", "evidence": "name of students means the full name; full name refers to first_name, last_name; generate the highest income refers to MAX(income.amount);", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM income ORDER BY amount DESC LIMIT 1", + "pred": "SELECT t1.first_name, t1.last_name, t1.source FROM income AS t1 INNER JOIN member AS t2 ON t1.member_id = t2.member_id ORDER BY t1.amount DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1389, @@ -15284,10 +19451,13 @@ "question": "Which event has the lowest cost", "evidence": "event refers to event_name; lowest cost means MIN(cost)", "difficulty": "simple", - "pred": "SELECT event_name FROM event WHERE cost = (SELECT MIN(cost) FROM event)", + "pred": "SELECT event_name FROM event ORDER BY cost ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1390, @@ -15295,10 +19465,13 @@ "question": "Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event", "evidence": "percentage = DIVIDE(SUM(cost where event_name = 'Yearly Kickoff'), SUM(cost)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.event_name = 'Yearly Kickoff' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.cost) FROM event AS t1 INNER JOIN expense AS t2 ON t1.zip_code = t2.\"zip_codes\" WHERE t1.\"name\" = 'Yearly Kickoff')", + "pred": "SELECT CAST(SUM(IIF(event_name = 'Yearly Kickoff', 1, 0)) AS REAL) * 100 / SUM(IIF(event_name = 'Yearly Kickoff', 1, 0)) FROM event", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1391, @@ -15306,10 +19479,13 @@ "question": "What is the ratio between students majored in finance and physics", "evidence": "DIVDE(SUM(major_name = 'Finance'), SUM(major_name = 'Physics'))", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.major_name = 'Finance' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(t2.percentage) FROM major", + "pred": "SELECT CAST(SUM(CASE WHEN t1.major_name = 'Finance' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN t1.major_name = 'Physics' THEN 1 ELSE 0 END) FROM major AS t1 INNER JOIN student AS t2 ON t1.major_id = t2.major_id", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1392, @@ -15317,10 +19493,13 @@ "question": "Indicate the top source of funds received in September 2019 based on their amount", "evidence": "top source funds refers to MAX(source); September 2019 means date_received BETWEEN '2019-09-01' and '2019-09-30'", "difficulty": "simple", - "pred": "SELECT MAX(source) FROM income WHERE date_received BETWEEN '2019-09-01' AND '2019%09-30' ORDER BY amount DESC LIMIT 1", + "pred": "SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' AND '2019-09-30' ORDER BY amount DESC LIMIT 1", "gold": "SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' AND '2019-09-30' ORDER BY source DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1393, @@ -15328,10 +19507,13 @@ "question": "Provide the full name and email address of the Student_Club's Secretary", "evidence": "full name refers to first_name, last_name; 'Secretary' is a position of Student Club", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM member WHERE position = 'Secretary'", + "pred": "SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'", "gold": "SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1394, @@ -15339,10 +19521,13 @@ "question": "How many members of the Student_Club have major in 'Physics Teaching'", "evidence": "'Physics Teaching' is the major_name;", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE major_name = 'Physics Teaching'", + "pred": "SELECT COUNT(t1.member_id) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.major_name = 'Physics Teaching'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1395, @@ -15350,10 +19535,13 @@ "question": "How many members did attend the event 'Community Theater' in 2019", "evidence": "event 'Community Theater' in 2019 refers to event_name = 'Community Theater' where YEAR(event_date) = 2019", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM attendance WHERE event_name = 'Community Theater' AND STRFTIME('%Y', event_date) = '2019'", + "pred": "SELECT COUNT(t2.member_id) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE SUBSTRING(t1.event_date, 1, 4) = '2019' AND t1.event_name = 'Community Theater'", "gold": "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 SUBSTRING(t1.event_date, 1, 4) = '2019'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1396, @@ -15361,10 +19549,13 @@ "question": "Provide the number of events attended by Luisa Guidi. What is her major", "evidence": "major refers to major_name;", "difficulty": "simple", - "pred": "SELECT COUNT(t1.event_id) FROM event AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major.id WHERE t2.\"first_name\" = 'Luisa Guidi'", + "pred": "SELECT COUNT(t1.event_name) FROM event AS t1 INNER JOIN member AS t2 ON t1.event_id = t2.event_id INNER JOIN major AS t3 ON t2.major_id = t3.major_id WHERE t2.first_name = 'Luisa' AND t2.last_name = 'Guidi'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 1397, @@ -15372,10 +19563,13 @@ "question": "On average, how much did the Student_Club spend on food for the typical event in the past", "evidence": "DIVIDE(SUM(spent), COUNT(spent)) where category = 'Food'; 'event in the past' means event_status = 'Closed'", "difficulty": "simple", - "pred": "SELECT SUM(t2.spent) / COUNT(t1.event_status) FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.zip_code WHERE t1.\"category\" = 'Food' AND t2.\"event in the past' = 'Closed'", + "pred": "SELECT CAST(SUM(t1.spent) AS REAL) / COUNT(t1.event_id) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.category = 'Food' AND t2.event_status = 'Closed'", "gold": "SELECT SUM(spent) / COUNT(spent) FROM budget WHERE category = 'Food' AND event_status = 'Closed'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1398, @@ -15383,10 +19577,13 @@ "question": "Name the event with the highest amount spent on advertisement", "evidence": "Name of event refers to event_name; highest amount spent on advertisement refers to MAX(spent) where category = 'Advertisement'", "difficulty": "moderate", - "pred": "SELECT event_name FROM event WHERE category = 'Advertisement' ORDER BY spent DESC LIMIT 1", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t2.category = 'Advertisement' ORDER BY t1.spent DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1399, @@ -15394,10 +19591,13 @@ "question": "Did Maya Mclean attend the 'Women's Soccer' event", "evidence": "Maya Mclean is the full name; full name refers to first_name, last_name; 'Women's Soccer' is an event_name", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM event WHERE event_name = 'Women's Soccer'", + "pred": "SELECT t2.first_name, t2.last_name FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE t1.event_name = 'Women''s Soccer' AND t2.first_name = 'Maya' AND t2.last_name = 'Mclean'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1400, @@ -15405,10 +19605,13 @@ "question": "Among all events hold by the Student_Club in 2019, find the percentage share of events related to 'Community Service'", "evidence": "DIVIDE(SUM(type = 'Community Service'), COUNT(event_id)) * 100 where event_date BETWEEN' 2019-01-01' and '2019-12-31'", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.event_id) FROM event AS t1 INNER JOIN zip_code AS t2 ON t1.\"zip_code\" = t2.\"zip\" WHERE t1.date BETWEEN '2019-01-01' AND '2019_12-31'", + "pred": "SELECT CAST(SUM(CASE WHEN t2.type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.event_id) FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE t1.event_date LIKE '%2019%'", "gold": "SELECT CAST(SUM(CASE WHEN type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(type) FROM event WHERE SUBSTRING(event_date, 1, 4) = '2019'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1401, @@ -15416,10 +19619,13 @@ "question": "Indicate the cost of posters for 'September Speaker' event", "evidence": "'Posters' is the expense description; 'September Speaker' is an event name", "difficulty": "moderate", - "pred": "SELECT cost FROM expense WHERE expense_description = 'Posters' AND event_name = 'September Speaker'", + "pred": "SELECT cost FROM expense WHERE event_name = 'September Speaker' AND expense_description = 'Posters'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1402, @@ -15427,10 +19633,13 @@ "question": "What is the most popular size of t-shirt ordered by the club members", "evidence": "most popular size of t-shirt ordered refers to MAX(COUNT(t_shirt_size))", "difficulty": "simple", - "pred": "SELECT MAX(t_shirt_size) FROM member AS t1 INNER JOIN zip_code AS t2 ON t1.zip = t2.zip_code GROUP BY t1.\"zip\" ORDER BY COUNT(t2.t_shirts_size)) DESC LIMIT 1", + "pred": "SELECT t_shirt_size FROM member GROUP BY t_shirt_size ORDER BY COUNT(t_shirt_size) DESC LIMIT 1", "gold": "SELECT t_shirt_size FROM member GROUP BY t_shirt_size ORDER BY COUNT(t_shirt_size) DESC LIMIT 1", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1403, @@ -15438,10 +19647,13 @@ "question": "Indicate the name of the closed event whose cost has exceeded the budget the most", "evidence": "closed events refers to event_name where status = 'Closed'; exceed the budget the most refers to MIN(remaining) where remaining < 0", "difficulty": "moderate", - "pred": "SELECT t2.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.\"budget\" WHERE t1.\"status\" = 'Closed' ORDER BY t2\".remaining\" DESC LIMIT 1", + "pred": "SELECT event_name FROM event WHERE status = 'Closed' AND remaining < 0 ORDER BY budget DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1404, @@ -15449,10 +19661,13 @@ "question": "Identify the type of expenses and their total value approved for 'October Meeting' event", "evidence": "total value refers to SUM(cost); 'October Meeting' is an event name;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.type, SUM(t2.cost) FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.\"event\" WHERE t1.\"event name\" = 'October Meeting'", + "pred": "SELECT t2.cost, SUM(t2.cost) FROM event AS t1 INNER JOIN expense AS t2 ON t1.event_id = t2.event_id WHERE t1.event_name = 'October Meeting'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1405, @@ -15460,10 +19675,13 @@ "question": "Calculate the amount budgeted for 'April Speaker' event. List all the budgeted categories for said event in an ascending order based on their amount budgeted", "evidence": "'April Speaker' is an event name; amount budgeted refers to SUM(amount); budget categories refers to category", "difficulty": "moderate", - "pred": "SELECT SUM(amount) FROM event WHERE event_name = 'April Speaker' ORDER BY amount DESC LIMIT 1", + "pred": "SELECT SUM(t1.amount) FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'April Speaker'", "gold": "SELECT t2.category, SUM(t2.amount) FROM event AS t1 JOIN budget AS t2 ON t1.event_id = t2.link_to_event WHERE t1.event_name = 'April Speaker' GROUP BY t2.category ORDER BY SUM(t2.amount) ASC", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1406, @@ -15471,10 +19689,13 @@ "question": "Among the budgets for Food, which one has the highest budgeted amount", "evidence": "MAX(amount) where category = 'Food'", "difficulty": "simple", - "pred": "SELECT t2.budget FROM budget AS t1 INNER JOIN income AS t2 ON t1.budget_id = t2.\"budget\" ORDER BY t1.\"amount\" DESC LIMIT 1", + "pred": "SELECT t2.budget_id FROM category AS t1 INNER JOIN budget AS t2 ON t1.category_id = t2.category_id WHERE t1.category = 'Food' ORDER BY t2.amount DESC LIMIT 1", "gold": "SELECT budget_id FROM budget WHERE category = 'Food' AND amount = (SELECT MAX(amount) FROM budget)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1407, @@ -15482,10 +19703,13 @@ "question": "Among the budgets for Advertising, list out top three which have the most budgeted amount", "evidence": "MAX(amount) where category = 'Advertisement'", "difficulty": "simple", - "pred": "SELECT t2.budget_id FROM budget AS t1 INNER JOIN category AS t2 ON t1.category = t2.\"category\" ORDER BY t1.\"amount\" DESC LIMIT 3", + "pred": "SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3", "gold": "SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1408, @@ -15493,10 +19717,13 @@ "question": "Calculate the total cost spent for Parking in the list", "evidence": "total cost spent for Parking refers to SUM(cost) where expense_description = 'Parking'", "difficulty": "simple", - "pred": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Parking'", + "pred": "SELECT SUM(t1.cost) FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.budget_id WHERE t1.expense_description = 'Parking'", "gold": "SELECT SUM(cost) FROM expense WHERE expense_description = 'Parking'", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1409, @@ -15507,7 +19734,10 @@ "pred": "SELECT SUM(cost) FROM expense WHERE expense_date = '2019-08-20'", "gold": "SELECT SUM(cost) FROM expense WHERE expense_date = '2019-08-20'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1410, @@ -15515,10 +19745,13 @@ "question": "List out the full name and total cost that member id \"rec4BLdZHS2Blfp4v\" incurred", "evidence": "full name refers to first_name, last name", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM member WHERE member id = 'rec4BLdZHS2Blfp4v'", + "pred": "SELECT first_name, last_name, total cost FROM member WHERE member_id ='rec4BLdZHS2Blfp4v'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1411, @@ -15526,10 +19759,13 @@ "question": "State what kind of expenses that Sacha Harrison incurred", "evidence": "kind of expenses refers to expense_description; Sacha Harrison is the full name; full name refers to first_name, last_name;", "difficulty": "simple", - "pred": "SELECT expense_description FROM expense WHERE first_name = 'Sacha Harrison'", + "pred": "SELECT t1.expense_description FROM expense AS t1 INNER JOIN member AS t2 ON t1.member_id = t2.member_id WHERE t2.first_name = 'Sacha' AND t2.last_name = 'Harrison'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1412, @@ -15537,10 +19773,13 @@ "question": "What kind of expenses incurred by members who have X-Large in size of tee shirt", "evidence": "kind of expenses refers to expense_description; t_shirt_size = 'X-Large'", "difficulty": "simple", - "pred": "SELECT expense_description FROM expense WHERE t_shirt_size = 'X-Large'", + "pred": "SELECT t2.cost_description FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id WHERE t1.t_shirt_size = 'X-Large'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1413, @@ -15548,10 +19787,13 @@ "question": "Mention the zip code of member who incurred less than 50USD", "evidence": "incurred less than 50USD refers to cost < 50", "difficulty": "simple", - "pred": "SELECT zip_code FROM member WHERE cost < 50", + "pred": "SELECT t1.zip_code FROM member AS t1 INNER JOIN zip_code AS t2 ON t1.zip_code = t2.zip_code WHERE t2.cost < 50", "gold": "SELECT t1.zip FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.link_to_member WHERE t2.cost < 50", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1414, @@ -15559,10 +19801,13 @@ "question": "State the name of major that Phillip Cullen has joined", "evidence": "name of major refers to major_name", "difficulty": "simple", - "pred": "SELECT t2.major_name FROM major AS t1 INNER JOIN member AS t2 ON t1.key_to_major = t2.\"key\" WHERE t1.\"first_name\" = 'Phillip Cullen'", + "pred": "SELECT t1.major_name FROM major AS t1 INNER JOIN member AS t2 ON t1.major_id = t2.major_id WHERE t2.first_name = 'Phillip' AND t2.last_name = 'Cullen'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1415, @@ -15570,10 +19815,13 @@ "question": "List out the position of members who joined major of Business", "evidence": "'Business' is the major name", "difficulty": "simple", - "pred": "SELECT position FROM member WHERE major_name = 'Business'", + "pred": "SELECT t1.position FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.major_name = 'Business'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1416, @@ -15581,10 +19829,13 @@ "question": "How many members of Business have the Medium size of tee shirt", "evidence": "members of Economics refers to major_name = 'Business'; t_shirt_size = 'Medium'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE t_shirt_size = 'Medium'", + "pred": "SELECT COUNT(t1.member_id) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t1.t_shirt_size = 'Medium' AND t2.major_name = 'Business'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1417, @@ -15592,10 +19843,13 @@ "question": "List out the type of events which have remaining budget more than 30 USD", "evidence": "remaining budget more than 30 USD refers to remaining > 30", "difficulty": "simple", - "pred": "SELECT type FROM event WHERE remaining > 30", + "pred": "SELECT t2.type FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t1.sto > 30", "gold": "SELECT t1.type FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.link_to_event WHERE t2.remaining > 30", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1418, @@ -15603,10 +19857,13 @@ "question": "Mention the category of events which were held at MU 215", "evidence": "held at MU 215 refers to location = 'MU 215'", "difficulty": "simple", - "pred": "SELECT category FROM event WHERE location = 'MU 215'", + "pred": "SELECT t1.category FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.budget_id WHERE t2.location = 'MU 215'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1419, @@ -15614,10 +19871,13 @@ "question": "What is the category of event which was taken place in 2020-03-24T12:00:00", "evidence": "taken place in 2020-03-24T12:00:00 refers to event_date = '2020-03-24T12:00:00'", "difficulty": "simple", - "pred": "SELECT category FROM event WHERE event_date = '2020-03-24T12:00:00'", + "pred": "SELECT t2.category FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t1.event_date = '2020-03-24T12:00:00'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1420, @@ -15625,10 +19885,13 @@ "question": "State the name of major that Vice President has joined", "evidence": "name of major refers to major_name; 'Vice President' is position of Student Club", "difficulty": "simple", - "pred": "SELECT major_name FROM major WHERE position = 'Vice President'", + "pred": "SELECT t1.major_name FROM major AS t1 INNER JOIN member AS t2 ON t1.major_id = t2.major_id WHERE t2.position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1421, @@ -15636,10 +19899,13 @@ "question": "Calculate the percentage of members who are major Business in the list", "evidence": "DIVIDE(SUM(position = 'Member' and major_name = 'Business'), COUNT(member_id)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t2.position = 'Member' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.member_id) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.\"major\"", + "pred": "SELECT CAST(SUM(CASE WHEN t1.category = 'Business' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.category) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id", "gold": "SELECT CAST(SUM(CASE WHEN t2.major_name = 'Business' 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1422, @@ -15647,10 +19913,13 @@ "question": "State the category of events were held at MU 215", "evidence": "'MU 215' is the location of event; ", "difficulty": "simple", - "pred": "SELECT category FROM event WHERE location = 'MU 215'", + "pred": "SELECT t1.category FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.budget_id WHERE t2.location = 'MU 215'", "gold": "SELECT DISTINCT t2.category FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.link_to_event WHERE t1.location = 'MU 215'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1423, @@ -15661,7 +19930,10 @@ "pred": "SELECT COUNT(income_id) FROM income WHERE amount = 50", "gold": "SELECT COUNT(income_id) FROM income WHERE amount = 50", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1424, @@ -15669,10 +19941,13 @@ "question": "Among the members, how many of them have an extra large t-shirt size", "evidence": "among the members refers to position = 'Member'; extra large t-shirt size refers to t_shirt_size = 'X-Large'", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM member WHERE position = 'Member' AND t_shirt_size = 'X-Large'", + "pred": "SELECT COUNT(*) FROM member WHERE t_shirt_size = 'X-Large' AND position = 'Member'", "gold": "SELECT COUNT(member_id) FROM member WHERE position = 'Member' AND t_shirt_size = 'X-Large'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1425, @@ -15680,10 +19955,13 @@ "question": "In the College of Agriculture and Applied Sciences, how many majors are under the department of School of Applied Sciences, Technology and Education", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(DISTINCT major_id) FROM major WHERE department = 'School of Applied Sciences, Technology and Education'", + "pred": "SELECT COUNT(DISTINCT major_name) FROM major WHERE department = 'School of Applied Sciences, Technology and Education'", "gold": "SELECT COUNT(major_id) FROM major WHERE department = 'School of Applied Sciences, Technology and Education' AND college = 'College of Agriculture and Applied Sciences'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1426, @@ -15691,10 +19969,13 @@ "question": "List the last name of members with a major in environmental engineering and include its department and college name", "evidence": "'Environmental Engineering' is the major_name;", "difficulty": "moderate", - "pred": "SELECT last_name, college FROM member WHERE major_name = 'Environmental Engineering'", + "pred": "SELECT last_name, department, college FROM major WHERE major_name = 'Environmental Engineering'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1427, @@ -15702,10 +19983,13 @@ "question": "What are the budget category of the events located at MU 215 and a guest speaker type with a 0 budget spent", "evidence": "budget category refers to category; events located at refers to location; type = 'Guest Speaker'; 0 budget spent refers to spent = 0; ", "difficulty": "moderate", - "pred": "SELECT t2.category FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.\"event\" WHERE t1.\"location\" = 'MU 215' AND t1\"type = 'Guest Speaker' AND SUBSTRING(t2.spent) = 0", + "pred": "SELECT t1.category FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.location = 'MU 215' AND t2.type = 'Guest Speaker' AND t2.totals = 0", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1428, @@ -15713,10 +19997,13 @@ "question": "List the city and state of members enrolled under electrical and computer engineering department", "evidence": "'Electrical and Computer Engineering Department' is the department; members enrolled refers to position = 'Member'", "difficulty": "moderate", - "pred": "SELECT city, state FROM member WHERE position = 'Member'", + "pred": "SELECT city, state FROM zip_code WHERE department = 'Electrical and Computer Engineering' AND position = 'Member'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1429, @@ -15724,10 +20011,13 @@ "question": "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", "evidence": "name of social event refers to event_name where type = 'Social'; 'Vice President' is position; located at refers to location", "difficulty": "challenging", - "pred": "SELECT event_name FROM event WHERE type = 'Social' AND location = '900 E. Washington St' AND position = 'Vice President'", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN member AS t2 ON t1.event_id = t2.event_id WHERE t2.type = 'Social' AND t2.location = '900 E. Washington St' AND t2.position = 'Vice President'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1430, @@ -15735,10 +20025,13 @@ "question": "What is the last name and position of the student that bought pizza on 09/10/2019", "evidence": "bought pizza on 09/10/2019 refers to expense_description = 'Pizza' where expense_date = '2019-09-10'", "difficulty": "moderate", - "pred": "SELECT last_name, position FROM expense WHERE expense_description = 'Pizza' AND expense_date = '2019-09-10'", + "pred": "SELECT t1.last_name, t1.position FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id WHERE t2.expense_description = 'Pizza' AND t2.cost_date = '2019-09-10'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1431, @@ -15746,10 +20039,13 @@ "question": "List the last name of the members of the club that attended the women's soccer event", "evidence": "members of the club refers to position = 'Member'; 'Women's Soccer' is event name;", "difficulty": "moderate", - "pred": "SELECT last_name FROM member WHERE position = 'Member' AND event_name = 'Women's Soccer'", + "pred": "SELECT t1.last_name FROM member AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.event_name = 'Women% Soccer' AND t1.position = 'Member'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1432, @@ -15757,10 +20053,13 @@ "question": "Among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the Student_Club", "evidence": "t_shirt_size = 'Medium' where position = 'Member'; percentage = DIVIDE(COUNT(amount = 50), COUNT(member_id)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN t_shirt_size = 'Medium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.member_id) FROM member AS t1 INNER JOIN income AS t2 ON t1.zip_code = t2.zip", + "pred": "SELECT CAST(SUM(CASE WHEN t1.amount = 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.member_id) FROM member AS t1 INNER JOIN income AS t2 ON t1.member_id = t2.member_id WHERE t1.position = 'Member' AND t1.t_shirt_size = 'Medium'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1433, @@ -15768,10 +20067,13 @@ "question": "Which countries have zip codes with post office boxes", "evidence": "zip codes that have post office boxes refers to type = 'PO Box'", "difficulty": "simple", - "pred": "SELECT country FROM zip_code WHERE type = 'PO Box'", + "pred": "SELECT DISTINCT t1.county FROM zip_code AS t1 INNER JOIN event AS t2 ON t1.zip_code = t2.zip_code WHERE t2.type = 'PO Box'", "gold": "SELECT DISTINCT county FROM zip_code WHERE type = 'PO Box' AND NOT county IS NULL", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1434, @@ -15779,10 +20081,13 @@ "question": "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", "evidence": "zip codes that have post office boxes refers to type = 'PO Box'", "difficulty": "simple", - "pred": "SELECT type FROM zip_code WHERE state = 'San Juan Municipio' AND type = 'PO Box'", + "pred": "SELECT DISTINCT t2.zip_code FROM state AS t1 INNER JOIN zip_code AS t2 ON t1.state = t2.state WHERE t1.type = 'PO Box' AND t1.county = 'San Juan Municipio'", "gold": "SELECT zip_code FROM zip_code WHERE type = 'PO Box' AND county = 'San Juan Municipio' AND state = 'Puerto Rico'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1435, @@ -15790,10 +20095,13 @@ "question": "List the names of closed event as \"game\" that was closed from 3/15/2019 to 3/20/2020", "evidence": "name of events refers event_name; game event that was closed refers to type = 'Game' where status = 'Closed'; event_date BETWEEN '2019-03-15' and '2020-03-20'; ", "difficulty": "moderate", - "pred": "SELECT event_name FROM event WHERE type = 'Game' AND status = 'Closed' AND event_date BETWEEN '2019-03-15' AND '2020-02-20'", + "pred": "SELECT event_name FROM event WHERE status = 'Closed' AND event_date BETWEEN '2019-03-15' AND '2020-03-20'", "gold": "SELECT DISTINCT event_name FROM event WHERE type = 'Game' AND DATE(SUBSTRING(event_date, 1, 10)) BETWEEN '2019-03-15' AND '2020-03-20' AND status = 'Closed'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1436, @@ -15801,10 +20109,13 @@ "question": "Please provide links to events for members who have paid more than 50 dollar", "evidence": "have paid more than 50 dollar refers to cost > 50", "difficulty": "simple", - "pred": "SELECT t2.event_id FROM member AS t1 INNER JOIN event AS t2 ON t1.member_id = t2.\"member\" WHERE t1.\"cost\" > 50", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN attendance AS t2 ON t1.event_id = t2.event_id WHERE t2.cost > 50", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1437, @@ -15812,10 +20123,13 @@ "question": "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", "evidence": "approved from 1/10/2019 to 11/19/2019 refers to approved = 'true' and expense_date BETWEEN '2019-01-10' and '2019-11-19'", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.member_id, t2.\"link_to_event\" FROM event AS t1 INNER JOIN member AS t2 ON t1.zip_code = t2._zip WHERE t1.\"approved\" = 'true' AND t1\"date BETWEEN '2019-01-10' AND '2018-11-19'", + "pred": "SELECT t1.first_name, t1.last_name, t2.event_name FROM person AS t1 INNER JOIN attendance AS t2 ON t1.member_id = t2.member_id INNER JOIN event AS t3 ON t2.event_id = t3.event_id WHERE t3.cancelled = 'true' AND t3.expation_date BETWEEN '2019-01-10' AND '2019-11-19'", "gold": "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(SUBSTRING(t1.expense_date, 1, 10)) BETWEEN '2019-01-10' AND '2019-11-19' AND t1.approved = 'true'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.3333333333333333, + "table_recall": 0.3333333333333333, + "table_f1": 0.3333333333333333 }, { "idx": 1438, @@ -15823,10 +20137,13 @@ "question": "Please indicate the college of the person whose first name is Katy with the link to the major \"rec1N0upiVLy5esTO\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT college FROM major WHERE first_name = 'Katy' AND link_to_major = 'rec1N0upiVLy5esTO'", + "pred": "SELECT college FROM major WHERE first_name = 'Katy' AND link_to_member ='rec1N0upiVLy5esTO'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1439, @@ -15837,7 +20154,10 @@ "pred": "SELECT phone FROM member WHERE major_name = 'Business' AND college = 'College of Agriculture and Applied Sciences'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1440, @@ -15845,10 +20165,13 @@ "question": "List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019", "evidence": "expense_date BETWEEN '2019-09-10' and '2019-11-19'; cost > 20", "difficulty": "moderate", - "pred": "SELECT email FROM expense WHERE cost > 20 AND expense_date BETWEEN '2019-09-10' AND '2018-11-19'", + "pred": "SELECT t1.email FROM employee AS t1 INNER JOIN expense AS t2 ON t1.employee_id = t2.employee_id WHERE t2.cost > 20 AND t2. expense_date BETWEEN '2019-09-10' AND '2019-11-19'", "gold": "SELECT DISTINCT t1.email FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.link_to_member WHERE DATE(SUBSTRING(t2.expense_date, 1, 10)) BETWEEN '2019-09-10' AND '2019-11-19' AND t2.cost > 20", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1441, @@ -15856,10 +20179,13 @@ "question": "How many members have education major in the College of Education & Human Services", "evidence": "'education' is the major name; 'Member' is a position of club;", "difficulty": "moderate", - "pred": "SELECT COUNT(*) FROM member WHERE major_name = 'education' AND position = 'Member'", + "pred": "SELECT COUNT(*) FROM member AS t1 INNER JOIN major AS t2 ON t1.major_id = t2.major_id WHERE t2.college = 'Education & Human Services' AND t1.title = 'Member'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1442, @@ -15867,10 +20193,13 @@ "question": "What is the percentage of the events that went over budget", "evidence": "went over budget refers to remaining < 0; percentage = DIVIDE(SUM(remaining < 0), COUNT(event_id)) * 100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(event_id) FROM budget", + "pred": "SELECT CAST(SUM(CASE WHEN t2.remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.event_id) FROM budget AS t1 INNER JOIN event AS t2 ON t1.budget_id = t2.budget_id", "gold": "SELECT CAST(SUM(CASE WHEN remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(budget_id) FROM budget", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1443, @@ -15881,7 +20210,10 @@ "pred": "SELECT event_id, location, status FROM event WHERE event_date BETWEEN '2019-11-01' AND '2020-03-31'", "gold": "SELECT event_id, location, status FROM event WHERE DATE(SUBSTRING(event_date, 1, 10)) BETWEEN '2019-11-01' AND '2020-03-31'", "em_norm": 0, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1444, @@ -15889,10 +20221,13 @@ "question": "List the expenses that spend more than fifty dollars on average", "evidence": "expense refers to expense_description; spend more than fifty dollars on average refers to DIVIDE( SUM(cost), COUNT(expense_id) ) > 50", "difficulty": "simple", - "pred": "SELECT t2.cost FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.\"budget\" GROUP BY t1.\"cost\" ORDER BY COUNT(t1.cost) DESC LIMIT 1", + "pred": "SELECT t1.cost FROM expense AS t1 INNER JOIN organization AS t2 ON t1.expense_id = t2.expense_id GROUP BY t1.cost HAVING COUNT(t1.cost) > 50", "gold": "SELECT expense_description FROM expense GROUP BY expense_description HAVING AVG(cost) > 50", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1445, @@ -15903,7 +20238,10 @@ "pred": "SELECT first_name, last_name FROM member WHERE t_shirt_size = 'X-Large'", "gold": "SELECT first_name, last_name FROM member WHERE t_shirt_size = 'X-Large'", "em_norm": 1, - "ex": 1 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1446, @@ -15911,10 +20249,13 @@ "question": "Calculate the percentage of zip codes that are PO boxes", "evidence": "DIVIDE(SUM(type = 'PO Box'), COUNT(zip_code)) * 100", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN type = 'PO Box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code", + "pred": "SELECT CAST(SUM(IIF(type = 'PO Box', 1, 0)) AS REAL) * 100 / COUNT(zip_code) FROM zip_code", "gold": "SELECT CAST(SUM(CASE WHEN type = 'PO Box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code", - "em_norm": 1, - "ex": 1 + "em_norm": 0, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1447, @@ -15922,10 +20263,13 @@ "question": "List the name and location of events that underspend its budget", "evidence": "name of event refers to event_name; underspend its budget refers to remaining > 0", "difficulty": "simple", - "pred": "SELECT event_name, location FROM budget WHERE remaining > 0", + "pred": "SELECT event_name, location FROM event WHERE remaining > 0", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1448, @@ -15933,10 +20277,13 @@ "question": "Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars", "evidence": "name of event refers to event_name; date of event refers to event_date; expenses for pizza refers to expense_description = 'Pizza' where cost > 50 and cost < 100", "difficulty": "challenging", - "pred": "SELECT event_name, event_date FROM expense WHERE cost > 50 AND cost < 100", + "pred": "SELECT t2.event_name, t2.event_date FROM expense AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t1.cost > 50 AND t1.cost < 100 AND t1.expense_description = 'Pizza'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1449, @@ -15944,10 +20291,13 @@ "question": "What is the name and major of members who had to spend more than a hundred dollars on an expense", "evidence": "full name refers to first_name, last_name; major of members refers to major_name; spend more than a hundred dollars on an expense refers to cost > 100", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM expense WHERE cost > 100", + "pred": "SELECT t1.first_name, t1.last_name, t3.major_name FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id INNER JOIN major AS t3 ON t2.major_id = t3.major_id WHERE t2.cost > 100", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1450, @@ -15955,10 +20305,13 @@ "question": "In the events with more than forty incomes, list the city and country in which the event is happening", "evidence": "more than fifty incomes refers to income > 40", "difficulty": "simple", - "pred": "SELECT city, country FROM income WHERE income > 40", + "pred": "SELECT t2.city, t2.country FROM income AS t1 INNER JOIN event AS t2 ON t1.income_id = t2.income_id WHERE t1.income > 40", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1451, @@ -15966,10 +20319,13 @@ "question": "Among the members who incurred expenses in more than one event, who paid the most amount", "evidence": "paid the most amount refers to for expense incurred in more than one event refers to MAX(cost where COUNT(event_id) > 1)", "difficulty": "challenging", - "pred": "SELECT t2.cost FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.\"budget\" GROUP BY t1.\"cost\" ORDER BY COUNT(t1.cost) DESC LIMIT 1", + "pred": "SELECT t1.first_name, t1.last_name FROM person AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id GROUP BY t1.first_name, t1.last_name ORDER BY SUM(t2.cost) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.25, + "table_f1": 0.3333333333333333 }, { "idx": 1452, @@ -15977,10 +20333,13 @@ "question": "What is the average amount paid by students in a position other than a member", "evidence": "position other than a member refers to position ! = 'Member'; average amount paid = DIVIDE( SUM(cost), COUNT(event_id))", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN position = 'Member' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM member", + "pred": "SELECT AVG(t2.cost) FROM member AS t1 INNER JOIN income AS t2 ON t1.member_id = t2.member_id WHERE t1.position <> 'Member'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1453, @@ -15988,10 +20347,13 @@ "question": "List the name of events with less than average parking cost", "evidence": "name of events refers to event_name; less than average parking cost refers to cost < DIVIDE(SUM(cost), COUNT(event_id)) where category = 'Parking'", "difficulty": "moderate", - "pred": "SELECT t2.event_name FROM event AS t1 INNER JOIN expense AS t2 ON t1.zip_code = t2.\"zip\" WHERE t1.\"cost\" < (SELECT MAX(cost) FROM expense)", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t2.category = 'Parking'", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1454, @@ -15999,10 +20361,13 @@ "question": "What is the percentage of the cost for the meeting events", "evidence": "meeting events refers to type = 'Meeting'; percentage = DIVIDE( SUM(cost), COUNT(event_id)) * 100", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN type = 'Meeting' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.event_id) FROM event AS t1 INNER JOIN zip_code AS t2 ON t1.zip_code = t2.zip", + "pred": "SELECT CAST(SUM(CASE WHEN type = 'Meeting' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(event_id) FROM event", "gold": "SELECT SUM(CASE WHEN t1.type = 'Meeting' 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.3333333333333333, + "table_f1": 0.5 }, { "idx": 1455, @@ -16010,10 +20375,13 @@ "question": "Which budget allowed the most money for water, chips, and cookies", "evidence": "budget allowed refers to expense_description; expense_description = 'Water, chips, cookies'; most money refers to MAX(cost)", "difficulty": "moderate", - "pred": "SELECT t2.cost FROM expense AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.\"budget\" ORDER BY t1.\"cost\" DESC LIMIT 1", + "pred": "SELECT t1.category FROM budget AS t1 INNER JOIN expense AS t2 ON t1.budget_id = t2.budget_id WHERE t2.cost = (SELECT MAX(cost) FROM expense)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1456, @@ -16021,10 +20389,13 @@ "question": "List the full name of the top five members who spend the most money in the descending order of spending", "evidence": "full name refers to first_name, last_name; spend the most money refers to MAX(expense.cost)", "difficulty": "moderate", - "pred": "SELECT first_name, last_name FROM expense ORDER BY cost DESC LIMIT 5", + "pred": "SELECT t1.first_name, t1.last_name FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id ORDER BY t2.cost DESC LIMIT 5", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1457, @@ -16032,10 +20403,13 @@ "question": "Give the full name and contact number of members who had to spend more than average on each expense", "evidence": "full name refers to first_name, last_name; contact number refers to phone; had spent more than average on each expense refers to cost > AVG(cost)", "difficulty": "challenging", - "pred": "SELECT first_name, last_name FROM expense WHERE cost > AVG(cost) ORDER BY cost DESC LIMIT 1", + "pred": "SELECT first_name, last_name, phone FROM member WHERE cost > (SELECT AVG(cost) FROM expense)", "gold": "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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1458, @@ -16043,10 +20417,13 @@ "question": "Calculate the difference in the percentage of members in New Jersey and Vermont", "evidence": "SUBTRACT( DIVIDE( SUM(state = 'New Jersey'), COUNT(position = 'Member')), DIVIDE( SUM(state = 'Vermont'), COUNT(position = 'Member')) )", "difficulty": "moderate", - "pred": "SELECT CAST(SUM(CASE WHEN state = 'New Jersey' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM member", + "pred": "SELECT SUM(CASE WHEN state = 'New Jersey' THEN 1 ELSE 0 END) - SUM(CASE WHEN state = 'Vermont' THEN 1 ELSE 0 END) FROM member", "gold": "SELECT CAST((SUM(CASE WHEN t2.state = 'New Jersey' 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1459, @@ -16054,10 +20431,13 @@ "question": "What is the major of Garrett Gerke and which department does it belong to", "evidence": "major refers to major name;", "difficulty": "simple", - "pred": "SELECT major_name, department FROM major WHERE department = 'Garrett Gerke'", + "pred": "SELECT major_name, department FROM major WHERE first_name = 'Garrett' AND last_name = 'Gerke'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1460, @@ -16065,10 +20445,13 @@ "question": "Write the full name of the member who spent money for water, veggie tray and supplies and include the cost of it", "evidence": "full name refers to first_name, last name; spent money for refers expense description; expense_description = 'Water, Veggie tray, supplies'", "difficulty": "challenging", - "pred": "SELECT t1.first_name, t2.last_name FROM expense AS t1 INNER JOIN member AS t2 ON t1.\"member_id\" = t2.\"member\" WHERE t1\"income_description\" = 'Water, Veggie tray, supplies'", + "pred": "SELECT t1.first_name, t1.last_name, t1.cost FROM member AS t1 INNER JOIN expense AS t2 ON t1.member_id = t2.member_id WHERE t2.expense_description = 'Water, Veggie tray, supplies'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1461, @@ -16079,7 +20462,10 @@ "pred": "SELECT last_name, phone FROM major WHERE major_name = 'Elementary Education'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1462, @@ -16087,10 +20473,13 @@ "question": "What category was budgeted for the 'January Speaker' event and how much was the amount budgeted for that category", "evidence": "amount budgeted refers to amount, 'January Speaker' is the event name;", "difficulty": "simple", - "pred": "SELECT t2.category FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.\"budget\" WHERE t1.\"name\" = 'January Speaker'", + "pred": "SELECT t1.category, t1.amount FROM budget AS t1 INNER JOIN event AS t2 ON t1.event_id = t2.event_id WHERE t2.event_name = 'January Speaker'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1463, @@ -16098,10 +20487,13 @@ "question": "List the event names which were budgeted for the food", "evidence": "budgeted for food refers to category = 'Food'", "difficulty": "simple", - "pred": "SELECT event_name FROM budget WHERE category = 'Food'", + "pred": "SELECT t1.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.budget_id WHERE t2.category = 'Food'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1464, @@ -16109,10 +20501,13 @@ "question": "Write the full names of students who received funds on the date of 9/9/2019 and include the amount received", "evidence": "full name refers to first_name, last_name, amount of funds received refers to amount, received funds on date refers to date_received", "difficulty": "challenging", - "pred": "SELECT first_name, last_name FROM income WHERE date_received = '9/9/2019' AND amount = 'amount'", + "pred": "SELECT first_name, last_name, amount FROM income WHERE date_received = '2019-09-09'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.25, + "table_f1": 0.4 }, { "idx": 1465, @@ -16120,10 +20515,13 @@ "question": "Which budget category does the expense 'Posters' fall to", "evidence": "'Posters' refers to expense description", "difficulty": "simple", - "pred": "SELECT category FROM budget WHERE expense_description = 'Posters'", + "pred": "SELECT t1.category FROM budget AS t1 INNER JOIN expense AS t2 ON t1.budget_id = t2.budget_id WHERE t2.name = 'Posters'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1466, @@ -16131,10 +20529,13 @@ "question": "Write the full name of the club member with the position of 'Secretary' and list which college the club member belongs to", "evidence": "full name refers to first_name, last name", "difficulty": "simple", - "pred": "SELECT first_name, last_name FROM member WHERE position = 'Secretary'", + "pred": "SELECT first_name, last_name, college FROM member WHERE position = 'Secretary'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1467, @@ -16142,10 +20543,13 @@ "question": "Calculate the total amount spent on speaker gifts and list the name of the event they were spent on", "evidence": "total amount spent = SUM(spent) where category = 'Speaker Gifts'", "difficulty": "simple", - "pred": "SELECT SUM(t2.spent) FROM event AS t1 INNER JOIN budget AS t2 ON t1.budget_id = t2.zip_code WHERE t1.\"category\" = 'Speaker Gifts'", + "pred": "SELECT SUM(t1.spent), t1.event_name FROM event AS t1 INNER JOIN budget AS t2 ON t1.event_id = t2.event_id WHERE t2.category = 'Speaker Gifts'", "gold": "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' GROUP BY t2.event_name", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1468, @@ -16153,10 +20557,13 @@ "question": "Where is the hometown of Garrett Gerke", "evidence": "hometown refers to city", "difficulty": "simple", - "pred": "SELECT t2.city FROM event AS t1 INNER JOIN zip_code AS t2 ON t1.zip_code = t2.\"zip_codes\" WHERE t1.\"first_name\" = 'Garrett' AND t1.'last_name = 'Gerke'", + "pred": "SELECT city FROM zip_code WHERE first_name = 'Garrett' AND last_name = 'Gerke'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1469, @@ -16164,10 +20571,13 @@ "question": "Which student has the hometown of Lincolnton, North Carolina with the zip code of 28092? List their full name and position", "evidence": "full name refers to first_name, last_name, hometown of Lincolnton, North Carolina refers to city = 'Lincolnton' AND state = 'North Carolina'", "difficulty": "moderate", - "pred": "SELECT t1.first_name, t2.last_name FROM zip_code AS t1 INNER JOIN member AS t2 ON t1.\"zip_code\" = t2.\"zip-code\" WHERE t3.zip = 28092", + "pred": "SELECT first_name, last_name, position FROM member WHERE zip_code = 28092 AND state = 'North Carolina'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1470, @@ -16175,10 +20585,13 @@ "question": "How many gas stations in CZE has Premium gas", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(customerid) FROM gasstations WHERE price = 'Premium gas'", + "pred": "SELECT COUNT(*) FROM customers AS t1 INNER JOIN gasstations AS t2 ON t1.customerid = t2.customerid WHERE t2.region = 'CZE' AND t2.price = (SELECT Premium gas FROM customers)", "gold": "SELECT COUNT(gasstationid) FROM gasstations WHERE country = 'CZE' AND segment = 'Premium'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1471, @@ -16186,10 +20599,13 @@ "question": "What is the ratio of customers who pay in EUR against customers who pay in CZK", "evidence": "ratio of customers who pay in EUR against customers who pay in CZK = count(Currency = 'EUR') / count(Currency = 'CZK').", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN currency = 'EUR' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customerid) FROM customers", + "pred": "SELECT CAST(SUM(IIF(currency = 'EUR', 1, 0)) AS REAL) / SUM(IIF(currency = 'CZK', 1, 0)) FROM customers", "gold": "SELECT CAST(SUM(IIF(currency = 'EUR', 1, 0)) AS REAL) / SUM(IIF(currency = 'CZK', 1, 0)) AS ratio FROM customers", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1472, @@ -16197,10 +20613,13 @@ "question": "In 2012, who had the least consumption in LAM", "evidence": "Year 2012 can be presented as Between 201201 And 201212; The first 4 strings of the Date values in the yearmonth table can represent year.", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.date FROM yearmonth AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.\"customer id\" WHERE t1.\"date\" = '2012' AND t1.'s consumption BETWEEN 201201 AND 201212", + "pred": "SELECT t1.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE STRFTIME('%Y', t2.date) = '2012' AND t2. consumption = (SELECT MAX( consumption) FROM yearmonth)", "gold": "SELECT t1.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.segment = 'LAM' AND SUBSTRING(t2.date, 1, 4) = '2012' GROUP BY t1.customerid ORDER BY SUM(t2.consumption) ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1473, @@ -16208,10 +20627,13 @@ "question": "What was the average monthly consumption of customers in SME for the year 2013", "evidence": "Average Monthly consumption = AVG(Consumption) / 12; Year 2013 can be presented as Between 201301 And 201312; The first 4 strings of the Date values in the yearmonth table can represent year.", "difficulty": "moderate", - "pred": "SELECT AVG(t2.consumption) / 12 FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.yearmonth WHERE STRFTIME('%Y', t1.\"date\") = '2013' AND t1 \"date\" = '2014'", + "pred": "SELECT AVG(t2.Consumption) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.date BETWEEN '201301' AND '201312'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1474, @@ -16219,10 +20641,13 @@ "question": "Which customers, paying in CZK, consumed the most gas in 2011", "evidence": "Year 2011 can be presented as Between 201101 And 201112, which means between January and December in 2011", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.customerid FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.\"customer\"id = t2.\"Customerid\" WHERE STRFTIME('%Y', t1.date) BETWEEN 201101 AND 201112", + "pred": "SELECT t1.customerid FROM customers AS t1 INNER JOIN \"yearmonth\" AS t2 ON t1.customerid = t2.customerid WHERE t2.price = (SELECT CZK FROM customers WHERE consumption = (SELECT MAX(price) FROM customers) AND STRFTIME('%Y', date) = '2011')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1475, @@ -16230,10 +20655,13 @@ "question": "How many customers in KAM had a consumption of less than 30,000 for the year 2012", "evidence": "Year 2012 can be presented as Between 201201 And 201212, which means between January and December in 2012", "difficulty": "moderate", - "pred": "SELECT COUNT(customerid) FROM customers WHERE STRFTIME('%Y', consumption) >= 30 AND 201212", + "pred": "SELECT COUNT(customerid) FROM customers WHERE consumption < 300000 AND yearmonth = '2012-01-01'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1476, @@ -16241,10 +20669,13 @@ "question": "What was the difference in gas consumption between CZK-paying customers and EUR-paying customers in 2012", "evidence": "Year 2012 can be presented as Between 201201 And 201212; The first 4 strings of the Date values in the yearmonth table can represent year; Difference in Consumption = CZK customers consumption in 2012 - EUR customers consumption in 2012", "difficulty": "challenging", - "pred": "SELECT SUM(t2.date) FROM customers AS t1 INNER JOIN \"yearmonth\" AS t2 ON t1.customerid = t2.yearmonth WHERE STRFTIME('%Y', t2.\"date\") = '2012' AND t1.\"date\" = '2013' AND STRFTIM('%J', t1\".date) = '2014'", + "pred": "SELECT SUM(IIF(STRFTIME('%Y', date) = '2012', consumption, 0)) - SUM(IIF(STRFTIME('%Y', date) = '2012', consumption, 0)) FROM yearmonth", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1477, @@ -16252,10 +20683,13 @@ "question": "Which year recorded the most gas use paid in EUR", "evidence": "", "difficulty": "simple", - "pred": "SELECT year FROM customers WHERE currency = 'EUR'", + "pred": "SELECT STRFTIME('%Y', consumption) FROM customers WHERE currency = 'UR' GROUP BY STRFTIME('%Y', consumption) ORDER BY COUNT(customerid) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1478, @@ -16263,10 +20697,13 @@ "question": "Which segment had the least consumption", "evidence": "", "difficulty": "simple", - "pred": "SELECT segment FROM customers WHERE consumption = (SELECT MAX(t2.price) FROM customers)", + "pred": "SELECT segment FROM customers WHERE consumption = (SELECT MAX( consumption) FROM customers)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1479, @@ -16274,10 +20711,13 @@ "question": "Which year recorded the most consumption of gas paid in CZK", "evidence": "The first 4 strings of the Date values in the yearmonth table can represent year.", "difficulty": "moderate", - "pred": "SELECT t2.date FROM transactions_1k AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE t1.\"date\" = 'CZK'", + "pred": "SELECT STRFTIME('%Y', date) FROM \"transaction_1k\" WHERE consumption = (SELECT MAX( consumption) FROM \"transaction_1k\")", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1480, @@ -16285,10 +20725,13 @@ "question": "What was the gas consumption peak month for SME customers in 2013", "evidence": "Year 2013 can be presented as Between 201301 And 201312; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.", "difficulty": "moderate", - "pred": "SELECT t2.date FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.\"customer\" WHERE STRFTIME('%Y', t1.\"date\") = '2013'", + "pred": "SELECT MAX(t2. consumption) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.year = 201301 AND t1.date < 201312", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1481, @@ -16296,10 +20739,13 @@ "question": "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", "evidence": "annual average consumption of customer with the lowest consumption in each segment = total consumption per year / the number of customer with lowest consumption in each segment; Difference in annual average = SME's annual average - LAM's annual average; Difference in annual average = LAM's annual average - KAM's annual average; Year 2013 can be presented as Between 201301 And 201312; The first 4 strings of the Date values in the yearmonth table can represent year.", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t1.amount = (SELECT COUNT(t2.customerid) FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.\"customer\"id = t2.\"Customerid\" AND t2.date = '201301-201312'", + "pred": "SELECT AVG(t1.total consumption) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE STRFTIME('%Y', t2.date) = '2013' AND STRFTIME('%Y', t2.date) = '2013' AND STRFTIME('%Y', t2.city) = 'KAM'", "gold": "SELECT CAST(SUM(IIF(t1.segment = 'SME', t2.consumption, 0)) AS REAL) / COUNT(t1.customerid) - CAST(SUM(IIF(t1.segment = 'LAM', t2.consumption, 0)) AS REAL) / COUNT(t1.customerid), CAST(SUM(IIF(t1.segment = 'LAM', t2.consumption, 0)) AS REAL) / COUNT(t1.customerid) - CAST(SUM(IIF(t1.segment = 'KAM', t2.consumption, 0)) AS REAL) / COUNT(t1.customerid), CAST(SUM(IIF(t1.segment = 'KAM', t2.consumption, 0)) AS REAL) / COUNT(t1.customerid) - CAST(SUM(IIF(t1.segment = 'SME', t2.consumption, 0)) AS REAL) / 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1482, @@ -16307,10 +20753,13 @@ "question": "Which of the three segments—SME, LAM and KAM—has the biggest and lowest percentage increases in consumption paid in EUR between 2012 and 2013", "evidence": "Increase or Decrease = consumption for 2013 - consumption for 2012; Percentage of Increase = (Increase or Decrease / consumption for 2013) * 100%; The first 4 strings of the Date values in the yearmonth table can represent year", "difficulty": "challenging", - "pred": "SELECT DISTINCT t2.name FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.\"customer\" WHERE t1.\"name\" = 'SME' AND t3.region = 'KAM' AND STRFTIME('%Y', t2.'date) = '2013' AND CAST(SUM(t2.rate) AS REAL) * 100 / COUNT(t1.transactionid) FROM yearmonth", + "pred": "SELECT segment FROM customers WHERE consumption BETWEEN (SELECT MAX(IIF( consumption) - MIN(IIF( consumption) >= (SELECT MAX(IIF( consumption) >= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption) <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption <= (IIF( consumption", "gold": "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 REAL) * 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 REAL) * 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 REAL) * 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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1483, @@ -16318,10 +20767,13 @@ "question": "How much did customer 6 consume in total between August and November 2013", "evidence": "Between August And November 2013 refers to Between 201308 And 201311; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.", "difficulty": "simple", - "pred": "SELECT COUNT(t2.customerid) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.date WHERE STRFTIME('%Y', t2.\"date\") = '2013' AND t1.\"date\" = '2014'", + "pred": "SELECT SUM(t2.price) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.customerid = 6 AND t2.date BETWEEN '201308 AND '201311'", "gold": "SELECT SUM(consumption) FROM yearmonth WHERE customerid = 6 AND date BETWEEN '201308' AND '201311'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1484, @@ -16329,10 +20781,13 @@ "question": "How many more \"discount\" gas stations does the Czech Republic have compared to Slovakia", "evidence": "Czech Republic can be represented as the Country value in gasstations table is 'CZE'; Slovakia can be represented as the Country value in the gasstations table is 'SVK'; Computation of more \"discount\" gas stations= Total no. of discount gas stations in Czech Republic - Total no. of discount gas stations in Slovakia", "difficulty": "simple", - "pred": "SELECT COUNT(*) FROM gasstations WHERE country = 'CZE' AND price = 'SVK'", + "pred": "SELECT COUNT(DISTINCT t1.serviceid) FROM customers AS t1 INNER JOIN gasstations AS t2 ON t1.customerid = t2.customerid WHERE t2.country = 'CZE' - t2.country = 'SVK'", "gold": "SELECT SUM(IIF(country = 'CZE', 1, 0)) - SUM(IIF(country = 'SVK', 1, 0)) FROM gasstations WHERE segment = 'Discount'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1485, @@ -16340,10 +20795,13 @@ "question": "How much more was customer 7 consuming in April 2013 than customer 5", "evidence": "April 2013 refers to 201304 in the yearmonth.date", "difficulty": "simple", - "pred": "SELECT COUNT(customerid) FROM customers WHERE date = '2013' AND consumption = 201304", + "pred": "SELECT SUM(t2. consumption) - SUM(t2. consumption) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.customerid = 7 AND t2.date = '2013-04-31'", "gold": "SELECT SUM(IIF(customerid = 7, consumption, 0)) - SUM(IIF(customerid = 5, consumption, 0)) FROM yearmonth WHERE date = '201304'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1486, @@ -16351,10 +20809,13 @@ "question": "Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more", "evidence": "Amount of more SMEs = Total of SMEs pay using Currency CZK - Total of SMEs pay using Currency EUR", "difficulty": "simple", - "pred": "SELECT COUNT(t1.customerid) FROM customers AS t1 INNER JOIN currency AS t2 ON t1.currencyid = t2.coinid ORDER BY t2.\"currency\" DESC LIMIT 1", + "pred": "SELECT (SELECT currency FROM customers WHERE currency = 'czech koruna') - (SELECT currency FROM customers WHERE currency = 'euro') AS calu", "gold": "SELECT SUM(currency = 'CZK') - SUM(currency = 'EUR') FROM customers WHERE segment = 'SME'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1487, @@ -16362,10 +20823,13 @@ "question": "Which LAM customer used the Euro as their currency and had the highest consumption in October 2013", "evidence": "October 2013 refers to 201310 in the yearmonth.date", "difficulty": "moderate", - "pred": "SELECT t2.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE t1.\"currency\" = 'Euro' AND t3.date = '201310'", + "pred": "SELECT t1.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.currency = 'Euro' AND t2.date = '201310' ORDER BY t2. consumption DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1488, @@ -16373,10 +20837,13 @@ "question": "Who among KAM's customers consumed the most? How much did it consume", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(customerid) FROM customers WHERE customerid = (SELECT customerid FROM customers ORDER BY consumption DESC LIMIT 1)", + "pred": "SELECT t1.customerid, t2. consumption FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.customerid = (SELECT customerid FROM customers WHERE name = 'KAM')", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1489, @@ -16384,10 +20851,13 @@ "question": "How much did the KAM customers consume in total in May 2013", "evidence": "May 2013 refers to yearmonth.date = 201305", "difficulty": "simple", - "pred": "SELECT SUM(t2.price) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.yearmonth WHERE STRFTIME('%Y', t1.\"date\") = 201305", + "pred": "SELECT SUM(t2.price) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t2.date = '201305'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1490, @@ -16395,10 +20865,13 @@ "question": "How many percent of LAM customer consumed more than 46.73", "evidence": "Percentage of LAM customer consumed more than 46.73 = (Total no. of LAM customers who consumed more than 46.73 / Total no. of LAM customers) * 100.", "difficulty": "moderate", - "pred": "SELECT COUNT(customerid) FROM customers WHERE consumption > 46.73", + "pred": "SELECT CAST(SUM(IIF(t1. consumption > 46.73, 1, 0)) AS REAL) * 100 / COUNT(t1.customerid) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid", "gold": "SELECT CAST(SUM(IIF(t2.consumption > 46.73, 1, 0)) AS REAL) * 100 / COUNT(t1.customerid) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.segment = 'LAM'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1491, @@ -16406,10 +20879,13 @@ "question": "Which country has more \"value for money\" gas stations? Please give a total number of \"value for money\" gas stations in each country", "evidence": "", "difficulty": "simple", - "pred": "SELECT COUNT(t2.country) FROM gasstations AS t1 INNER JOIN country AS t2 ON t1.countryid = t2.codeid WHERE t1.\"value for money\" = (SELECT country FROM gasstationid)", + "pred": "SELECT country FROM \"gasstations\" GROUP BY country ORDER BY COUNT(country) DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1492, @@ -16417,10 +20893,13 @@ "question": "What percentage of KAM customers pay in euros", "evidence": "Percentage of KAM uses Euro = (Total of KAM uses Euro / Total of KAM) * 100%.", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN currency = 'Euro' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customerid) FROM customers", + "pred": "SELECT CAST(SUM(IIF(currency = 'Euro', 1, 0)) AS REAL) * 100 / COUNT(customerid) FROM customers", "gold": "SELECT CAST(SUM(currency = 'EUR') AS REAL) * 100 / COUNT(customerid) FROM customers WHERE segment = 'KAM'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1493, @@ -16428,10 +20907,13 @@ "question": "In February 2012, what percentage of customers consumed more than 528.3", "evidence": "February 2012 refers to '201202' in yearmonth.date; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.", "difficulty": "simple", - "pred": "SELECT COUNT(customerid) FROM customers WHERE date = '201202' AND consumption > 528.3", + "pred": "SELECT CAST(SUM(IIF(t2.date = '201202', 1, 0)) AS REAL) * 100 / SUM(IIF(t2.date = '2012-02-03', 1, 0)) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1. consumption > 528.3", "gold": "SELECT CAST(SUM(IIF(consumption > 528.3, 1, 0)) AS REAL) * 100 / COUNT(customerid) FROM yearmonth WHERE date = '201202'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1494, @@ -16439,10 +20921,13 @@ "question": "What percentage of Slovakian gas stations are premium", "evidence": "Percentage of premium gas station = (Total of premium gas station in Slovakia / Total of gas station in Slovakia) * 100%.", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN t2.name = 'Premium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM gasstations", + "pred": "SELECT CAST(SUM(IIF(t1.region = 'Slovakian', 1, 0)) AS REAL) * 100 / COUNT(t1.region) FROM gasstations AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid", "gold": "SELECT CAST(SUM(IIF(segment = 'Premium', 1, 0)) AS REAL) * 100 / COUNT(gasstationid) FROM gasstations WHERE country = 'SVK'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 1.0, + "table_f1": 0.6666666666666666 }, { "idx": 1495, @@ -16450,10 +20935,13 @@ "question": "Which client ID consumed the most in September 2013", "evidence": "September 2013 refers to yearmonth.date = '201309'", "difficulty": "simple", - "pred": "SELECT t2.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE t1.\"date\" = '201309'", + "pred": "SELECT customerid FROM yearmonth WHERE date = '201309' GROUP BY customerid ORDER BY consumption DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1496, @@ -16461,10 +20949,13 @@ "question": "Which client segment consumed the least in September 2013", "evidence": "September 2013 refers to yearmonth.date = '201309'", "difficulty": "simple", - "pred": "SELECT segment FROM customers WHERE date = '201309' AND consumption = (SELECT MAX(date) FROM customers)", + "pred": "SELECT segment FROM customers WHERE \"date\" = '201309' GROUP BY segment ORDER BY consumption ASC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1497, @@ -16472,10 +20963,13 @@ "question": "Which SME customer consumed the least in June 2012", "evidence": "June 2012 refers to yearmonth.date = '201206'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.customerid FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth.date = '201206'", + "pred": "SELECT customerid FROM yearmonth WHERE \"date\" = '201206' AND consumption = (SELECT MAX( consumption) FROM yearmonth)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1498, @@ -16483,10 +20977,13 @@ "question": "What is the highest monthly consumption in the year 2012", "evidence": "The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.", "difficulty": "simple", - "pred": "SELECT SUM(t2.date) FROM yearmonth AS t1 INNER JOIN \"yearmonth\" AS t2 ON t1.yearmonthid = t2.customerid WHERE t1.\"date\" = '2012' AND t2.\"yearmonth\"'", + "pred": "SELECT consumption FROM yearmonth WHERE date = '2012' ORDER BY consumption DESC LIMIT 4", "gold": "SELECT SUM(consumption) FROM yearmonth WHERE SUBSTRING(date, 1, 4) = '2012' GROUP BY SUBSTRING(date, 5, 2) ORDER BY SUM(consumption) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1499, @@ -16494,10 +20991,13 @@ "question": "What is the biggest monthly consumption of the customers who use euro as their currency", "evidence": "Monthly consumption = SUM(consumption) / 12", "difficulty": "simple", - "pred": "SELECT SUM(t2.consumption) / 12 FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.yearmonth WHERE t1.\"currency\" = 'euro'", + "pred": "SELECT SUM(t1.consumption) / 12 FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.currency = 'Euro'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1500, @@ -16505,10 +21005,13 @@ "question": "Please list the product description of the products consumed in September, 2013", "evidence": "September 2013 refers to 201309; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.description FROM products AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE t1.\"date\" = '2013-09-01'", + "pred": "SELECT t1.description FROM products AS t1 INNER JOIN yearmonth AS t2 ON t1.productid = t2.productid WHERE t2.date = '2013-09-31'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1501, @@ -16516,10 +21019,13 @@ "question": "Please list the countries of the gas stations with transactions taken place in June, 2013", "evidence": "June 2013 refers to '201306'; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.country FROM transactions_1k AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE STRFTIME('%Y', t1.\"date\") = '201306'", + "pred": "SELECT DISTINCT t2.country FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gasstationid WHERE t1.date = '2018-06-31'", "gold": "SELECT DISTINCT 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1502, @@ -16527,10 +21033,13 @@ "question": "Please list the chains of the gas stations with transactions in euro", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.chainid FROM gasstations AS t1 INNER JOIN transactions_1k AS t2 ON t1.transactionid = t2.\"transaction id\" WHERE t1.\"currency\" = 'euro'", + "pred": "SELECT DISTINCT t1.Chainid FROM gasstations AS t1 INNER JOIN transactions_1k AS t2 ON t1.streetstationid = t2.streetstationid WHERE t2.currency = 'Euro'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1503, @@ -16538,10 +21047,13 @@ "question": "Please list the product description of the products bought in transactions in euro", "evidence": "", "difficulty": "simple", - "pred": "SELECT description FROM products WHERE currency = 'euro'", + "pred": "SELECT t1.description FROM products AS t1 INNER JOIN transactions_1k AS t2 ON t1.productid = t2.productid WHERE t2.currency = 'Euro'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1504, @@ -16549,10 +21061,13 @@ "question": "What is the average total price of the transactions taken place in January, 2012", "evidence": "In January, 2012 means Date contains '2012-01'", "difficulty": "simple", - "pred": "SELECT SUM(t2.price) FROM transactions_1k AS t1 INNER JOIN transactions AS t2 ON t1. transactionid = t2.transactionid WHERE STRFTIME('%Y', t1.\"date\") = '2012-01'", + "pred": "SELECT AVG(price) FROM transactions_1k WHERE \"date\" LIKE '2012-01%'", "gold": "SELECT AVG(amount) FROM transactions_1k WHERE date LIKE '2012-01%'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1505, @@ -16560,10 +21075,13 @@ "question": "Among the customers who paid in euro, how many of them have a monthly consumption of over 1000", "evidence": "Pays in euro = Currency = 'EUR'.", "difficulty": "simple", - "pred": "SELECT COUNT(customerid) FROM customers WHERE currency = 'EUR' AND consumption > 1000", + "pred": "SELECT COUNT(t1.customerid) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t1.currency = 'EUR' AND t2. consumption > 1000", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1506, @@ -16571,10 +21089,13 @@ "question": "Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic", "evidence": "Czech Republic can be represented as the Country value in the gasstations table is 'CZE'; ", "difficulty": "moderate", - "pred": "SELECT t2.description FROM products AS t1 INNER JOIN transactions_1k AS t2 ON t1.productid = t2._productid WHERE t1.\"country\" = 'CZE' AND t2.\"country value\" = 0", + "pred": "SELECT t1.description FROM products AS t1 INNER JOIN \"transaction\" AS t2 ON t1.productid = t2.productid INNER JOIN gasstations AS t3 ON t2.gasstationid = t3.gasstationid WHERE t3.country = 'CZE'", "gold": "SELECT DISTINCT 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 0.6666666666666666, + "table_f1": 0.6666666666666666 }, { "idx": 1507, @@ -16582,10 +21103,13 @@ "question": "Please list the disparate time of the transactions taken place in the gas stations from chain no. 11", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.date FROM transactions_1k AS t1 INNER JOIN gasstation AS t2 ON t1.gasstationid = t2.\"storeid\" WHERE t1.\"chainid\" = 11", + "pred": "SELECT DISTINCT t2.time FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid WHERE t1.chainid = 11", "gold": "SELECT DISTINCT t1.time FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gasstationid WHERE t2.chainid = 11", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1508, @@ -16593,10 +21117,13 @@ "question": "How many transactions taken place in the gas station in the Czech Republic are with a price of over 1000", "evidence": "Gas station in the Czech Republic implies that Country = 'CZE'", "difficulty": "simple", - "pred": "SELECT COUNT(t2.transactionid) FROM transactions_1k AS t1 INNER JOIN gasstation AS t2 ON t1.gasstationid = t2. gasstationid WHERE t1.\"country\" = 'CZE' AND t2.\"price\" = 1000", + "pred": "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", "gold": "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", - "em_norm": 0, - "ex": 0 + "em_norm": 1, + "ex": 1, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1509, @@ -16604,10 +21131,13 @@ "question": "Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1", "evidence": "Czech Republic can be represented as the Country value in the gasstations table is 'CZE'", "difficulty": "moderate", - "pred": "SELECT COUNT(t1.transactionid) FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gestationid WHERE t2.\"country\" = 'CZE' AND t1.\"date\" = 2012/1/1", + "pred": "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.date < '2012-01-01'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1510, @@ -16615,10 +21145,13 @@ "question": "What is the average total price of the transactions taken place in gas stations in the Czech Republic", "evidence": "Gas station in the Czech Republic implies that Country = 'CZE'", "difficulty": "simple", - "pred": "SELECT SUM(t2.price) FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gestationid WHERE t1.\"country\" = 'CZE'", + "pred": "SELECT AVG(t2.price) FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid INNER JOIN gasstations AS t3 ON t2.gasstationid = t3.gasstationid WHERE t3.country = 'CZE'", "gold": "SELECT AVG(t1.price) FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gasstationid WHERE t2.country = 'CZE'", "em_norm": 0, - "ex": 0 + "ex": 1, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1511, @@ -16626,10 +21159,13 @@ "question": "For the customers who paid in the euro, what is their average total price of the transactions", "evidence": "", "difficulty": "simple", - "pred": "SELECT AVG(price) FROM customers WHERE currency = 'euro'", + "pred": "SELECT AVG(t1.price) FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid WHERE t1.currency = 'Euro'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1512, @@ -16637,10 +21173,13 @@ "question": "Which customer paid the most in 2012/8/25", "evidence": "'2012/8/25' can be represented by '2012-08-25'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.customerid FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON STRFTIME('%Y', t1.date) = '2012-08-25'", + "pred": "SELECT customerid FROM customers WHERE transactiondate = '2012-08-25' GROUP BY customerid ORDER BY COUNT(customerid) DESC LIMIT 1", "gold": "SELECT customerid FROM transactions_1k WHERE date = '2012-08-25' GROUP BY customerid ORDER BY SUM(price) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1513, @@ -16648,10 +21187,13 @@ "question": "Which country's gas station had the first paid cusomer in 2012/8/25", "evidence": "'2012/8/25' can be represented by '2012-08-25'", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.country FROM gasstations AS t1 INNER JOIN transactions_1k AS t2 ON t1.gasstationid = STRFTIME('%Y', t2.\"date\") WHERE t1.\"date\" = '2012-08-25'", + "pred": "SELECT t2.country FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gasstationid WHERE t1.rate = (SELECT MAX(rate) FROM transactions_1k) AND t1.date = '2012-08-25'", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1514, @@ -16659,10 +21201,13 @@ "question": "What kind of currency did the customer paid at 16:25:00 in 2012/8/24", "evidence": "'2012/8/24' can be represented by '2012-08-24'; ", "difficulty": "simple", - "pred": "SELECT t2.currency FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.\"customer\" WHERE t1.\"date\" = '2012-08-24'", + "pred": "SELECT currency FROM customers WHERE transactiondate = '2012-08-24' AND transactionid = 16:25:00", "gold": "SELECT DISTINCT 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1515, @@ -16670,10 +21215,13 @@ "question": "What segment did the customer have at 2012/8/23 21:20:00", "evidence": "'2012/8/23' can be represented by '2012-08-23'", "difficulty": "simple", - "pred": "SELECT segment FROM customers WHERE STRFTIME('%Y', segment) = '2012-08-23'", + "pred": "SELECT segment FROM customers WHERE \"date\" = '2012-08-23 21:20:00'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1516, @@ -16681,10 +21229,13 @@ "question": "How many transactions were paid in CZK in the morning of 2012/8/26", "evidence": "'2012/8/26' can be represented by '2012-08-26'; The morning refers to the time before '13:00:00'", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.transactionid) FROM transactions_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customernumberid WHERE t1.\"date\" = '2012-08-26' AND t2.\"date\"' = '13:00:00'", + "pred": "SELECT COUNT(t1.transactionid) FROM transactions_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid WHERE t1.time < '13:00:00'", "gold": "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 = 'CZK'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1517, @@ -16692,10 +21243,13 @@ "question": "For the earliest customer, what segment did he/she have", "evidence": "", "difficulty": "simple", - "pred": "SELECT segment FROM customers WHERE segment = 'Customer'", + "pred": "SELECT segment FROM customers WHERE customerid IN (SELECT customerid FROM customers ORDER BY date ASC LIMIT 1)", "gold": "SELECT t2.segment FROM transactions_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid ORDER BY date ASC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1518, @@ -16703,10 +21257,13 @@ "question": "For the deal happened at 2012/8/24 12:42:00, which country was it", "evidence": "'2012/8/24 12:42:00' can refer to date = '2012-08-24' AND T1.time = '12:42:00' in the database", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.country FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationsid = t2.\"gasstationid\" WHERE STRFTIME('%Y', t1.\"date\") = '2012-08-24' AND '12:42:00'", + "pred": "SELECT t2.country FROM transactions_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid WHERE t1.date = '2012-08-24' AND t1.time = '12:42:00'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1519, @@ -16714,10 +21271,13 @@ "question": "What was the product id of the transaction happened at 2012/8/23 21:20:00", "evidence": "'2012/8/23 21:20:00' can refer to date = '2012-08-23' AND T1.time = '21:20:00' in the database", "difficulty": "simple", - "pred": "SELECT productid FROM transactions_1k WHERE date = '2012-08-23' AND time = '21:20:00'", + "pred": "SELECT t1.productid FROM products AS t1 INNER JOIN transactions_1k AS t2 ON t1.productid = t2.productid WHERE t2.date = '2012-08-23' AND t1.time = '21:20:00'", "gold": "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'", "em_norm": 0, - "ex": 1 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1520, @@ -16725,10 +21285,13 @@ "question": "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", "evidence": "'2012/8/24' can be represented by '2012-08-24'; expense and the consumption has the similar meaning.", "difficulty": "moderate", - "pred": "SELECT t2.date, t1.expense FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.\"customerid\" = t2.\"Customerid\" WHERE STRFTIME('%Y', t2.'date\") = '2012-08-24'", + "pred": "SELECT t1.rate, t1. consumption FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t2.rate = 124.05 AND t2.date = '2012-08-24'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1521, @@ -16736,10 +21299,13 @@ "question": "For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE", "evidence": "Czech Republic can be represented as the Country value in the gasstations table is 'CZE'; '2012/8/26' can be represented by '2012-08-26'; during 8:00-9:00 can be represented as Time BETWEEN '08:00:00' AND '09:00:00'", "difficulty": "moderate", - "pred": "SELECT COUNT(t2.customerid) FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.storeid WHERE t1.\"date\" BETWEEN '08:00:00' AND '09:01:00\" AND t2.\"country\" = 'CZE'", + "pred": "SELECT COUNT(t1.transactionid) 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 t3.country = 'CZE' AND t1.time BETWEEN '08:00:00' AND '09:00:00'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.6666666666666666, + "table_recall": 1.0, + "table_f1": 0.8 }, { "idx": 1522, @@ -16747,10 +21313,13 @@ "question": "There's one customer spent 214582.17 in the June of 2013, which currency did he/she use", "evidence": "June of 2013 means Date contains '201306' in the yearmonth.date of the database", "difficulty": "simple", - "pred": "SELECT t2.currency FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE t1.\"date\" = '201306'", + "pred": "SELECT t1.currency FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.customerid = t2.customerid WHERE t2.date LIKE '2013-06%' AND t2.amount = 214582.17", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 1.0, + "table_f1": 1.0 }, { "idx": 1523, @@ -16758,10 +21327,13 @@ "question": "Which country was the card owner of No.667467 in", "evidence": "", "difficulty": "simple", - "pred": "SELECT country FROM customers WHERE cardid = 667467", + "pred": "SELECT t2.country FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid WHERE t1.cardid = 667467", "gold": "SELECT t2.country FROM transactions_1k AS t1 INNER JOIN gasstations AS t2 ON t1.gasstationid = t2.gasstationid WHERE t1.cardid = '667467'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1524, @@ -16769,10 +21341,13 @@ "question": "What's the nationality of the customer who spent 548.4 in 2012/8/24", "evidence": "'2012/8/24' can be represented by '2012-08-24'", "difficulty": "simple", - "pred": "SELECT t2.country FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.\"customer id\" WHERE t1.\"date\" = '2012-08-24'", + "pred": "SELECT DISTINCT t1.country FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid WHERE t2.date = '2012-08-24' AND t2.amount = 548.4", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1525, @@ -16780,10 +21355,13 @@ "question": "What is the percentage of the customers who used EUR in 2012/8/25", "evidence": "'2012/8/25' can be represented by '2012-08-25'", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN currency = 'EUR' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customerid) FROM customers", + "pred": "SELECT CAST(SUM(CASE WHEN currency = 'UR' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customerid) FROM customers WHERE transactiondate = '2012-08-25'", "gold": "SELECT CAST(SUM(IIF(t2.currency = 'EUR', 1, 0)) AS REAL) * 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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1526, @@ -16791,10 +21369,13 @@ "question": "For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013", "evidence": "'2012/8/24' can be represented by '2012-08-24'; Consumption decrease rate = (consumption_2012 - consumption_2013) / consumption_2012", "difficulty": "challenging", - "pred": "SELECT CAST(SUM(CASE WHEN t2.price = 634.8 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.customerid) FROM customers AS t1 INNER JOIN yearmonth AS t2 ON t1.yearmonth = t2.\"yearmonth\" WHERE STRFTIME('%Y', t1.\"date\") = '2012-08-24'", + "pred": "SELECT consumption_2012 - consumption_2012 FROM yearmonth WHERE customerid = 634.8 AND transactionid = (SELECT transactionid FROM customers WHERE purchaseid = 634.8)", "gold": "SELECT CAST(SUM(IIF(SUBSTRING(date, 1, 4) = '2012', consumption, 0)) - SUM(IIF(SUBSTRING(date, 1, 4) = '2013', consumption, 0)) AS REAL) / 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)", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1527, @@ -16802,10 +21383,13 @@ "question": "Which gas station has the highest amount of revenue", "evidence": "", "difficulty": "simple", - "pred": "SELECT DISTINCT t2.name FROM customers AS t1 INNER JOIN gasstation AS t2 ON t1.customerid = t2.\"customer id\" WHERE t1.\"amount\" = (SELECT COUNT(t2.productid) FROM customers)", + "pred": "SELECT t2.gasstationid FROM revenue_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid WHERE t1.amount = (SELECT MAX(amount) FROM revenue)", "gold": "SELECT gasstationid FROM transactions_1k GROUP BY gasstationid ORDER BY SUM(price) DESC LIMIT 1", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1528, @@ -16813,10 +21397,13 @@ "question": "What is the percentage of \"premium\" against the overall segment in Country = \"SVK\"", "evidence": "", "difficulty": "simple", - "pred": "SELECT CAST(SUM(CASE WHEN segment = 'premium' THEN segment ELSE NULL END) AS REAL) * 100 / COUNT(customerid) FROM customers WHERE country = 'SVK'", + "pred": "SELECT CAST(SUM(IIF( segment = 'premium', 1, 0)) AS REAL) * 100 / SUM(IIF( segment = 'premium', 1, 0)) FROM customers", "gold": "SELECT CAST(SUM(IIF(country = 'SVK' AND segment = 'Premium', 1, 0)) AS REAL) * 100 / SUM(IIF(country = 'SVK', 1, 0)) FROM gasstations", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.0, + "table_recall": 0.0, + "table_f1": 0.0 }, { "idx": 1529, @@ -16824,10 +21411,13 @@ "question": "What is the amount spent by customer \"38508\" at the gas stations? How much had the customer spent in January 2012", "evidence": "January 2012 refers to the Date value = '201201'", "difficulty": "moderate", - "pred": "SELECT SUM(t2.price) FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customeeterritoriesid WHERE STRFTIME('%Y', t1.\"date\") = '201201'", + "pred": "SELECT t1.amount, t2.price FROM transactions_1k AS t1 INNER JOIN customers AS t2 ON t1.customerid = t2.customerid WHERE t2.customerid = 38508 AND t1.\"date\" = '201201'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.3333333333333333, + "table_f1": 0.4 }, { "idx": 1530, @@ -16835,10 +21425,13 @@ "question": "Which are the top five best selling products? Please state the full name of them", "evidence": "Description of products contains full name", "difficulty": "simple", - "pred": "SELECT name FROM products WHERE description = 'Top 5%'", + "pred": "SELECT description FROM products WHERE productid IN (SELECT productid FROM products ORDER BY price DESC LIMIT 5)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.5, + "table_f1": 0.6666666666666666 }, { "idx": 1531, @@ -16846,10 +21439,13 @@ "question": "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", "evidence": "average price per single item = Total(price) / Total(amount)", "difficulty": "moderate", - "pred": "SELECT t2.currency FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.\"customer\" ORDER BY t1.\"price\" DESC LIMIT 1", + "pred": "SELECT t1.customerid, AVG(t1.price), t1.currency FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.customerid = t2.customerid ORDER BY t2.price DESC LIMIT 1", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 1.0, + "table_recall": 0.6666666666666666, + "table_f1": 0.8 }, { "idx": 1532, @@ -16857,10 +21453,13 @@ "question": "Which country had the gas station that sold the most expensive product id No.2 for one unit", "evidence": "", "difficulty": "simple", - "pred": "SELECT t2.country FROM products AS t1 INNER JOIN gasstations AS t2 ON t1.productid = t2._productid WHERE t1.\"productid\" = 2", + "pred": "SELECT t2.country FROM products AS t1 INNER JOIN \"gasstations\" AS t2 ON t1.gasstationid = t2.gasstationid WHERE t1.productid = 2 AND t1.price = (SELECT MAX(price) FROM products)", "gold": "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", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 }, { "idx": 1533, @@ -16868,9 +21467,12 @@ "question": "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", "evidence": "August of 2012 refers to the Date value = '201208' ; Price per unit of product = Price / Amount;", "difficulty": "moderate", - "pred": "SELECT DISTINCT t2.price / t1.amount FROM customers AS t1 INNER JOIN transactions_1k AS t2 ON t1.\"customerid\" = t2.\"customersid\" WHERE t.date = '201208' AND t.price = 29.00", + "pred": "SELECT t1.price / t1.amount FROM products AS t1 INNER JOIN yearmonth AS t2 ON t1.productid = t2.productid WHERE t2.price = 29.00 AND t2.date = '201208'", "gold": "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'", "em_norm": 0, - "ex": 0 + "ex": 0, + "table_precision": 0.5, + "table_recall": 0.5, + "table_f1": 0.5 } ] \ No newline at end of file