[ { "id": 0, "question": "What is the highest eligible free rate for K-12 students in the schools in Alameda County?", "db_id": "california_schools", "sql": "SELECT MAX(CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)`) FROM frpm WHERE `County Name` = 'Alameda'", "label": true, "error_types": [] }, { "id": 1, "question": "What is the highest eligible free rate for K-12 students in the schools in Alameda County?", "db_id": "california_schools", "sql": "SELECT max(`free meal count (k-12)`) / max(`enrollment (k-12)`) FROM frpm WHERE `county name` = 'Alameda'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 2, "question": "Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.", "db_id": "california_schools", "sql": "SELECT min(`free meal count (ages 5-17)`) FROM frpm WHERE `educational option type` = 'Continuation School'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 3, "question": "Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.", "db_id": "california_schools", "sql": "SELECT T2.`Free Meal Count (Ages 5-17)` / T2.`Enrollment (Ages 5-17)` AS EligibleFreeRate FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.EdOpsName = 'Continuation School' AND T2.`Enrollment (Ages 5-17)` > 0 AND T2.`Free Meal Count (Ages 5-17)` IS NOT NULL AND T2.`Enrollment (Ages 5-17)` IS NOT NULL ORDER BY EligibleFreeRate ASC LIMIT 3", "label": true, "error_types": [] }, { "id": 4, "question": "Please list the zip code of all the charter schools in Fresno County Office of Education.", "db_id": "california_schools", "sql": "SELECT schools.zip FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE frpm.`charter school (y/n)` = 1 AND schools.county = 'Fresno'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 5, "question": "Please list the zip code of all the charter schools in Fresno County Office of Education.", "db_id": "california_schools", "sql": "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", "label": true, "error_types": [] }, { "id": 6, "question": "What is the unabbreviated mailing street address of the school with the highest FRPM count for K-12 students?", "db_id": "california_schools", "sql": "SELECT schools.streetabr FROM frpm INNER JOIN schools ON frpm.cdscode = schools.cdscode ORDER BY frpm.`frpm count (k-12)` DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 7, "question": "What is the unabbreviated mailing street address of the school with the highest FRPM count for K-12 students?", "db_id": "california_schools", "sql": "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", "label": true, "error_types": [] }, { "id": 8, "question": "Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.", "db_id": "california_schools", "sql": "SELECT phone FROM schools WHERE charter = 1 AND opendate > '2000-01-01'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 9, "question": "Please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1.", "db_id": "california_schools", "sql": "SELECT T1.Phone FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.OpenDate > '2000-01-01' AND T1.FundingType = 'Directly funded' AND T1.Charter = 1 AND T2.`Charter School (Y/N)` = 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 10, "question": "How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual?", "db_id": "california_schools", "sql": "select count(satscores.cds) from satscores inner join schools on satscores.cds = schools.cdscode where schools.virtual = 'F' and satscores.avgscrmath < 400", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 11, "question": "How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual?", "db_id": "california_schools", "sql": "SELECT count(schools.school) FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE schools.virtual = 'P' AND satscores.avgscrmath < 400", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 12, "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.", "db_id": "california_schools", "sql": "SELECT schools.school FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE satscores.numge1500 > 500 AND schools.magnet = 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 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.", "db_id": "california_schools", "sql": "SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr > 500 AND T2.Magnet = 1", "label": true, "error_types": [] }, { "id": 14, "question": "What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?", "db_id": "california_schools", "sql": "select schools.phone from schools inner join satscores on schools.cdscode = satscores.cds where satscores.numge1500 group by schools.phone order by count(satscores.numge1500) desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 15, "question": "What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?", "db_id": "california_schools", "sql": "SELECT T2.Phone FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumGE1500 IS NOT NULL ORDER BY T1.NumGE1500 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 16, "question": "What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?", "db_id": "california_schools", "sql": "SELECT satscores.numtsttakr FROM frpm INNER JOIN satscores ON frpm.`school code` = satscores.sname ORDER BY frpm.`frpm count (k-12)` DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 17, "question": "What is the number of SAT test takers of the schools with the highest FRPM count for K-12 students?", "db_id": "california_schools", "sql": "SELECT T2.NumTstTakr FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`FRPM Count (K-12)` = (SELECT MAX(`FRPM Count (K-12)`) FROM frpm)", "label": true, "error_types": [] }, { "id": 18, "question": "Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded?", "db_id": "california_schools", "sql": "SELECT count(schools.cdscode) FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE schools.charter = 1 AND satscores.avgscrmath > 560", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 19, "question": "Among the schools with the average score in Math over 560 in the SAT test, how many schools are directly charter-funded?", "db_id": "california_schools", "sql": "SELECT COUNT(T1.cds) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath > 560 AND T2.FundingType = 'Charter'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 20, "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?", "db_id": "california_schools", "sql": "SELECT frpm.`frpm count (ages 5-17)` FROM frpm INNER JOIN satscores ON frpm.cdscode = satscores.cds ORDER BY satscores.avgscrread DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 21, "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?", "db_id": "california_schools", "sql": "SELECT T2.`FRPM Count (Ages 5-17)` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrRead = (SELECT MAX(AvgScrRead) FROM satscores WHERE AvgScrRead IS NOT NULL)", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 22, "question": "Please list the codes of the schools with a total enrollment of over 500.", "db_id": "california_schools", "sql": "SELECT cdscode FROM frpm WHERE `enrollment (k-12)` + `enrollment (ages 5-17)` > 500", "label": true, "error_types": [] }, { "id": 23, "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?", "db_id": "california_schools", "sql": "SELECT max(`free meal count (ages 5-17)`) FROM frpm WHERE `percent (%) eligible free (ages 5-17)` = ( SELECT max(`percent (%) eligible free (ages 5-17)`) FROM frpm )", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 24, "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?", "db_id": "california_schools", "sql": "SELECT MAX(CAST(T2.`Free Meal Count (Ages 5-17)` AS REAL) / T2.`Enrollment (Ages 5-17)`) AS HighestEligibleFreeRate FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumGE1500 * 100 / T1.NumTstTakr > 30 AND T2.`Enrollment (Ages 5-17)` IS NOT NULL AND T2.`Free Meal Count (Ages 5-17)` IS NOT NULL", "label": true, "error_types": [] }, { "id": 25, "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.", "db_id": "california_schools", "sql": "SELECT schools.ncesschool FROM frpm INNER JOIN schools ON frpm.cdscode = schools.cdscode ORDER BY frpm.`enrollment (ages 5-17)` DESC LIMIT 5", "label": true, "error_types": [] }, { "id": 26, "question": "Which active district has the highest average score in Reading?", "db_id": "california_schools", "sql": "select schools.district from schools inner join satscores on schools.cdscode = satscores.cds where schools.statustype = 'Active' and schools.admlname1 = 'Reading' order by satscores.avgscrread desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 27, "question": "Which active district has the highest average score in Reading?", "db_id": "california_schools", "sql": "SELECT schools.district FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE schools.virtual = 'N' GROUP BY schools.district ORDER BY avg(satscores.avgscrread) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 28, "question": "Which active district has the highest average score in Reading?", "db_id": "california_schools", "sql": "SELECT T2.District FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.StatusType = 'Active' ORDER BY T1.AvgScrRead DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 29, "question": "Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers.", "db_id": "california_schools", "sql": "select schools.charter from schools inner join satscores on schools.cdscode = satscores.cds where satscores.avgscrwrite = 499", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Window Functions" } ] }, { "id": 30, "question": "Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers.", "db_id": "california_schools", "sql": "SELECT T2.CharterNum FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrWrite = 499", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Window Functions" } ] }, { "id": 31, "question": "How many schools in Fresno (directly funded) have number of test takers not more than 250?", "db_id": "california_schools", "sql": "select count(schools.school) from schools inner join satscores on schools.cdscode = satscores.cds where schools.county = 'Contra Costa' and satscores.numtsttakr <= 250 and schools.fundingtype = 'Directly funded'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 32, "question": "What is the phone number of the school that has the highest average score in Math?", "db_id": "california_schools", "sql": "select schools.phone from schools inner join satscores on schools.cdscode = satscores.cds where satscores.avgscrmath = ( select max(avgscrmath) from satscores )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 33, "question": "What is the phone number of the school that has the highest average score in Math?", "db_id": "california_schools", "sql": "SELECT schools.phone FROM satscores INNER JOIN schools ON satscores.cds = schools.cdscode ORDER BY satscores.avgscrmath DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 34, "question": "How many schools in Amador which the Low Grade is 9 and the High Grade is 12?", "db_id": "california_schools", "sql": "SELECT count(*) FROM frpm WHERE `low grade` = 9 AND `high grade` = 12 AND `county name` = 'Amador'", "label": true, "error_types": [] }, { "id": 35, "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?", "db_id": "california_schools", "sql": "SELECT count(schools.school) FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.city = 'Los Angeles' AND frpm.`free meal count (k-12)` BETWEEN 500 AND 700", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 36, "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?", "db_id": "california_schools", "sql": "SELECT COUNT(CDSCode) FROM frpm WHERE `Free Meal Count (K-12)` > 500 AND `FRPM Count (K-12)` < 700 AND `County Name` = 'Los Angeles'", "label": true, "error_types": [] }, { "id": 37, "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?", "db_id": "california_schools", "sql": "select schools.school , schools.fundingtype from schools inner join frpm on schools.cdscode = frpm.cdscode inner join satscores on satscores.cds = frpm.cdscode where satscores.cname = 'Riverside' and satscores.avgscrmath > 400 group by schools.school having avg(satscores.avgscrmath) > 400", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 38, "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?", "db_id": "california_schools", "sql": "SELECT DISTINCT schools.school, schools.fundingtype FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE schools.city = 'Riverside' AND satscores.avgscrmath > 400", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 39, "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?", "db_id": "california_schools", "sql": "SELECT DISTINCT T1.CDSCode, T1.FundingType FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.County = 'Riverside' AND T2.AvgScrMath > 400", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 40, "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?", "db_id": "california_schools", "sql": "SELECT T2.`School Name`, T1.Street, T1.City, T1.Zip, T1.State FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`FRPM Count (Ages 5-17)` > 800 AND T1.County = 'Monterey' AND T2.`School Type` = 'High School'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 41, "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.", "db_id": "california_schools", "sql": "select schools.school , avg(satscores.avgscrwrite) , schools.phone from schools inner join satscores on schools.cdscode = satscores.cds where schools.opendate >= '1991' and schools.closeddate < '2000' group by schools.school , satscores.avgscrwrite", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Type Mismatch" } ] }, { "id": 42, "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.", "db_id": "california_schools", "sql": "SELECT avg(satscores.avgscrwrite), satscores.sname, schools.phone FROM satscores INNER JOIN schools ON satscores.cds = schools.cdscode WHERE schools.opendate > '1991-01-01' AND schools.closeddate < '2000-12-31'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Type Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 43, "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.", "db_id": "california_schools", "sql": "SELECT T1.School, T2.AvgScrWrite, T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE STRFTIME('%Y', T1.OpenDate) > '1991' OR STRFTIME('%Y', T1.ClosedDate) < '2000'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Type Mismatch" } ] }, { "id": 44, "question": "When did the first-through-twelfth-grade school with the largest enrollment open?", "db_id": "california_schools", "sql": "SELECT T1.OpenDate FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.GSserved = 'K-12' ORDER BY T2.`Enrollment (K-12)` DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 45, "question": "Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?", "db_id": "california_schools", "sql": "SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Enrollment (K-12)` IS NOT NULL ORDER BY T1.`Enrollment (K-12)` ASC LIMIT 5", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 46, "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?", "db_id": "california_schools", "sql": "SELECT frpm.`free meal count (k-12)` / frpm.`enrollment (k-12)` FROM frpm INNER JOIN schools ON frpm.cdscode = schools.cdscode WHERE schools.soc = 66 ORDER BY frpm.`free meal count (k-12)` DESC LIMIT 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" } ] }, { "id": 47, "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?", "db_id": "california_schools", "sql": "SELECT T2.`FRPM Count (K-12)` / T2.`Enrollment (K-12)` AS Eligible_FRPM_Rate FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.SOC = 66 AND T2.`Enrollment (K-12)` IS NOT NULL ORDER BY T2.`FRPM Count (K-12)` DESC LIMIT 5", "label": true, "error_types": [] }, { "id": 48, "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.", "db_id": "california_schools", "sql": "SELECT T1.Website, T1.School FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 49, "question": "What is the free rate for students between the ages of 5 and 17 at the school run by Kacey Gibson?", "db_id": "california_schools", "sql": "SELECT cast(frpm.`free meal count (ages 5-17)` AS REAL) / frpm.`enrollment (ages 5-17)` FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.admfname1 = 'Kacey' AND schools.admlname1 = 'Gibson'", "label": true, "error_types": [] }, { "id": 50, "question": "What is the administrator's email address of the chartered school with the fewest students enrolled in grades 1 through 12?", "db_id": "california_schools", "sql": "SELECT schools.admemail1 FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE frpm.`charter school (y/n)` = 1 ORDER BY frpm.`enrollment (k-12)` ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 51, "question": "Under whose administration is the school with the highest number of students scoring 1500 or more on the SAT? Indicate their full names.", "db_id": "california_schools", "sql": "SELECT schools.admfname1, schools.admfname2, schools.admfname3, schools.admlname1, schools.admlname2, schools.admlname3 FROM satscores INNER JOIN schools ON satscores.cds = schools.cdscode WHERE satscores.numge1500 = ( SELECT max(numge1500) FROM satscores )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 52, "question": "Under whose administration is the school with the highest number of students scoring 1500 or more on the SAT? Indicate their full names.", "db_id": "california_schools", "sql": "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 WHERE T1.NumGE1500 IS NOT NULL ORDER BY T1.NumGE1500 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 53, "question": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?", "db_id": "california_schools", "sql": "select distinct schools.website from satscores inner join schools on satscores.cds = schools.cdscode inner join frpm on schools.cdscode = frpm.cdscode where satscores.cname = 'Los Angeles' and satscores.numtsttakr between 2000 and 3000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 54, "question": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?", "db_id": "california_schools", "sql": "SELECT schools.website FROM satscores INNER JOIN schools ON satscores.cds = schools.cdscode WHERE satscores.numtsttakr BETWEEN 2000 AND 3000", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 55, "question": "What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?", "db_id": "california_schools", "sql": "SELECT T1.Website FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.NumTstTakr BETWEEN 2000 AND 3000 AND T1.County = 'Los Angeles'", "label": true, "error_types": [] }, { "id": 56, "question": "What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980?", "db_id": "california_schools", "sql": "select avg(satscores.numtsttakr) from schools inner join satscores on schools.cdscode = satscores.cds where schools.opendate between '1980-01-01' and '1980-12-31'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 57, "question": "What is the average number of test takers from Fresno schools that opened between 1/1/1980 and 12/31/1980?", "db_id": "california_schools", "sql": "SELECT AVG(T2.NumTstTakr) FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.County = 'Fresno' AND STRFTIME('%Y', T1.OpenDate) = '1980'", "label": true, "error_types": [] }, { "id": 58, "question": "What is the type of education offered in the school who scored the highest average in Math?", "db_id": "california_schools", "sql": "select schools.edopscode from schools inner join frpm on schools.cdscode = frpm.cdscode inner join satscores on schools.cdscode = satscores.cds order by satscores.avgscrmath desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 59, "question": "What is the type of education offered in the school who scored the highest average in Math?", "db_id": "california_schools", "sql": "SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 60, "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.", "db_id": "california_schools", "sql": "SELECT T2.AvgScrWrite, T1.City FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.NumGE1500 = ( SELECT MAX(NumGE1500) FROM satscores WHERE NumGE1500 IS NOT NULL )", "label": true, "error_types": [] }, { "id": 61, "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.", "db_id": "california_schools", "sql": "select schools.school , satscores.avgscrwrite from schools inner join satscores on schools.cdscode = satscores.cds where schools.admfname1 = 'Ricci' and schools.admlname1 = 'Ulrich'", "label": true, "error_types": [] }, { "id": 62, "question": "Which state special schools have the highest number of enrollees from grades 1 through 12?", "db_id": "california_schools", "sql": "SELECT schools.state FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.doc = 31 AND schools.gsserved = 'K-12' GROUP BY schools.state ORDER BY sum(frpm.`enrollment (k-12)`) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 63, "question": "Which state special schools have the highest number of enrollees from grades 1 through 12?", "db_id": "california_schools", "sql": "SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = '31' AND T1.`Enrollment (K-12)` IS NOT NULL ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 64, "question": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?", "db_id": "california_schools", "sql": "select cast(sum(case when schools.opendate = 1980 then 1 else 0 end) as real) / 12 from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.county = 'Alameda' and schools.doctype = 'Elementary School District'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 65, "question": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?", "db_id": "california_schools", "sql": "SELECT cast(sum(CASE WHEN schools.opendate LIKE '1980%' THEN 1 ELSE 0 END) AS REAL) / 12 FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.county = 'Alameda' AND schools.doc = 52", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 66, "question": "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?", "db_id": "california_schools", "sql": "SELECT CAST(COUNT(CDSCode) AS REAL) / 12 FROM schools WHERE County = 'Alameda' AND DOC = 52 AND strftime('%Y', OpenDate) = '1980'", "label": true, "error_types": [] }, { "id": 67, "question": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?", "db_id": "california_schools", "sql": "select cast(sum(case when schools.doctype = 'Unified School District' then 1 else 0 end) as real) / count(schools.school) from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.county = 'Orange'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 68, "question": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?", "db_id": "california_schools", "sql": "SELECT cast(sum(CASE WHEN schools.doc = 54 THEN 1 ELSE 0 END) AS REAL) * 100 / sum(CASE WHEN schools.doc = 52 THEN 1 ELSE 0 END) FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.county = 'Orange'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 69, "question": "What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?", "db_id": "california_schools", "sql": "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 County = 'Orange' AND StatusType = 'Merged'", "label": true, "error_types": [] }, { "id": 70, "question": "Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.", "db_id": "california_schools", "sql": "SELECT county, school, closeddate FROM schools WHERE statustype = 'Closed' GROUP BY county, school, closeddate ORDER BY count(school) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 71, "question": "Which different county has the most number of closed schools? Please provide the name of each school as well as the closure date.", "db_id": "california_schools", "sql": "SELECT T1.County, T1.School, T1.ClosedDate FROM schools T1 WHERE T1.StatusType = 'Closed' AND T1.County = (SELECT T2.County FROM schools T2 WHERE T2.StatusType = 'Closed' GROUP BY T2.County ORDER BY COUNT(*) DESC LIMIT 1)", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 72, "question": "What is the postal street address for the school with the 7th highest Math average? Indicate the school's name.", "db_id": "california_schools", "sql": "select schools.mailstreet , schools.school from schools inner join satscores on schools.cdscode = satscores.cds order by satscores.avgscrmath desc limit 5 , 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 73, "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.", "db_id": "california_schools", "sql": "select schools.mailstrabr , schools.school from satscores inner join schools on satscores.cds = schools.cdscode inner join frpm on schools.cdscode = frpm.cdscode order by satscores.avgscrread asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 74, "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.", "db_id": "california_schools", "sql": "SELECT schools.mailstreet, satscores.sname FROM satscores INNER JOIN schools ON satscores.cds = schools.cdscode ORDER BY satscores.avgscrread ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 75, "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.", "db_id": "california_schools", "sql": "SELECT T2.MailStreet, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrRead IS NOT NULL ORDER BY T1.AvgScrRead ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 76, "question": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?", "db_id": "california_schools", "sql": "select count(schools.school) from schools inner join satscores on schools.cdscode = satscores.cds where schools.mailcity = 'Lakeport' and satscores.numge1500 > satscores.avgscrread + satscores.avgscrmath + satscores.avgscrwrite", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 77, "question": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?", "db_id": "california_schools", "sql": "SELECT count(schools.school) FROM schools INNER JOIN satscores ON schools.cdscode = satscores.cds WHERE schools.mailcity = 'Lakeport' AND satscores.avgscrread + satscores.avgscrmath + satscores.avgscrwrite >= 1500", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 78, "question": "What is the total number of schools whose total SAT scores are greater or equal to 1500 whose mailing city is Lakeport?", "db_id": "california_schools", "sql": "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", "label": true, "error_types": [] }, { "id": 79, "question": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.", "db_id": "california_schools", "sql": "select mailzip from schools where admfname1 = 'Avetik' and admlname2 = 'Atoian'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 80, "question": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.", "db_id": "california_schools", "sql": "SELECT school, mailzip FROM schools WHERE admlname1 = 'Atoian' AND admfname1 = 'Avetik'", "label": true, "error_types": [] }, { "id": 81, "question": "Please specify all of the schools and their related mailing zip codes that are under Avetik Atoian's administration.", "db_id": "california_schools", "sql": "SELECT School, MailZip FROM schools WHERE AdmFName2 = 'Avetik' AND AdmLName2 = 'Atoian'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 82, "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?", "db_id": "california_schools", "sql": "select cast(sum(case when county = 'Colusa' then 1 else 0 end) as real) * 100 / sum(case when county = 'Humboldt' then 1 else 0 end) from schools", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 83, "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?", "db_id": "california_schools", "sql": "SELECT cast(sum(CASE WHEN county = 'Colusa' THEN 1 ELSE 0 END) AS REAL) * 100 / sum(CASE WHEN county = 'Humboldt' THEN 1 ELSE 0 END) FROM schools WHERE mailstate = 'CA'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 84, "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?", "db_id": "california_schools", "sql": "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'", "label": true, "error_types": [] }, { "id": 85, "question": "What is the phone number and extension number for the school that had the 333rd highest average writing score?", "db_id": "california_schools", "sql": "select schools.phone , schools.ext from schools inner join satscores on schools.cdscode = satscores.cds where satscores.avgscrwrite = ( select max(avgscrwrite) from satscores )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 86, "question": "What is the phone number and extension number for the school that had the 333rd highest average writing score?", "db_id": "california_schools", "sql": "SELECT T1.Phone, T1.Ext FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite IS NOT NULL ORDER BY T2.AvgScrWrite DESC LIMIT 332, 1", "label": true, "error_types": [] }, { "id": 87, "question": "What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name.", "db_id": "california_schools", "sql": "select phone , ext from schools where zip = '95203-3704'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 88, "question": "What is the phone number and extension number for the school with the zip code 95203-3704? Indicate the school's name.", "db_id": "california_schools", "sql": "SELECT schools.phone, schools.ext, schools.school FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.zip = '95203-3704'", "label": true, "error_types": [] }, { "id": 89, "question": "What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?", "db_id": "california_schools", "sql": "select website from schools where admfname1 = 'Mike' and admlname1 = 'Dante'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 90, "question": "What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?", "db_id": "california_schools", "sql": "SELECT Website FROM schools WHERE (AdmFName1 = 'Mike' AND AdmLName1 = 'Larson') OR (AdmFName1 = 'Dante' AND AdmLName1 = 'Alvarez')", "label": true, "error_types": [] }, { "id": 91, "question": "What are the websites for all the partially virtual chartered schools located in San Joaquin?", "db_id": "california_schools", "sql": "SELECT website FROM schools WHERE county = 'San Joaquin' AND charter = 1 AND virtual = 'P'", "label": true, "error_types": [] }, { "id": 92, "question": "How many chartered schools located in the city of Hickman are owned by the Elementary School District?", "db_id": "california_schools", "sql": "SELECT sum(CASE WHEN schools.city = 'Hickman' THEN 1 ELSE 0 END) FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.doc = 52 AND schools.charter = 1", "label": true, "error_types": [] }, { "id": 93, "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", "db_id": "california_schools", "sql": "select schools.admfname1 , schools.city from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.charternum = '00D2'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 94, "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", "db_id": "california_schools", "sql": "SELECT schools.admfname1, schools.admlname1, schools.school, schools.city FROM schools INNER JOIN frpm ON schools.cdscode = frpm.`charter school number` WHERE frpm.`charter school number` = '00D2'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 95, "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", "db_id": "california_schools", "sql": "SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE CharterNum = '00D2' AND Charter = 1", "label": true, "error_types": [] }, { "id": 96, "question": "What is the total number of schools with a mailing city in Hickman belonging to the charter number 00D4?", "db_id": "california_schools", "sql": "SELECT count(*) FROM schools WHERE mailcity = 'Hickman' AND charternum = '00D4'", "label": true, "error_types": [] }, { "id": 97, "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?", "db_id": "california_schools", "sql": "select cast(sum(case when schools.fundingtype = 'Locally funded' then 1 else 0 end) as real) * 100 / count(schools.fundingtype) from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.county = 'Santa Clara'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 98, "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?", "db_id": "california_schools", "sql": "SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(FundingType) FROM schools WHERE County = 'Santa Clara'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 99, "question": "Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?", "db_id": "california_schools", "sql": "select count(schools.school) from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.fundingtype = 'Directly funded' and schools.county = 'Stanislaus' and schools.opendate between '2000-01-01' and '2005-12-31'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 100, "question": "Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?", "db_id": "california_schools", "sql": "SELECT count(*) FROM schools WHERE fundingtype = 'Directly funded' AND county = 'Stanislaus' AND opendate BETWEEN '2000-01-01' AND '2005-12-31'", "label": true, "error_types": [] }, { "id": 101, "question": "What is the total amount of Community College District closure in 1989 in the city of San Francisco?", "db_id": "california_schools", "sql": "select count(schools.cdscode) from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.city = 'San Francisco' and strftime('%Y' , schools.closeddate) = '1989' and schools.doctype = 'Community College District'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 102, "question": "Which county reported the most number of school closure in the 1980s with school wonership code belonging to Youth Authority Facilities (CEA)?", "db_id": "california_schools", "sql": "SELECT County FROM schools WHERE SOC = 11 AND ClosedDate BETWEEN '1980-01-01' AND '1989-12-31' GROUP BY County ORDER BY COUNT(County) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 103, "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.", "db_id": "california_schools", "sql": "SELECT NCESDist FROM schools WHERE SOC = 31", "label": true, "error_types": [] }, { "id": 104, "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?", "db_id": "california_schools", "sql": "SELECT T2.`FRPM Count (Ages 5-17)` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.EdOpsName = 'Youth Authority School' AND T1.MailStrAbr = 'PO Box 1040'", "label": true, "error_types": [] }, { "id": 105, "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?", "db_id": "california_schools", "sql": "SELECT GSserved FROM schools WHERE EdOpsCode = 'SPECON' AND NCESDist = '613360'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 106, "question": "What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school.", "db_id": "california_schools", "sql": "SELECT T1.EILName, T1.School FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.`County Code` = '37' AND T2.`NSLP Provision Status` = 'Breakfast Provision 2'", "label": true, "error_types": [] }, { "id": 107, "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?", "db_id": "california_schools", "sql": "SELECT T1.City FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.County = 'Merced' AND T1.EILCode = 'HS' AND T2.`NSLP Provision Status` = 'Lunch Provision 2' AND T2.`Low Grade` = '9' AND T2.`High Grade` = '12'", "label": true, "error_types": [] }, { "id": 108, "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)?", "db_id": "california_schools", "sql": "SELECT schools.school, cast(frpm.`free meal count (ages 5-17)` AS REAL) * 100 / frpm.`enrollment (ages 5-17)` FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.county = 'Los Angeles' AND schools.gsserved = 'K-9'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 109, "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)?", "db_id": "california_schools", "sql": "SELECT T1.CDSCode, T2.`Percent (%) Eligible FRPM (Ages 5-17)` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.County = 'Los Angeles' AND T1.GSserved = 'K-09'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 110, "question": "What is the most common type of grade span served in the city of Adelanto?", "db_id": "california_schools", "sql": "select schools.gsserved from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.city = 'Adelanto' group by schools.gsserved order by count(schools.gsserved) desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 111, "question": "What is the most common type of grade span served in the city of Adelanto?", "db_id": "california_schools", "sql": "SELECT gsserved FROM schools WHERE city = 'Adelanto' GROUP BY gsserved ORDER BY count(gsserved) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 112, "question": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.", "db_id": "california_schools", "sql": "select county , sum(virtual) from schools where county in ('San Diego' , 'Santa Barbara') group by county order by count(virtual) desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 113, "question": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.", "db_id": "california_schools", "sql": "SELECT county, sum(CASE WHEN virtual = 'N' THEN 1 ELSE 0 END) AS cnt FROM schools WHERE county IN ('San Diego', 'Santa Barbara') GROUP BY county ORDER BY cnt DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 114, "question": "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.", "db_id": "california_schools", "sql": "SELECT County, COUNT(CDSCode) FROM schools WHERE Virtual = 'F' AND (County = 'San Diego' OR County = 'Santa Barbara') GROUP BY County ORDER BY COUNT(CDSCode) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 115, "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.", "db_id": "california_schools", "sql": "select school type , school name , latitude from schools where latitude = ( select max(latitude) from schools )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 116, "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.", "db_id": "california_schools", "sql": "SELECT T2.`School Type`, T1.School, T1.Latitude FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.Latitude DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 117, "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.", "db_id": "california_schools", "sql": "SELECT count(DISTINCT schools.city) FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.gsserved = 'K-8' AND schools.magnet = 1 AND frpm.`nslp provision status` = 'Multiple Provision Types'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 118, "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.", "db_id": "california_schools", "sql": "SELECT City, COUNT(School) FROM schools WHERE GSoffered = 'K-8' AND Magnet = 1 GROUP BY City", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 119, "question": "What are the two most common first names among the school administrators? Indicate the district to which they administer.", "db_id": "california_schools", "sql": "select admfname1 , district from schools group by admfname1 order by count(admfname1) desc limit 2", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 120, "question": "What are the two most common first names among the school administrators? Indicate the district to which they administer.", "db_id": "california_schools", "sql": "SELECT admfname1, district FROM schools GROUP BY admfname1, district ORDER BY count(admfname1) DESC LIMIT 2", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" } ] }, { "id": 121, "question": "What are the two most common first names among the school administrators? Indicate the district to which they administer.", "db_id": "california_schools", "sql": "SELECT AdmFName, District, COUNT(*) AS NameCount FROM (SELECT AdmFName1 AS AdmFName, District FROM schools WHERE AdmFName1 IS NOT NULL UNION ALL SELECT AdmFName2, District FROM schools WHERE AdmFName2 IS NOT NULL UNION ALL SELECT AdmFName3, District FROM schools WHERE AdmFName3 IS NOT NULL) GROUP BY AdmFName, District ORDER BY NameCount DESC LIMIT 2", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 122, "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.", "db_id": "california_schools", "sql": "SELECT frpm.`percent (%) eligible free (k-12)` FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.admfname1 = 'Alusine'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 123, "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.", "db_id": "california_schools", "sql": "SELECT T2.`Percent (%) Eligible Free (K-12)`, T1.DOC AS `District Code` FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.AdmFName1 = 'Alusine'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 124, "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.", "db_id": "california_schools", "sql": "select schools.admlname2 , schools.district , schools.county , schools.school from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.charter = 40", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 125, "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?", "db_id": "california_schools", "sql": "select schools.admemail1 from schools inner join frpm on schools.cdscode = frpm.cdscode where schools.opendate between '2009-01-01' and '2010-12-31' and schools.soctype = 'Introductory/Middle Schools (Public)' and schools.district = 'San Bernardino City Unif'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 126, "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?", "db_id": "california_schools", "sql": "SELECT schools.admemail1 FROM schools INNER JOIN frpm ON schools.cdscode = frpm.cdscode WHERE schools.county = 'San Bernardino' AND schools.district = 'San Bernardino City Unified' AND schools.opendate BETWEEN '2009-01-01' AND '2010-12-31' AND schools.soc = 62 AND schools.doc = 54", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 127, "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?", "db_id": "california_schools", "sql": "SELECT AdmEmail1 FROM schools WHERE County = 'San Bernardino' AND District = 'San Bernardino City Unified' AND OpenDate BETWEEN '2009-01-01' AND '2010-12-31' AND (SOC = 62 OR DOC = 54)", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 128, "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.", "db_id": "california_schools", "sql": "select schools.admemail1 , schools.school from schools inner join satscores on schools.cdscode = satscores.cds where satscores.numge1500 group by schools.admemail1 , schools.school order by count(satscores.numge1500) limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 129, "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.", "db_id": "california_schools", "sql": "SELECT T2.AdmEmail1, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumGE1500 IS NOT NULL ORDER BY T1.NumGE1500 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 130, "question": "The average unemployment ratio of 1995 and 1996, which one has higher percentage?", "db_id": "financial", "sql": "select a12 from district where a13 = 1996 order by a12 desc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 131, "question": "The average unemployment ratio of 1995 and 1996, which one has higher percentage?", "db_id": "financial", "sql": "SELECT AVG(A12), AVG(A13) FROM district", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 132, "question": "List out the no. of districts that have female average salary is more than 6000 but less than 10000?", "db_id": "financial", "sql": "select count(district.a11) from client inner join district on client.district_id = district.district_id where client.gender = 'F' and district.a11 > 6000 and district.a9 < 10000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 133, "question": "List out the no. of districts that have female average salary is more than 6000 but less than 10000?", "db_id": "financial", "sql": "SELECT count(*) FROM district INNER JOIN client ON district.district_id = client.district_id WHERE client.gender = 'F' AND district.a11 BETWEEN 6000 AND 10000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 134, "question": "List out the no. of districts that have female average salary is more than 6000 but less than 10000?", "db_id": "financial", "sql": "SELECT COUNT(DISTINCT T2.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A11 BETWEEN 6000 AND 10000 AND T1.gender = 'F'", "label": true, "error_types": [] }, { "id": 135, "question": "How many male customers who are living in North Bohemia have average salary greater than 8000?", "db_id": "financial", "sql": "select count(client.gender) from client inner join district on client.district_id = district.district_id where district.a3 = 'north Bohemia' and client.gender = 'M' and district.a11 > 8000", "label": true, "error_types": [] }, { "id": 136, "question": "List out the account numbers of clients who are youngest and have highest average salary?", "db_id": "financial", "sql": "select client.birth_date from client inner join disp on client.client_id = disp.client_id inner join account on disp.account_id = account.account_id inner join district on account.district_id = district.district_id order by district.a11 desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 137, "question": "List out the account numbers of clients who are youngest and have highest average salary?", "db_id": "financial", "sql": "SELECT account.account_id FROM client INNER JOIN district ON client.district_id = district.district_id INNER JOIN account ON district.district_id = account.district_id ORDER BY client.birth_date ASC, district.a11 DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 138, "question": "List out the account numbers of clients who are youngest and have highest average salary?", "db_id": "financial", "sql": "SELECT T1.account_id FROM disp AS T1 INNER JOIN client AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T1.account_id = T3.account_id INNER JOIN district AS T4 ON T3.district_id = T4.district_id ORDER BY T2.birth_date DESC, T4.A11 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 139, "question": "How many customers who choose statement of weekly issuance are Owner?", "db_id": "financial", "sql": "select count(disp.client_id) from disp inner join account on disp.account_id = account.account_id where account.frequency = 'POPLATEK TYDNE' and disp.type = 'OWNER'", "label": true, "error_types": [] }, { "id": 140, "question": "List out the id number of client who choose statement of issuance after transaction are Disponent?", "db_id": "financial", "sql": "select client.client_id from client inner join disp on client.client_id = disp.client_id inner join account on disp.account_id = account.account_id where account.frequency = 'POPLATEK PO OBRATU'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 141, "question": "List out the id number of client who choose statement of issuance after transaction are Disponent?", "db_id": "financial", "sql": "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'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 142, "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.", "db_id": "financial", "sql": "SELECT account.account_id FROM loan INNER JOIN account ON loan.account_id = account.account_id WHERE strftime('%Y', loan.date) = '1997' AND account.frequency = 'POPLATEK TYDNE' ORDER BY loan.amount ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 143, "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.", "db_id": "financial", "sql": "select account.account_id from loan inner join account on loan.account_id = account.account_id where loan.duration > 12 and account.date > 1993 order by loan.amount desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 144, "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.", "db_id": "financial", "sql": "SELECT account.account_id FROM loan INNER JOIN account ON loan.account_id = account.account_id WHERE strftime('%Y', loan.date) = '1993' AND loan.duration > 12 ORDER BY loan.amount DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 145, "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.", "db_id": "financial", "sql": "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', T1.date) = '1993' ORDER BY T2.amount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 146, "question": "Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?", "db_id": "financial", "sql": "select count(client.gender) from client inner join account on client.district_id = account.district_id inner join district on account.district_id = district.district_id where client.gender = 'F' and district.a2 = 'Slokolov' and client.birth_date between 1950 and 1950", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 147, "question": "Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?", "db_id": "financial", "sql": "SELECT count(client.district_id) FROM client INNER JOIN district ON client.district_id = district.district_id WHERE client.gender = 'F' AND client.birth_date < '1950-01-01'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 148, "question": "Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?", "db_id": "financial", "sql": "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-01-01' AND T2.A2 = 'Sokolov'", "label": true, "error_types": [] }, { "id": 149, "question": "List out the accounts who have the earliest trading date in 1995 ?", "db_id": "financial", "sql": "select account.account_id from account inner join trans on account.account_id = trans.account_id where strftime('%Y' , trans.date) = '1995' order by account.date asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 150, "question": "List out the accounts who have the earliest trading date in 1995 ?", "db_id": "financial", "sql": "SELECT account_id FROM trans WHERE date LIKE '1995%' ORDER BY date ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 151, "question": "Which client issued his/her card in 1994/3/3, give his/her client id.", "db_id": "financial", "sql": "select client.client_id from client inner join card on client.client_id = card.card_id where card.issued = '1994-03-03'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 152, "question": "Which client issued his/her card in 1994/3/3, give his/her client id.", "db_id": "financial", "sql": "SELECT T2.client_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE STRFTIME('%Y', T1.issued) = '1994' AND STRFTIME('%m', T1.issued) = '03' AND STRFTIME('%d', T1.issued) = '03'", "label": true, "error_types": [] }, { "id": 153, "question": "The transaction of 840 USD happened in 1998/10/14, when was this account opened?", "db_id": "financial", "sql": "select account.date from account inner join trans on account.account_id = trans.account_id where trans.amount = 840 and trans.date = '1998-10-14'", "label": true, "error_types": [] }, { "id": 154, "question": "The transaction of 840 USD happened in 1998/10/14, when was this account opened?", "db_id": "financial", "sql": "SELECT date FROM account WHERE account_id = 840", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 155, "question": "There was a loan approved in 1994/8/25, where was that account opened, give the district Id of the branch.", "db_id": "financial", "sql": "select district.district_id from loan inner join account on loan.account_id = account.account_id inner join district on account.district_id = district.district_id where loan.date = '1994-08-25'", "label": true, "error_types": [] }, { "id": 156, "question": "What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?", "db_id": "financial", "sql": "select trans.amount from trans inner join disp on trans.account_id = disp.account_id inner join card on disp.disp_id = card.disp_id inner join client on client.client_id = disp.client_id where client.birth_date = '1996-10-21' order by trans.amount desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 157, "question": "What is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?", "db_id": "financial", "sql": "SELECT max(trans.amount) FROM card INNER JOIN disp ON card.disp_id = disp.disp_id INNER JOIN client ON disp.client_id = client.client_id INNER JOIN account ON disp.account_id = account.account_id INNER JOIN trans ON account.account_id = trans.account_id WHERE card.issued = '1996-10-21'", "label": true, "error_types": [] }, { "id": 158, "question": "For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account?", "db_id": "financial", "sql": "SELECT trans.amount FROM client INNER JOIN disp ON client.client_id = disp.client_id INNER JOIN account ON disp.account_id = account.account_id INNER JOIN trans ON account.account_id = trans.account_id INNER JOIN loan ON account.account_id = loan.account_id ORDER BY loan.amount DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 159, "question": "For the client who applied the biggest loan, what was his/her first amount of transaction after opened the account?", "db_id": "financial", "sql": "SELECT T4.amount FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN trans AS T4 ON T1.account_id = T4.account_id WHERE T2.amount = (SELECT MAX(amount) FROM loan) ORDER BY T4.date LIMIT 1", "label": true, "error_types": [] }, { "id": 160, "question": "How many clients opened their accounts in Jesenik branch were women?", "db_id": "financial", "sql": "select count(client.gender) from client inner join account on client.district_id = account.district_id inner join district on account.district_id = district.district_id where district.a2 = 'Jesenik' and client.gender = 'F'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 161, "question": "How many clients opened their accounts in Jesenik branch were women?", "db_id": "financial", "sql": "SELECT count(client.client_id) FROM client INNER JOIN district ON client.district_id = district.district_id WHERE district.a2 = 'Jesenik' AND client.gender = 'F'", "label": true, "error_types": [] }, { "id": 162, "question": "How many clients opened their accounts in Jesenik branch were women?", "db_id": "financial", "sql": "SELECT COUNT(T1.district_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 INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T1.A2 = 'Jesenik' AND T4.gender = 'F'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 163, "question": "How many accounts were opened in Litomerice in 1996?", "db_id": "financial", "sql": "SELECT count(account.account_id) FROM district INNER JOIN account ON district.district_id = account.district_id WHERE district.a2 = 'Litomerice' AND strftime('%Y', account.`date`) = '1996'", "label": true, "error_types": [] }, { "id": 164, "question": "For the female client who was born in 1976/1/29, which district did she opened her account?", "db_id": "financial", "sql": "SELECT district.a2 FROM client INNER JOIN disp ON client.client_id = disp.client_id INNER JOIN account ON disp.account_id = account.account_id INNER JOIN district ON account.district_id = district.district_id WHERE client.gender = 'F' AND client.birth_date = '1976-01-29'", "label": true, "error_types": [] }, { "id": 165, "question": "For the client who applied 98832 USD loan in 1996/1/3, when was his/her birthday?", "db_id": "financial", "sql": "select client.birth_date from client inner join loan on client.district_id = loan.account_id where loan.amount = 98832 and loan.date = '1996-01-03'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 166, "question": "For the client who applied 98832 USD loan in 1996/1/3, when was his/her birthday?", "db_id": "financial", "sql": "SELECT T3.birth_date FROM disp AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id INNER JOIN client AS T3 ON T1.client_id = T3.client_id WHERE T2.amount = 98832 AND T2.date = '1996-01-03'", "label": true, "error_types": [] }, { "id": 167, "question": "For the first client who opened his/her account in Prague, what is his/her account ID?", "db_id": "financial", "sql": "select account.account_id from account inner join client on account.district_id = client.district_id inner join district on client.district_id = district.district_id where district.a3 = 'Prague' order by client.client_id asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 168, "question": "For the first client who opened his/her account in Prague, what is his/her account ID?", "db_id": "financial", "sql": "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", "label": true, "error_types": [] }, { "id": 169, "question": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?", "db_id": "financial", "sql": "select cast(sum(case when client.gender = 'M' then 1 else 0 end) as real) * 100 / count(client.gender) from client inner join district on client.district_id = district.district_id where district.a3 = 'south Bohemia' group by district.district_id order by count(client.gender) desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 170, "question": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?", "db_id": "financial", "sql": "SELECT cast(sum(CASE WHEN client.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / count(client.gender) FROM client INNER JOIN district ON client.district_id = district.district_id WHERE district.a3 = 'south Bohemia'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 171, "question": "For the branch which located in the south Bohemia with biggest number of inhabitants, what is the percentage of the male clients?", "db_id": "financial", "sql": "SELECT CAST(SUM(IIF(T2.gender = 'M', 1, 0)) AS REAL) * 100 / COUNT(T2.gender) AS percentage_male_clients FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'south Bohemia' GROUP BY T1.district_id ORDER BY T1.A4 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 172, "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?", "db_id": "financial", "sql": "SELECT cast((sum(CASE WHEN `date` = '1998-12-27' THEN balance ELSE 0 END) - sum(CASE WHEN `date` = '1993-03-22' THEN balance ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN `date` = '1993-03-22' THEN balance ELSE 0 END) FROM trans WHERE account_id = ( SELECT account_id FROM loan WHERE date = '1993-07-05' )", "label": true, "error_types": [] }, { "id": 173, "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?", "db_id": "financial", "sql": "SELECT ((balance_1998 - balance_1993) / balance_1993) * 100 AS increase_rate FROM (SELECT (SELECT T2.balance FROM trans AS T2 WHERE T2.account_id = T1.account_id AND T2.date = '1998-12-27' ORDER BY T2.date DESC LIMIT 1) AS balance_1998, (SELECT T2.balance FROM trans AS T2 WHERE T2.account_id = T1.account_id AND T2.date = '1993-03-22' ORDER BY T2.date DESC LIMIT 1) AS balance_1993 FROM loan AS T1 WHERE T1.date = '1993-07-05' LIMIT 1)", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 174, "question": "What is the percentage of loan amount that has been fully paid with no issue.", "db_id": "financial", "sql": "select cast(sum(case when status = 'A' then amount else 0 end) as real) * 100 / sum(amount) from loan", "label": true, "error_types": [] }, { "id": 175, "question": "What is the percentage of loan amount that has been fully paid with no issue.", "db_id": "financial", "sql": "SELECT cast(sum(CASE WHEN status = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / count(loan_id) FROM loan", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 176, "question": "For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue.", "db_id": "financial", "sql": "SELECT CAST(SUM(CASE WHEN status = 'C' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(account_id) FROM loan WHERE amount < 100000", "label": true, "error_types": [] }, { "id": 177, "question": "For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.", "db_id": "financial", "sql": "select account.account_id , district.a2 , district.a3 from district inner join account on district.district_id = account.district_id where strftime('%Y' , account.frequency) = '1993' and account.frequency = 'POPLATEK PO OBRATU'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 178, "question": "For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.", "db_id": "financial", "sql": "SELECT T1.account_id, T2.A2 AS district_name, T2.A3 AS district_region FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.date LIKE '1993%' AND T1.frequency = 'POPLATEK PO OBRATU'", "label": true, "error_types": [] }, { "id": 179, "question": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.", "db_id": "financial", "sql": "select client.client_id , account.account_id , account.frequency from district inner join account on district.district_id = account.district_id inner join client on district.district_id = client.district_id where district.a3 = 'east Bohemia' and account.date between 1995 and 2000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 180, "question": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.", "db_id": "financial", "sql": "SELECT client.client_id, account.frequency FROM client INNER JOIN district ON client.district_id = district.district_id INNER JOIN account ON district.district_id = account.district_id WHERE district.a3 = 'east Bohemia' AND strftime('%Y', account.date) BETWEEN '1995' AND '2000'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 181, "question": "From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.", "db_id": "financial", "sql": "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'", "label": true, "error_types": [] }, { "id": 182, "question": "List account ID and account opening date for accounts from 'Prachatice'.", "db_id": "financial", "sql": "select account.account_id , account.date from district inner join account on district.district_id = account.district_id where district.a2 = 'Prachatice'", "label": true, "error_types": [] }, { "id": 183, "question": "State the district and region for loan ID '4990'.", "db_id": "financial", "sql": "select district.a2 , district.a3 from loan inner join district on loan.loan_id = district.district_id where loan.loan_id = 4990", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 184, "question": "State the district and region for loan ID '4990'.", "db_id": "financial", "sql": "SELECT T3.A2, T3.A3 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.loan_id = 4990", "label": true, "error_types": [] }, { "id": 185, "question": "Provide the account ID, district and region for loan amount greater than USD300,000.", "db_id": "financial", "sql": "SELECT T1.account_id, T3.A2, T3.A3 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.amount > 300000", "label": true, "error_types": [] }, { "id": 186, "question": "Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993.", "db_id": "financial", "sql": "SELECT cast(sum(CASE WHEN district.a2 = 'Decin' THEN 1 ELSE 0 END) AS REAL) * 100 / count(account.account_id) FROM district INNER JOIN account ON district.district_id = account.district_id WHERE strftime('%Y', account.`date`) = '1993'", "label": true, "error_types": [] }, { "id": 187, "question": "Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993.", "db_id": "financial", "sql": "SELECT CAST(SUM(CASE WHEN T1.date LIKE '1993%' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Decin'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 188, "question": "List the account IDs with monthly issuance of statements.", "db_id": "financial", "sql": "SELECT account_id FROM account WHERE frequency = 'POPLATEK MESICNE'", "label": true, "error_types": [] }, { "id": 189, "question": "How many of the account holders in South Bohemia still do not own credit cards?", "db_id": "financial", "sql": "select count(client.client_id) from client inner join disp on client.client_id = disp.client_id inner join district on client.district_id = district.district_id inner join card on disp.disp_id = card.disp_id where district.a3 = 'south bohemia'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 190, "question": "How many of the account holders in South Bohemia still do not own credit cards?", "db_id": "financial", "sql": "SELECT count(client.client_id) FROM client INNER JOIN district ON client.district_id = district.district_id WHERE district.a3 = 'south Bohemia' AND client.client_id NOT IN ( SELECT client.client_id FROM client INNER JOIN disp ON client.client_id = disp.client_id INNER JOIN card ON disp.disp_id = card.disp_id INNER JOIN district ON client.district_id = district.district_id WHERE district.a3 = 'south Bohemia' )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 191, "question": "Which district has highest active loan?", "db_id": "financial", "sql": "SELECT district.a3 FROM loan INNER JOIN account ON loan.account_id = account.account_id INNER JOIN district ON account.district_id = district.district_id WHERE loan.status = 'C' GROUP BY district.a3 ORDER BY count(district.a3) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 192, "question": "Which district has highest active loan?", "db_id": "financial", "sql": "SELECT T3.A2 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 = 'C' OR T1.status = 'D' GROUP BY T3.A2 ORDER BY COUNT(T1.loan_id) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 193, "question": "What is the average loan amount by male borrowers?", "db_id": "financial", "sql": "select avg(loan.amount) from client inner join loan on client.client_id = loan.loan_id where client.gender = 'M'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 194, "question": "What is the average loan amount by male borrowers?", "db_id": "financial", "sql": "SELECT avg(loan.amount) FROM client INNER JOIN loan ON client.client_id = loan.account_id WHERE client.gender = 'M'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 195, "question": "What is the average loan amount by male borrowers?", "db_id": "financial", "sql": "SELECT AVG(T3.amount) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.gender = 'M'", "label": true, "error_types": [] }, { "id": 196, "question": "In 1996, which districts have the highest unemployment rate? List their branch location and district name.", "db_id": "financial", "sql": "select a2 from district where a13 = 1996 order by a13 desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 197, "question": "In 1996, which districts have the highest unemployment rate? List their branch location and district name.", "db_id": "financial", "sql": "SELECT district_id, a2 FROM district ORDER BY a13 DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 198, "question": "In 1996, which districts have the highest unemployment rate? List their branch location and district name.", "db_id": "financial", "sql": "SELECT A2 FROM district WHERE A13 = ( SELECT MAX(A13) FROM district )", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 199, "question": "In the branch where the largest number of crimes were committed in 1996, how many accounts were opened?", "db_id": "financial", "sql": "select count(account.account_id) from account inner join district on account.district_id = district.district_id where district.a16 group by district.district_id order by count(district.a16) desc limit 1", "label": true, "error_types": [] }, { "id": 200, "question": "After making a credit card withdrawal, how many account/s with monthly issuance has a negative balance?", "db_id": "financial", "sql": "SELECT count(account.account_id) FROM account INNER JOIN trans ON account.account_id = trans.account_id WHERE account.frequency = 'POPLATEK MESICNE' AND trans.operation = 'VYBER KARTOU' AND trans.balance < 0", "label": true, "error_types": [] }, { "id": 201, "question": "After making a credit card withdrawal, how many account/s with monthly issuance has a negative balance?", "db_id": "financial", "sql": "SELECT COUNT(DISTINCT T1.account_id) FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T2.operation = 'VYBER KARTOU' AND T1.frequency = 'POPLATEK MESICNE' AND T2.balance < 0", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 202, "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?", "db_id": "financial", "sql": "select count(loan.loan_id) from loan inner join account on loan.account_id = account.account_id where loan.amount > 250000 and account.frequency = 'POPLATEK MESICNE' and account.date between 1995 and 1997", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 203, "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?", "db_id": "financial", "sql": "SELECT COUNT(T1.loan_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T1.amount >= 250000 AND T2.frequency = 'POPLATEK MESICNE' AND T1.date BETWEEN '1995-01-01' AND '1997-12-31'", "label": true, "error_types": [] }, { "id": 204, "question": "How many accounts have running contracts in Branch location 1?", "db_id": "financial", "sql": "SELECT count(account.account_id) FROM loan INNER JOIN account ON loan.account_id = account.account_id WHERE account.district_id = 1 AND loan.status = 'C'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 205, "question": "How many accounts have running contracts in Branch location 1?", "db_id": "financial", "sql": "SELECT COUNT(T1.account_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.district_id = 1 AND T1.status IN ('C', 'D')", "label": true, "error_types": [] }, { "id": 206, "question": "In the branch where the second-highest number of crimes were committed in 1995 occurred, how many male clients are there?", "db_id": "financial", "sql": "SELECT COUNT(*) FROM client AS T2 WHERE T2.gender = 'M' AND T2.district_id = (SELECT T1.district_id FROM district AS T1 WHERE T1.A15 IS NOT NULL ORDER BY T1.A15 DESC LIMIT 1 OFFSET 1)", "label": true, "error_types": [] }, { "id": 207, "question": "How many high-level credit cards have \"OWNER\" type of disposition?", "db_id": "financial", "sql": "select count(card.card_id) from card inner join disp on card.disp_id = disp.disp_id where card.type = 'gold' and disp.type = 'DISPONENT'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 208, "question": "How many accounts are there in the district of \"Pisek\"?", "db_id": "financial", "sql": "SELECT COUNT(T2.district_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A2 = 'Pisek'", "label": true, "error_types": [] }, { "id": 209, "question": "Which districts have transactions greater than USS$10,000 in 1997?", "db_id": "financial", "sql": "select district.a2 from account inner join trans on account.account_id = trans.account_id inner join district on account.district_id = district.district_id where trans.amount > 10000 and trans.date = '1997'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 210, "question": "Which districts have transactions greater than USS$10,000 in 1997?", "db_id": "financial", "sql": "SELECT DISTINCT T3.A2 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.amount > 10000 AND strftime('%Y', T1.date) = '1997'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 211, "question": "Which accounts placed orders for household payment in Pisek?", "db_id": "financial", "sql": "SELECT T1.account_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 T3.A2 = 'Pisek' AND T1.k_symbol = 'SIPO'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 212, "question": "What are the accounts that have gold credit cards?", "db_id": "financial", "sql": "select account.account_id from account inner join disp on account.account_id = disp.account_id inner join card on disp.disp_id = card.disp_id where card.type in ('gold' , 'junior') group by account.account_id", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 213, "question": "What are the accounts that have gold credit cards?", "db_id": "financial", "sql": "SELECT T2.account_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type IN ('gold', 'junior') GROUP BY T2.account_id HAVING COUNT(DISTINCT T1.type) > 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 214, "question": "Who are the female account holders who own credit cards and also have loans?", "db_id": "financial", "sql": "SELECT client.client_id FROM client INNER JOIN disp ON client.client_id = disp.client_id INNER JOIN card ON disp.disp_id = card.disp_id INNER JOIN loan ON disp.account_id = loan.account_id WHERE client.gender = 'F'", "label": true, "error_types": [] }, { "id": 215, "question": "How many female clients' accounts are in the region of South Bohemia?", "db_id": "financial", "sql": "select count(client.client_id) from client inner join account on client.district_id = account.district_id inner join district on account.district_id = district.district_id where client.gender = 'F' and district.a3 = 'south Bohemia'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 216, "question": "How many female clients' accounts are in the region of South Bohemia?", "db_id": "financial", "sql": "SELECT COUNT(T1.client_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 district AS T4 ON T3.district_id = T4.district_id WHERE T4.A3 = 'south Bohemia' AND T1.gender = 'F'", "label": true, "error_types": [] }, { "id": 217, "question": "Please list the accounts whose district is Tabor that are eligible for loans.", "db_id": "financial", "sql": "SELECT account.account_id FROM account INNER JOIN district ON account.district_id = district.district_id WHERE district.a2 = 'Tabor' AND account.frequency = 'POPLATEK MESICNE'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 218, "question": "Please list the accounts whose district is Tabor that are eligible for loans.", "db_id": "financial", "sql": "SELECT T1.account_id 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 T2.A2 = 'Tabor' AND T3.type = 'OWNER'", "label": true, "error_types": [] }, { "id": 219, "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.", "db_id": "financial", "sql": "SELECT district.a11 FROM district INNER JOIN account ON district.district_id = account.district_id INNER JOIN disp ON account.account_id = disp.account_id WHERE disp.type = 'OWNER' AND district.a11 BETWEEN 8000 AND 9000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 220, "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.", "db_id": "financial", "sql": "SELECT T1.type, T3.A11 FROM disp 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.type != 'OWNER' AND T3.A11 BETWEEN 8000 AND 9000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 221, "question": "How many accounts in North Bohemia has made a transaction with the partner's bank being AB?", "db_id": "financial", "sql": "select count(account.account_id) from account inner join trans on account.account_id = trans.account_id inner join district on account.district_id = district.district_id where trans.bank = 'AB' and district.a3 = 'north Bohemia'", "label": true, "error_types": [] }, { "id": 222, "question": "How many accounts in North Bohemia has made a transaction with the partner's bank being AB?", "db_id": "financial", "sql": "SELECT COUNT(DISTINCT 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 T1.A3 = 'north Bohemia' AND T3.bank = 'AB'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 223, "question": "Please list the name of the districts with accounts that made withdrawal transactions.", "db_id": "financial", "sql": "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'", "label": true, "error_types": [] }, { "id": 224, "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?", "db_id": "financial", "sql": "select avg(district.a15) from account inner join district on account.district_id = district.district_id where district.a3 between 4000 and 4999 and account.date between 1997 and 2000", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 225, "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?", "db_id": "financial", "sql": "SELECT avg(district.a15) FROM district INNER JOIN account ON district.district_id = account.district_id WHERE account.date LIKE '1997%' AND district.a15 > 4000", "label": true, "error_types": [] }, { "id": 226, "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?", "db_id": "financial", "sql": "SELECT CAST(SUM(T1.A15) AS REAL) / COUNT(DISTINCT T1.district_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A15 > 4000 AND T2.date >= '1997-01-01'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 227, "question": "How many 'classic' cards are eligible for loan?", "db_id": "financial", "sql": "SELECT count(card.card_id) FROM card INNER JOIN disp ON card.disp_id = disp.disp_id WHERE disp.type = 'OWNER' AND card.type = 'classic'", "label": true, "error_types": [] }, { "id": 228, "question": "How many male clients in 'Hl.m. Praha' district?", "db_id": "financial", "sql": "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'", "label": true, "error_types": [] }, { "id": 229, "question": "How many percent of 'Gold' cards were issued prior to 1998?", "db_id": "financial", "sql": "select cast(sum(case when issued < 1998 then 1 else 0 end) as real) * 100 / count(*) from card where type = 'gold'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 230, "question": "How many percent of 'Gold' cards were issued prior to 1998?", "db_id": "financial", "sql": "SELECT cast(sum(CASE WHEN TYPE = 'gold' THEN 1 ELSE 0 END) AS REAL) * 100 / count(card_id) FROM card WHERE strftime('%Y', issued) < '1998'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 231, "question": "How many percent of 'Gold' cards were issued prior to 1998?", "db_id": "financial", "sql": "SELECT CAST(SUM(CASE WHEN issued < '1998-01-01' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(card_id) FROM card WHERE type = 'gold'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 232, "question": "What is the number of committed crimes in 1995 in the district of the account with the id 532?", "db_id": "financial", "sql": "select district.a15 from account inner join district on account.district_id = district.district_id where account.account_id = 532 and district.a15 = 1995", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 233, "question": "What is the number of committed crimes in 1995 in the district of the account with the id 532?", "db_id": "financial", "sql": "SELECT T1.A15 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T2.account_id = 532", "label": true, "error_types": [] }, { "id": 234, "question": "What is the district Id of the account that placed the order with the id 33333?", "db_id": "financial", "sql": "SELECT T2.district_id FROM \"order\" AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T1.order_id = 33333", "label": true, "error_types": [] }, { "id": 235, "question": "Among the weekly issuance accounts, how many have a loan of under 200000?", "db_id": "financial", "sql": "select count(account.account_id) from loan inner join account on loan.account_id = account.account_id where account.frequency = 'POPLATEK TYDNE' and loan.amount < 200000", "label": true, "error_types": [] }, { "id": 236, "question": "What type of credit card does the client with the id 13539 own?", "db_id": "financial", "sql": "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", "label": true, "error_types": [] }, { "id": 237, "question": "What is the region of the client with the id 3541 from?", "db_id": "financial", "sql": "select district.a3 from client inner join district on client.district_id = district.district_id where client.client_id = 3541", "label": true, "error_types": [] }, { "id": 238, "question": "Which district has the most accounts with loan contracts finished with no problems?", "db_id": "financial", "sql": "SELECT district.a2 FROM loan INNER JOIN account ON loan.account_id = account.account_id INNER JOIN district ON account.district_id = district.district_id WHERE loan.status = 'A' GROUP BY district.a2 ORDER BY count(district.a2) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 239, "question": "Who placed the order with the id 32423?", "db_id": "financial", "sql": "SELECT account_id FROM `order` WHERE order_id = 32423", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 240, "question": "Who placed the order with the id 32423?", "db_id": "financial", "sql": "SELECT T2.client_id FROM `order` AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.order_id = 32423", "label": true, "error_types": [] }, { "id": 241, "question": "Please list all the transactions made by accounts from district 5.", "db_id": "financial", "sql": "select trans.amount from trans inner join account on trans.account_id = account.account_id inner join district on account.district_id = district.district_id where district.a5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 242, "question": "Please list all the transactions made by accounts from district 5.", "db_id": "financial", "sql": "SELECT trans.trans_id FROM account INNER JOIN trans ON account.account_id = trans.account_id WHERE account.district_id = 5", "label": true, "error_types": [] }, { "id": 243, "question": "Please list all the transactions made by accounts from district 5.", "db_id": "financial", "sql": "SELECT T1.account_id, T2.trans_id, T2.date, T2.type, T2.operation, T2.k_symbol FROM account AS T1 INNER JOIN trans AS T2 ON T1.account_id = T2.account_id WHERE T1.district_id = 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 244, "question": "How many of the accounts are from Jesenik district?", "db_id": "financial", "sql": "SELECT count(account.account_id) FROM district INNER JOIN account ON district.district_id = account.district_id WHERE district.a2 = 'Jesenik'", "label": true, "error_types": [] }, { "id": 245, "question": "List all the clients' IDs whose junior credit cards were issued after 1996.", "db_id": "financial", "sql": "select client.client_id from client inner join disp on client.client_id = disp.client_id inner join card on disp.disp_id = card.disp_id where card.issued >= '1997-01-01' and card.type = 'junior'", "label": true, "error_types": [] }, { "id": 246, "question": "List all the clients' IDs whose junior credit cards were issued after 1996.", "db_id": "financial", "sql": "SELECT card.disp_id FROM card INNER JOIN disp ON card.disp_id = disp.disp_id INNER JOIN client ON disp.client_id = client.client_id WHERE card.type = 'junior' AND card.issued > '1996-01-01'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 247, "question": "What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women?", "db_id": "financial", "sql": "select cast(sum(case when client.gender = 'F' then 1 else 0 end) as real) * 100 / count(client.gender) from client inner join account on client.district_id = account.district_id inner join district on account.district_id = district.district_id where district.a11 > 10000", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 248, "question": "What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women?", "db_id": "financial", "sql": "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 disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN district AS T4 ON T3.district_id = T4.district_id WHERE T4.A11 > 10000", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 249, "question": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?", "db_id": "financial", "sql": "select 100 * (sum(loan.amount) - sum(loan.amount)) / sum(loan.amount) from loan inner join account on loan.account_id = account.account_id inner join client on account.district_id = client.district_id where client.gender = 'M' and 1996 > 1997", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 250, "question": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?", "db_id": "financial", "sql": "SELECT cast((sum(CASE WHEN strftime('%Y', loan.date) = '1997' THEN loan.amount ELSE 0 END) - sum(CASE WHEN strftime('%Y', loan.date) = '1996' THEN loan.amount ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN strftime('%Y', loan.date) = '1996' THEN loan.amount ELSE 0 END) FROM client INNER JOIN loan ON client.client_id = loan.account_id WHERE client.gender = 'M'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 251, "question": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?", "db_id": "financial", "sql": "SELECT (SUM(CASE WHEN STRFTIME('%Y', T3.date) = '1997' THEN T3.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T3.date) = '1996' THEN T3.amount ELSE 0 END)) * 100.0 / SUM(CASE WHEN STRFTIME('%Y', T3.date) = '1996' THEN T3.amount ELSE 0 END) AS growth_rate FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.gender = 'M'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 252, "question": "How many credit card withdrawals were recorded after 1995?", "db_id": "financial", "sql": "select count(account_id) from trans where strftime('%Y' , date) >= '1995' and operation = 'VYBER KARTOU'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 253, "question": "How many credit card withdrawals were recorded after 1995?", "db_id": "financial", "sql": "SELECT count(trans.trans_id) FROM trans INNER JOIN account ON trans.account_id = account.account_id WHERE strftime('%Y', trans.`date`) > '1995' AND trans.operation = 'VYBER KARTOU'", "label": true, "error_types": [] }, { "id": 254, "question": "What was the difference in the number of crimes committed in East and North Bohemia in 1996?", "db_id": "financial", "sql": "select sum(case when a3 = 'east Bohemia' then 1 else 0 end) - sum(case when a3 = 'north Bohemia' then 1 else 0 end) from district", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 255, "question": "What was the difference in the number of crimes committed in East and North Bohemia in 1996?", "db_id": "financial", "sql": "SELECT SUM(CASE WHEN A3 = 'east Bohemia' THEN A16 ELSE 0 END) - SUM(CASE WHEN A3 = 'north Bohemia' THEN A16 ELSE 0 END) FROM district", "label": true, "error_types": [] }, { "id": 256, "question": "How many owner and disponent dispositions are there from account number 1 to account number 10?", "db_id": "financial", "sql": "select count(account_id) from disp where account_id between 1 and 10", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 257, "question": "How many owner and disponent dispositions are there from account number 1 to account number 10?", "db_id": "financial", "sql": "SELECT count(CASE WHEN TYPE = 'OWNER' THEN 1 ELSE NULL END) AS OWNER , count(CASE WHEN TYPE = 'DISPONENT' THEN 1 ELSE NULL END) AS DISPONENT FROM disp WHERE account_id BETWEEN 1 AND 10", "label": true, "error_types": [] }, { "id": 258, "question": "How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total?", "db_id": "financial", "sql": "SELECT account.frequency, trans.amount FROM account INNER JOIN trans ON account.account_id = trans.account_id WHERE account.account_id = 3539", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 259, "question": "How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total?", "db_id": "financial", "sql": "SELECT COUNT(*) FROM trans T1 WHERE T1.account_id = 3 AND T1.k_symbol = 'statement' UNION ALL SELECT COUNT(*) FROM trans T2 WHERE T2.account_id = 3 AND T2.amount = 3539 AND T2.k_symbol = 'payment'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 260, "question": "How many accounts have an owner disposition and request for a statement to be generated upon a transaction?", "db_id": "financial", "sql": "SELECT count(account.account_id) FROM account INNER JOIN disp ON account.account_id = disp.account_id INNER JOIN trans ON account.account_id = trans.account_id WHERE disp.type = 'OWNER'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 261, "question": "How many accounts have an owner disposition and request for a statement to be generated upon a transaction?", "db_id": "financial", "sql": "SELECT COUNT(T1.account_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 = 'OWNER'", "label": true, "error_types": [] }, { "id": 262, "question": "What is the amount of debt that client number 992 has, and how is this client doing with payments?", "db_id": "financial", "sql": "select loan.amount , loan.status from client inner join loan on client.client_id = loan.account_id where client.client_id = 992", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 263, "question": "What is the amount of debt that client number 992 has, and how is this client doing with payments?", "db_id": "financial", "sql": "SELECT sum(loan.amount), sum(loan.payments) FROM loan INNER JOIN account ON loan.account_id = account.account_id INNER JOIN disp ON account.account_id = disp.account_id WHERE disp.client_id = 992", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 264, "question": "What is the amount of debt that client number 992 has, and how is this client doing with payments?", "db_id": "financial", "sql": "SELECT SUM(T3.amount) AS total_debt, T3.status FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.client_id = 992 GROUP BY T3.status", "label": true, "error_types": [] }, { "id": 265, "question": "What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman?", "db_id": "financial", "sql": "select sum(trans.amount) , client.gender from client inner join disp on client.client_id = disp.client_id inner join account on disp.account_id = account.account_id inner join trans on account.account_id = trans.account_id where disp.client_id = 4 and trans.trans_id = 851", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 266, "question": "What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman?", "db_id": "financial", "sql": "SELECT T1.gender, T3.balance FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T2.client_id = 4 AND T3.trans_id = 851", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 267, "question": "Which kind of credit card does client number 9 possess?", "db_id": "financial", "sql": "select card.type from client inner join disp on client.client_id = disp.client_id inner join account on disp.account_id = account.account_id inner join card on disp.disp_id = card.disp_id where client.client_id = 9", "label": true, "error_types": [] }, { "id": 268, "question": "How much, in total, did client number 617 pay for all of the transactions in 1998?", "db_id": "financial", "sql": "select sum(trans.amount) from client inner join disp on client.client_id = disp.client_id inner join trans on disp.account_id = trans.account_id where client.client_id = 617 and trans.date = '1998'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 269, "question": "How much, in total, did client number 617 pay for all of the transactions in 1998?", "db_id": "financial", "sql": "SELECT SUM(T3.amount) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T1.client_id = 617 AND STRFTIME('%Y', T3.date) = '1998'", "label": true, "error_types": [] }, { "id": 270, "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.", "db_id": "financial", "sql": "select client.birth_date , client.client_id from district inner join account on district.district_id = account.district_id inner join client on account.district_id = client.district_id where client.birth_date between 1983 and 1987 and district.a3 = 'east Bohemia'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 271, "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.", "db_id": "financial", "sql": "SELECT T1.client_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND T1.birth_date BETWEEN '1983-01-01' AND '1987-12-31'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 272, "question": "Please provide the IDs of the 3 female clients with the largest loans.", "db_id": "financial", "sql": "select client.client_id from client inner join loan on client.client_id = loan.loan_id where client.gender = 'F' order by loan.amount desc limit 3", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 273, "question": "Please provide the IDs of the 3 female clients with the largest loans.", "db_id": "financial", "sql": "SELECT client.client_id FROM client INNER JOIN loan ON client.client_id = loan.account_id WHERE client.gender = 'F' ORDER BY loan.amount DESC LIMIT 3", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 274, "question": "Please provide the IDs of the 3 female clients with the largest loans.", "db_id": "financial", "sql": "SELECT T1.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN loan AS T3 ON T2.account_id = T3.account_id WHERE T1.gender = 'F' ORDER BY T3.amount DESC LIMIT 3", "label": true, "error_types": [] }, { "id": 275, "question": "How many accounts in Beroun were opened after 1996?", "db_id": "financial", "sql": "SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A2 = 'Beroun' AND STRFTIME('%Y', T2.date) > '1996'", "label": true, "error_types": [] }, { "id": 276, "question": "How many female customers have a junior credit card?", "db_id": "financial", "sql": "select count(client.client_id) from client inner join disp on client.client_id = disp.client_id inner join card on disp.disp_id = card.disp_id where client.gender = 'F' and card.type = 'junior'", "label": true, "error_types": [] }, { "id": 277, "question": "What proportion of customers who have accounts at the Prague branch are female?", "db_id": "financial", "sql": "select cast(sum(case when client.gender = 'F' then 1 else 0 end) as real) * 100 / count(client.gender) from client inner join account on client.district_id = account.district_id inner join district on account.district_id = district.district_id where district.a3 = 'Prague'", "label": true, "error_types": [] }, { "id": 278, "question": "What proportion of customers who have accounts at the Prague branch are female?", "db_id": "financial", "sql": "SELECT CAST(SUM(IIF(T1.gender = 'F', 1, 0)) AS REAL) * 100 / COUNT(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 district AS T4 ON T3.district_id = T4.district_id WHERE T4.A3 = 'Prague'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 279, "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.", "db_id": "financial", "sql": "select account.account_id from loan inner join account on loan.account_id = account.account_id where loan.duration > 24 and account.date < 1997 order by loan.amount asc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 280, "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.", "db_id": "financial", "sql": "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 T2.date < '1997-01-01' ORDER BY T1.amount ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 281, "question": "How many clients who were born in 1920 stay in east Bohemia?", "db_id": "financial", "sql": "select count(client.client_id) from client inner join district on client.district_id = district.district_id where client.birth_date = 1920 and district.a3 = 'east Bohemia'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 282, "question": "How many clients who were born in 1920 stay in east Bohemia?", "db_id": "financial", "sql": "SELECT count(client.client_id) FROM client INNER JOIN district ON client.district_id = district.district_id WHERE district.a3 = 'east Bohemia' AND client.birth_date LIKE '1920%'", "label": true, "error_types": [] }, { "id": 283, "question": "How many loan accounts are for pre-payment of duration of 24 months with weekly issuance of statement.", "db_id": "financial", "sql": "SELECT count(*) FROM loan INNER JOIN account ON loan.account_id = account.account_id WHERE account.frequency = 'POPLATEK TYDNE' AND loan.duration = 24", "label": true, "error_types": [] }, { "id": 284, "question": "What is the average amount of loan which are still on running contract with statement issuance after each transaction?", "db_id": "financial", "sql": "select avg(loan.amount) from loan inner join trans on loan.account_id = trans.account_id inner join account on trans.account_id = account.account_id where account.frequency = 'POPLATEK PO OBRATU' and loan.status = 'C'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 285, "question": "What is the average amount of loan which are still on running contract with statement issuance after each transaction?", "db_id": "financial", "sql": "SELECT avg(loan.amount) FROM loan INNER JOIN account ON loan.account_id = account.account_id WHERE account.frequency = 'POPLATEK PO OBRATU' AND loan.status = 'C'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 286, "question": "What is the average amount of loan which are still on running contract with statement issuance after each transaction?", "db_id": "financial", "sql": "SELECT AVG(T1.amount) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.frequency = 'POPLATEK PO OBRATU' AND T1.status IN ('C', 'D')", "label": true, "error_types": [] }, { "id": 287, "question": "What is the most common bond type?", "db_id": "toxicology", "sql": "SELECT bond_type FROM bond GROUP BY bond_type ORDER BY COUNT(bond_type) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 288, "question": "In the non-carcinogenic molecules, how many contain chlorine atoms?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from molecule inner join atom on molecule.molecule_id = atom.molecule_id where atom.element = 'cl' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 289, "question": "In the non-carcinogenic molecules, how many contain chlorine atoms?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '-' AND T2.element = 'cl'", "label": true, "error_types": [] }, { "id": 290, "question": "On average how many carcinogenic molecules are single bonded?", "db_id": "toxicology", "sql": "select cast(sum(case when bond.bond_type = '-' then 1 else 0 end) as real) / count(bond.bond_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id inner join connected on bond.bond_id = connected.bond_id where molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 291, "question": "On average how many carcinogenic molecules are single bonded?", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T2.bond_type = '-' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T1.molecule_id) AS average FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" } ] }, { "id": 292, "question": "In the molecule containing sodium atoms, how many are non-carcinogenic?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from molecule inner join atom on molecule.molecule_id = atom.molecule_id where atom.element = 'na' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 293, "question": "In the molecule containing sodium atoms, how many are non-carcinogenic?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.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 = '-'", "label": true, "error_types": [] }, { "id": 294, "question": "Find the triple-bonded molecules which are carcinogenic.", "db_id": "toxicology", "sql": "select molecule.molecule_id from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '#' and molecule.label = '+'", "label": true, "error_types": [] }, { "id": 295, "question": "What is the percentage of carbon in double-bond molecules?", "db_id": "toxicology", "sql": "select cast(sum(iif(atom.element = 'c' , 1 , 0)) as real) * 100 / count(atom.atom_id) from atom inner join connected on atom.molecule_id = connected.atom_id inner join bond on bond.bond_id = connected.bond_id where bond.bond_type = '= '", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 296, "question": "What is the percentage of carbon in double-bond molecules?", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T1.element = 'c' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.atom_id) AS percentage FROM atom AS T1 INNER JOIN connected AS T3 ON T1.atom_id = T3.atom_id INNER JOIN bond AS T2 ON T3.bond_id = T2.bond_id WHERE T2.bond_type = '='", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 297, "question": "How many triple type bonds are there?", "db_id": "toxicology", "sql": "SELECT count(bond_id) FROM bond WHERE bond_type = '#'", "label": true, "error_types": [] }, { "id": 298, "question": "In how many atoms is there no bromine?", "db_id": "toxicology", "sql": "SELECT count(atom_id) FROM atom WHERE element != 'br'", "label": true, "error_types": [] }, { "id": 299, "question": "Of the first 100 molecules in number order, how many are carcinogenic?", "db_id": "toxicology", "sql": "SELECT count(molecule_id) FROM molecule WHERE molecule_id BETWEEN 'TR000' AND 'TR099' AND label = '+'", "label": true, "error_types": [] }, { "id": 300, "question": "Identify by their ID the molecules in which there is carbon.", "db_id": "toxicology", "sql": "select molecule.molecule_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.element = 'si'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 301, "question": "Identify by their ID the molecules in which there is carbon.", "db_id": "toxicology", "sql": "SELECT DISTINCT molecule_id FROM atom WHERE element = 'si'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 302, "question": "What elements are in the TR004_8_9 bond atoms?", "db_id": "toxicology", "sql": "select atom.element from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = atom.molecule_id where bond.bond_id = 'TR004_8_9'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 303, "question": "What elements are in the TR004_8_9 bond atoms?", "db_id": "toxicology", "sql": "SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR004_8_9'", "label": true, "error_types": [] }, { "id": 304, "question": "What elements are in a double type bond?", "db_id": "toxicology", "sql": "select atom.element from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.bond_id = connected.bond_id where bond.bond_type = '= '", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 305, "question": "What elements are in a double type bond?", "db_id": "toxicology", "sql": "SELECT DISTINCT T3.element FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T1.atom_id = T3.atom_id WHERE T2.bond_type = '='", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 306, "question": "Which type of label is the most numerous in atoms with hydrogen?", "db_id": "toxicology", "sql": "SELECT molecule.label FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE atom.element = 'h' GROUP BY molecule.label ORDER BY count(molecule.label) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 307, "question": "Chlorine is in what type of bond?", "db_id": "toxicology", "sql": "select bond.bond_type from atom inner join connected on atom.molecule_id = connected.atom_id inner join bond on bond.bond_id = connected.bond_id where atom.element = 'te'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 308, "question": "Chlorine is in what type of bond?", "db_id": "toxicology", "sql": "SELECT DISTINCT bond.bond_type FROM bond INNER JOIN atom ON bond.molecule_id = atom.molecule_id WHERE atom.element = 'te'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 309, "question": "What atoms are connected in single type bonds?", "db_id": "toxicology", "sql": "select connected.atom_id from bond inner join connected on bond.bond_id = connected.bond_id where bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 310, "question": "What atoms are connected in single type bonds?", "db_id": "toxicology", "sql": "SELECT T1.atom_id, T1.atom_id2 FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T2.bond_type = '-'", "label": true, "error_types": [] }, { "id": 311, "question": "Indicate which atoms are connected in non-carcinogenic type molecules.", "db_id": "toxicology", "sql": "select distinct connected.atom_id from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on atom.molecule_id = bond.molecule_id inner join molecule on bond.molecule_id = molecule.molecule_id where molecule.label = '-'", "label": true, "error_types": [] }, { "id": 312, "question": "Indicate which atoms are connected in non-carcinogenic type molecules.", "db_id": "toxicology", "sql": "SELECT T3.atom_id, T3.atom_id2 FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN connected AS T3 ON T2.atom_id = T3.atom_id WHERE T1.label = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 313, "question": "Which element is the least numerous in non-carcinogenic molecules?", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '-' order by atom.element asc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 314, "question": "Which element is the least numerous in non-carcinogenic molecules?", "db_id": "toxicology", "sql": "SELECT element FROM atom WHERE molecule_id IN ( SELECT molecule_id FROM molecule WHERE label = '-' ) GROUP BY element ORDER BY count(element) ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 315, "question": "What type of bond is there between the atoms TR004_8 and TR004_20?", "db_id": "toxicology", "sql": "select bond.bond_type from bond inner join connected on bond.bond_id = connected.bond_id where connected.atom_id between 'TR004_8' and 'TR004_20'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 316, "question": "What type of bond is there between the atoms TR004_8 and TR004_20?", "db_id": "toxicology", "sql": "SELECT bond.bond_type FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE connected.atom_id = 'TR004_8' AND connected.atom_id2 = 'TR004_20'", "label": true, "error_types": [] }, { "id": 317, "question": "What type of label is not on molecules with atoms with tin?", "db_id": "toxicology", "sql": "SELECT DISTINCT molecule.label FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE atom.element != 'sn' AND molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 318, "question": "What type of label is not on molecules with atoms with tin?", "db_id": "toxicology", "sql": "SELECT DISTINCT T2.label FROM molecule AS T2 WHERE T2.molecule_id NOT IN (SELECT T1.molecule_id FROM atom AS T1 WHERE T1.element = 'Sn')", "label": true, "error_types": [] }, { "id": 319, "question": "How many atoms with iodine and with sulfur type elements are there in single bond molecules?", "db_id": "toxicology", "sql": "select count(atom.atom_id) from atom inner join bond on atom.molecule_id = bond.molecule_id inner join connected on atom.atom_id = connected.atom_id where bond.bond_type = '-' and atom.element = 'i' or atom.element = 's'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 320, "question": "How many atoms with iodine and with sulfur type elements are there in single bond molecules?", "db_id": "toxicology", "sql": "SELECT COUNT(T1.atom_id) 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 T1.element IN ('i', 's')", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 321, "question": "Identify all connected atoms with a triple bond.", "db_id": "toxicology", "sql": "select connected.atom_id from bond inner join connected on bond.bond_id = connected.bond_id where bond.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 322, "question": "Identify all connected atoms with a triple bond.", "db_id": "toxicology", "sql": "SELECT T1.atom_id, T1.atom_id2 FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T2.bond_type = '#'", "label": true, "error_types": [] }, { "id": 323, "question": "Identify all the atoms that are connected to the atoms of the TR181 molecule.", "db_id": "toxicology", "sql": "select connected.atom_id , connected.atom_id2 from atom inner join connected on atom.atom_id = connected.atom_id inner join molecule on molecule.molecule_id = atom.molecule_id where molecule.molecule_id = 'TR181'", "label": true, "error_types": [] }, { "id": 324, "question": "Identify all the atoms that are connected to the atoms of the TR181 molecule.", "db_id": "toxicology", "sql": "SELECT DISTINCT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.molecule_id = 'TR181'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 325, "question": "What percentage of carcinogenic-type molecules does not contain fluorine?", "db_id": "toxicology", "sql": "select cast(sum(case when atom.element = 'f' then 1 else 0 end) as real) * 100 / count(molecule.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 326, "question": "What percentage of carcinogenic-type molecules does not contain fluorine?", "db_id": "toxicology", "sql": "SELECT cast(sum(CASE WHEN molecule.label = '+' AND atom.element != 'f' THEN 1 ELSE 0 END) AS REAL) * 100 / count(molecule.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 327, "question": "What percentage of carcinogenic-type molecules does not contain fluorine?", "db_id": "toxicology", "sql": "SELECT (1 - CAST(SUM(CASE WHEN T2.element = 'f' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.molecule_id)) * 100 AS percentage FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 328, "question": "What is the percentage of carcinogenic molecules in triple type bonds?", "db_id": "toxicology", "sql": "select cast(sum(case when bond.bond_type = '#' then 1 else 0 end) as real) * 100 / count(bond.bond_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id where molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 329, "question": "What is the difference between the number of molecules that are carcinogenic and those that are not?", "db_id": "toxicology", "sql": "SELECT SUM(IIF(label = '+', 1, 0)) - SUM(IIF(label = '-', 1, 0)) AS diff FROM molecule", "label": true, "error_types": [] }, { "id": 330, "question": "What are the atom IDs of the bond TR000_2_5?", "db_id": "toxicology", "sql": "select connected.atom_id2 from connected inner join bond on connected.bond_id = bond.bond_id where bond.bond_id = 'TR_000_2_5'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 331, "question": "What are the atom IDs of the bond TR000_2_5?", "db_id": "toxicology", "sql": "SELECT atom_id, atom_id2 FROM connected WHERE bond_id = 'TR000_2_5'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 332, "question": "What are the bond IDs that have the same atom ID 2 of TR000_2?", "db_id": "toxicology", "sql": "SELECT bond_id FROM connected WHERE atom_id2 = 'TR000_2'", "label": true, "error_types": [] }, { "id": 333, "question": "Please list top five molecules that have double bonds in alphabetical order.", "db_id": "toxicology", "sql": "select molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '= ' limit 5", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 334, "question": "Please list top five molecules that have double bonds in alphabetical order.", "db_id": "toxicology", "sql": "SELECT DISTINCT T1.molecule_id FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '=' ORDER BY T1.molecule_id ASC LIMIT 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 335, "question": "What is the percentage of double bonds in the molecule TR008? Please provide your answer as a percentage with five decimal places.", "db_id": "toxicology", "sql": "select cast(sum(case when bond.bond_type = '= ' then 1 else 0 end) as real) * 100 / count(bond.bond_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR008'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 336, "question": "What is the percentage of double bonds in the molecule TR008? Please provide your answer as a percentage with five decimal places.", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN bond_type = '=' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(bond_id) AS percentage FROM bond WHERE molecule_id = 'TR008'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 337, "question": "What is the percentage of molecules that are carcinogenic? Please provide your answer as a percentage with three decimal places.", "db_id": "toxicology", "sql": "select cast(sum(case when label = '+' then 1 else 0 end) as real) * 100 / count(molecule_id) from molecule", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 338, "question": "How much of the hydrogen in molecule TR206 is accounted for? Please provide your answer as a percentage with four decimal places.", "db_id": "toxicology", "sql": "select cast(sum(case when atom.element = 'h' then 1 else 0 end) as real) * 100 / count(atom.atom_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR206'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 339, "question": "What is the type of bond that molecule TR000 has when involved in any bonds?", "db_id": "toxicology", "sql": "select bond.bond_type from bond inner join molecule on bond.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR000'", "label": true, "error_types": [] }, { "id": 340, "question": "What are the elements of the toxicology and label of molecule TR060?", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR060' and molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 341, "question": "What are the elements of the toxicology and label of molecule TR060?", "db_id": "toxicology", "sql": "SELECT DISTINCT molecule.label, atom.element FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.molecule_id = 'TR060'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 342, "question": "What are the elements of the toxicology and label of molecule TR060?", "db_id": "toxicology", "sql": "SELECT T2.element, T1.label FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR060'", "label": true, "error_types": [] }, { "id": 343, "question": "Which bond type accounted for the majority of the bonds found in molecule TR010 and state whether or not this molecule is carcinogenic?", "db_id": "toxicology", "sql": "select bond.bond_type , molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where molecule.molecule_id = 'TR018' group by bond.bond_type , molecule.label order by count(bond.bond_type) desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 344, "question": "Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order.", "db_id": "toxicology", "sql": "select molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '-' and molecule.label = '-' limit 3", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 345, "question": "Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order.", "db_id": "toxicology", "sql": "SELECT molecule.label FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE bond.bond_type = '-' ORDER BY molecule.label LIMIT 3", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 346, "question": "Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order.", "db_id": "toxicology", "sql": "SELECT 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 = '-' ORDER BY T1.molecule_id ASC LIMIT 3", "label": true, "error_types": [] }, { "id": 347, "question": "Please list top two bonds that happened with the molecule TR006 in alphabetical order.", "db_id": "toxicology", "sql": "select bond.bond_id from bond inner join connected on bond.bond_id = connected.bond_id where bond.molecule_id = 'TR006' order by bond.bond_id asc limit 2", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 348, "question": "Please list top two bonds that happened with the molecule TR006 in alphabetical order.", "db_id": "toxicology", "sql": "SELECT bond_id FROM bond WHERE molecule_id = 'TR006' ORDER BY bond_id LIMIT 2", "label": true, "error_types": [] }, { "id": 349, "question": "How many bonds which involved atom 12 does molecule TR009 have?", "db_id": "toxicology", "sql": "select count(bond.bond_id) from bond inner join connected on bond.bond_id = connected.bond_id inner join molecule on molecule.molecule_id = bond.molecule_id where molecule.molecule_id = 'TR009' and connected.atom_id2 = 'TR009_12'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 350, "question": "How many bonds which involved atom 12 does molecule TR009 have?", "db_id": "toxicology", "sql": "SELECT COUNT(T1.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 = 'TR009_12' OR T2.atom_id2 = 'TR009_12')", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 351, "question": "How many molecules are carcinogenic and have the bromine element?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+' and atom.element = 'br'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 352, "question": "How many molecules are carcinogenic and have the bromine element?", "db_id": "toxicology", "sql": "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 = 'br' AND T1.label = '+'", "label": true, "error_types": [] }, { "id": 353, "question": "What are the bond type and the atoms of the bond ID of TR001_6_9?", "db_id": "toxicology", "sql": "select bond.bond_type , connected.atom_id2 , bond.molecule_id from bond inner join connected on bond.bond_id = connected.bond_id where bond.bond_id = 'TR001_6_9'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 354, "question": "What are the bond type and the atoms of the bond ID of TR001_6_9?", "db_id": "toxicology", "sql": "SELECT bond.bond_type, connected.atom_id, connected.atom_id2 FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE bond.bond_id = 'TR001_6_9'", "label": true, "error_types": [] }, { "id": 355, "question": "Which molecule does the atom TR001_10 belong to? Please state whether this molecule is carcinogenic or not.", "db_id": "toxicology", "sql": "select molecule.molecule_id , molecule.label from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.atom_id = 'TR001_10'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 356, "question": "How many molecules have a triple bond type?", "db_id": "toxicology", "sql": "select count(molecule_id) from bond where bond_type = '#'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 357, "question": "How many molecules have a triple bond type?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT molecule_id) FROM bond WHERE bond_type = '#'", "label": true, "error_types": [] }, { "id": 358, "question": "List all the elements of the toxicology of the molecule \"TR004\".", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR004'", "label": true, "error_types": [] }, { "id": 359, "question": "How many of the molecules are not carcinogenic?", "db_id": "toxicology", "sql": "SELECT count(molecule_id) FROM molecule WHERE label = '-'", "label": true, "error_types": [] }, { "id": 360, "question": "Among all the atoms from 21 to 25, list all the molecules that are carcinogenic.", "db_id": "toxicology", "sql": "select atom.molecule_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where substr(atom.atom_id , 7 , 2) = 21 and molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 361, "question": "Among all the atoms from 21 to 25, list all the molecules that are carcinogenic.", "db_id": "toxicology", "sql": "SELECT molecule.molecule_id FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.label = '+' AND substr(atom.atom_id, 7, 2) BETWEEN '21' AND '25'", "label": true, "error_types": [] }, { "id": 362, "question": "What are the bonds that have phosphorus and nitrogen as their atom elements?", "db_id": "toxicology", "sql": "select distinct bond.bond_id from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = atom.molecule_id where atom.element = 'p' or atom.element = 'n'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 363, "question": "What are the bonds that have phosphorus and nitrogen as their atom elements?", "db_id": "toxicology", "sql": "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')", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 364, "question": "Is the molecule with the most double bonds carcinogenic?", "db_id": "toxicology", "sql": "select molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '= ' group by molecule.molecule_id order by count(bond.bond_type) desc limit 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 365, "question": "Is the molecule with the most double bonds carcinogenic?", "db_id": "toxicology", "sql": "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.molecule_id ORDER BY COUNT(T1.bond_type) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 366, "question": "What is the average number of bonds the atoms with the element iodine have?", "db_id": "toxicology", "sql": "select cast(count(bond.bond_id) as real) / count(distinct atom.atom_id) from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = atom.molecule_id where atom.element = 'i'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 367, "question": "What is the average number of bonds the atoms with the element iodine have?", "db_id": "toxicology", "sql": "SELECT CAST(COUNT(T2.bond_id) AS REAL) / COUNT(DISTINCT T1.atom_id) AS average_bonds FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i'", "label": true, "error_types": [] }, { "id": 368, "question": "List the bond type and the bond ID of the atom 45.", "db_id": "toxicology", "sql": "select bond.bond_type , bond.bond_id from atom inner join connected on atom.atom_id = connected.atom_id2 inner join bond on bond.bond_id = connected.bond_id where atom.atom_id = 45", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 369, "question": "List the bond type and the bond ID of the atom 45.", "db_id": "toxicology", "sql": "SELECT T2.bond_type, T2.bond_id FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE SUBSTR(T1.atom_id, 7, 2) = '45'", "label": true, "error_types": [] }, { "id": 370, "question": "What are the atoms of the triple bond with the molecule \"TR041\"?", "db_id": "toxicology", "sql": "select atom.atom_id from atom inner join connected on atom.atom_id = connected.atom_id2 inner join bond on bond.bond_id = connected.bond_id where bond.molecule_id = 'TR447' and bond.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 371, "question": "What are the atoms of the triple bond with the molecule \"TR041\"?", "db_id": "toxicology", "sql": "SELECT T1.atom_id, T1.atom_id2 FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T2.molecule_id = 'TR447' AND T2.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 372, "question": "Of all the carcinogenic molecules, which one has the most double bonds?", "db_id": "toxicology", "sql": "select molecule.molecule_id from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '= ' and molecule.label = '+' group by molecule.molecule_id order by count(bond.bond_type) desc limit 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 373, "question": "Of all the carcinogenic molecules, which one has the most double bonds?", "db_id": "toxicology", "sql": "SELECT molecule.molecule_id FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE molecule.label = '+' AND bond.bond_type = '=' GROUP BY molecule.molecule_id ORDER BY count(bond.bond_id) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 374, "question": "What is the least common element of all carcinogenic molecules?", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+' group by atom.element order by count(atom.element) asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 375, "question": "What proportion of single bonds are carcinogenic? Please provide your answer as a percentage with five decimal places.", "db_id": "toxicology", "sql": "select cast(sum(case when molecule.label = '+' then 1 else 0 end) as real) * 100 / count(bond.bond_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id where bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 376, "question": "Calculate the total atoms consisting of the element carbon and hydrogen.", "db_id": "toxicology", "sql": "select count(atom_id) from atom where element in ('c' , 'h')", "label": true, "error_types": [] }, { "id": 377, "question": "List down atom id2 for atoms with element sulfur.", "db_id": "toxicology", "sql": "SELECT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 's'", "label": true, "error_types": [] }, { "id": 378, "question": "What are the bond type for atoms with element Tin?", "db_id": "toxicology", "sql": "select bond.bond_type from atom inner join bond on atom.atom_id = bond.bond_id where atom.element = 'sn'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 379, "question": "What are the bond type for atoms with element Tin?", "db_id": "toxicology", "sql": "SELECT DISTINCT bond.bond_type FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.element = 'sn'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 380, "question": "What are the bond type for atoms with element Tin?", "db_id": "toxicology", "sql": "SELECT 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 T2.bond_id = T3.bond_id WHERE T1.element = 'sn'", "label": true, "error_types": [] }, { "id": 381, "question": "How many elements are there for single bond molecules?", "db_id": "toxicology", "sql": "select count(connected.atom_id2) from bond inner join connected on bond.bond_id = connected.bond_id where bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 382, "question": "How many elements are there for single bond molecules?", "db_id": "toxicology", "sql": "SELECT count(DISTINCT atom.element) FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 383, "question": "How many elements are there for single bond molecules?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T2.element) FROM atom AS T2 INNER JOIN bond AS T1 ON T2.molecule_id = T1.molecule_id WHERE T1.bond_type = '-' GROUP BY T2.molecule_id HAVING COUNT(DISTINCT T1.bond_type) = 1", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 384, "question": "Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.", "db_id": "toxicology", "sql": "select count(atom.atom_id) from atom inner join bond on atom.molecule_id = bond.molecule_id inner join connected on bond.bond_id = connected.bond_id where atom.element in ('p' , 'br')", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 385, "question": "Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.bond_id) 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 = '#' AND (T3.element = 'p' OR T3.element = 'br')", "label": true, "error_types": [] }, { "id": 386, "question": "Write down bond id for molecules that are carcinogenic.", "db_id": "toxicology", "sql": "SELECT bond.bond_id FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '+'", "label": true, "error_types": [] }, { "id": 387, "question": "Among the single bond molecule id, which molecules are not carcinogenic?", "db_id": "toxicology", "sql": "SELECT DISTINCT T1.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 = '-'", "label": true, "error_types": [] }, { "id": 388, "question": "What is the composition of element chlorine in percentage among the single bond molecules?", "db_id": "toxicology", "sql": "select cast(sum(iif(atom.element = 'cl' , 1 , 0)) as real) * 100 / count(atom.molecule_id) from atom inner join bond on atom.molecule_id = bond.molecule_id where bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 389, "question": "What is the composition of element chlorine in percentage among the single bond molecules?", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T1.element = 'cl' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.atom_id) AS percentage 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 = '-'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 390, "question": "List down the molecule id for non carcinogenic molecules.", "db_id": "toxicology", "sql": "select molecule_id from molecule where label = '-'", "label": true, "error_types": [] }, { "id": 391, "question": "Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.", "db_id": "toxicology", "sql": "SELECT count(molecule_id) FROM molecule WHERE molecule_id BETWEEN 'TR000' AND 'TR030' AND label = '+'", "label": true, "error_types": [] }, { "id": 392, "question": "What are the elements for bond id TR001_10_11?", "db_id": "toxicology", "sql": "select distinct atom.element from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = connected.atom_id where bond.bond_id = 'TR001_10_11'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 393, "question": "What are the elements for bond id TR001_10_11?", "db_id": "toxicology", "sql": "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'", "label": true, "error_types": [] }, { "id": 394, "question": "How many bond id have element iodine?", "db_id": "toxicology", "sql": "select count(bond.bond_id) from bond inner join atom on bond.molecule_id = atom.molecule_id where atom.element = 'i'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 395, "question": "How many bond id have element iodine?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T2.bond_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 396, "question": "Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic?", "db_id": "toxicology", "sql": "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", "label": true, "error_types": [] }, { "id": 397, "question": "List down two molecule id of triple bond non carcinogenic molecules with element carbon.", "db_id": "toxicology", "sql": "SELECT molecule.molecule_id FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE bond.bond_type = '#' AND molecule.label = '-' AND atom.element = 'c' LIMIT 2", "label": true, "error_types": [] }, { "id": 398, "question": "What is the percentage of element chlorine in carcinogenic molecules?", "db_id": "toxicology", "sql": "select cast(sum(case when atom.element = 'pb' then 1 else 0 end) as real) * 100 / count(atom.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 399, "question": "What is the percentage of element chlorine in carcinogenic molecules?", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T1.element = 'cl' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.molecule_id) AS percentage FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'", "label": true, "error_types": [] }, { "id": 400, "question": "List the toxicology elements associated with molecule TR001.", "db_id": "toxicology", "sql": "SELECT DISTINCT atom.element FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.molecule_id = 'TR001'", "label": true, "error_types": [] }, { "id": 401, "question": "Give me the molecule ID of the double bond type.", "db_id": "toxicology", "sql": "select molecule_id from bond where bond_type like '= '", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 402, "question": "Give me the molecule ID of the double bond type.", "db_id": "toxicology", "sql": "SELECT molecule_id FROM bond WHERE bond_type = '='", "label": true, "error_types": [] }, { "id": 403, "question": "Write down the atom IDs of the first and second atoms of triple bond type molecules.", "db_id": "toxicology", "sql": "SELECT connected.atom_id, connected.atom_id2 FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE bond.bond_type = '#'", "label": true, "error_types": [] }, { "id": 404, "question": "What are the toxicology elements associated with bond ID TR000_1_2?", "db_id": "toxicology", "sql": "select atom.element from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = connected.atom_id where bond.bond_id = 'TR005_16_26'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 405, "question": "What are the toxicology elements associated with bond ID TR000_1_2?", "db_id": "toxicology", "sql": "SELECT T3.element FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T1.atom_id = T3.atom_id WHERE T2.bond_id = 'TR005_16_26'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 406, "question": "How many of the single bond type molecules are non-carcinogenic?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '-' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 407, "question": "What is the label for bond ID TR001_10_11?", "db_id": "toxicology", "sql": "SELECT molecule.label FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_id = 'TR001_10_11'", "label": true, "error_types": [] }, { "id": 408, "question": "Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.", "db_id": "toxicology", "sql": "select bond.molecule_id , molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 409, "question": "Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.", "db_id": "toxicology", "sql": "SELECT bond.bond_id, molecule.label FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE bond.bond_type = '#'", "label": true, "error_types": [] }, { "id": 410, "question": "What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.", "db_id": "toxicology", "sql": "select cast(sum(case when atom.element = 'h' then 1 else 0 end) as real) / count(atom.element) , molecule.label from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR006'", "label": true, "error_types": [] }, { "id": 411, "question": "What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.", "db_id": "toxicology", "sql": "SELECT cast(sum(CASE WHEN atom.element = 'h' THEN 1 ELSE 0 END) AS REAL) * 100 / count(atom.element), molecule.label FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.molecule_id = 'TR006'", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 412, "question": "What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T1.element = 'H' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.element), T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR006'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 413, "question": "Identify whether the chemical compound that contains Calcium is carcinogenic.", "db_id": "toxicology", "sql": "select case when molecule.label = '+' then 'YES' else 'NO' end as yorn from molecule inner join atom on molecule.molecule_id = atom.molecule_id where atom.element = 'ca'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 414, "question": "Identify whether the chemical compound that contains Calcium is carcinogenic.", "db_id": "toxicology", "sql": "SELECT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca'", "label": true, "error_types": [] }, { "id": 415, "question": "Determine the bond type that is formed in the chemical compound containing element Carbon.", "db_id": "toxicology", "sql": "select bond.bond_type from atom inner join connected on atom.atom_id = connected.atom_id inner join molecule on atom.molecule_id = molecule.molecule_id inner join bond on bond.molecule_id = molecule.molecule_id where atom.element = 'te'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 416, "question": "Determine the bond type that is formed in the chemical compound containing element Carbon.", "db_id": "toxicology", "sql": "SELECT bond_type FROM bond WHERE molecule_id IN ( SELECT molecule_id FROM atom WHERE element = 'te' )", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 417, "question": "Determine the bond type that is formed in the chemical compound containing element Carbon.", "db_id": "toxicology", "sql": "SELECT 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 T2.bond_id = T3.bond_id WHERE T1.element = 'te'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 418, "question": "Name chemical elements that form a bond TR001_10_11.", "db_id": "toxicology", "sql": "select atom.element from atom inner join bond on atom.molecule_id = bond.molecule_id where bond.bond_id = 'TR001_10_11' group by atom.element", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 419, "question": "Name chemical elements that form a bond TR001_10_11.", "db_id": "toxicology", "sql": "SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id OR T1.atom_id = T2.atom_id2 WHERE T2.bond_id = 'TR001_10_11'", "label": true, "error_types": [] }, { "id": 420, "question": "Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.", "db_id": "toxicology", "sql": "select cast(sum(iif(bond_type = '#' , 1 , 0)) as real) * 100 / count(bond_id) from bond", "label": true, "error_types": [] }, { "id": 421, "question": "Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.", "db_id": "toxicology", "sql": "SELECT CAST(COUNT(DISTINCT T1.molecule_id) AS REAL) * 100 / (SELECT COUNT(*) FROM molecule) AS percentage FROM bond AS T1 WHERE T1.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 422, "question": "Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.", "db_id": "toxicology", "sql": "select cast(sum(case when bond.bond_type = '= ' then 1 else 0 end) as real) * 100 / count(bond.bond_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id where molecule.molecule_id = 'TR047'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 423, "question": "Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN bond_type = '=' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(bond_id) AS percent FROM bond WHERE molecule_id = 'TR047'", "label": true, "error_types": [] }, { "id": 424, "question": "Identify whether the molecule that contains atom TR001_1 is carcinogenic.", "db_id": "toxicology", "sql": "select case when molecule.label = '+' then 'YES' else 'NO' end as yorn from molecule inner join atom on molecule.molecule_id = atom.molecule_id where atom.atom_id = 'TR001_1'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 425, "question": "Identify whether the molecule that contains atom TR001_1 is carcinogenic.", "db_id": "toxicology", "sql": "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'", "label": true, "error_types": [] }, { "id": 426, "question": "Is molecule TR151 carcinogenic?", "db_id": "toxicology", "sql": "SELECT label FROM molecule WHERE molecule_id = 'TR151'", "label": true, "error_types": [] }, { "id": 427, "question": "Is molecule TR151 carcinogenic?", "db_id": "toxicology", "sql": "SELECT CASE WHEN label = '+' THEN 'YES' ELSE 'NO' END AS is_carcinogenic FROM molecule WHERE molecule_id = 'TR151'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 428, "question": "Which toxic element can be found in the molecule TR151?", "db_id": "toxicology", "sql": "select element from atom where molecule_id = ( select molecule_id from molecule where molecule_id = 'TR151' ) and element = ( select element from atom where molecule_id = 'TR151' ) and element is not null", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 429, "question": "Which toxic element can be found in the molecule TR151?", "db_id": "toxicology", "sql": "SELECT element FROM atom WHERE molecule_id = 'TR151'", "label": true, "error_types": [] }, { "id": 430, "question": "How many chemical compounds in the database are identified as carcinogenic.", "db_id": "toxicology", "sql": "select count(molecule_id) from molecule where label = '+'", "label": true, "error_types": [] }, { "id": 431, "question": "Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.", "db_id": "toxicology", "sql": "select atom.atom_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.molecule_id between 'TR010' and 'TR050' and atom.element = 'c'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 432, "question": "Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.", "db_id": "toxicology", "sql": "SELECT atom_id FROM atom WHERE element = 'c' AND substr(molecule_id, 3, 3) BETWEEN 10 AND 49", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 433, "question": "How many atoms belong to the molecule labeled with carcinogenic compounds?", "db_id": "toxicology", "sql": "SELECT COUNT(T2.atom_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+'", "label": true, "error_types": [] }, { "id": 434, "question": "Which bond ids are double-bond with carcinogenic compound?", "db_id": "toxicology", "sql": "select bond.bond_id from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '= ' and molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 435, "question": "Which bond ids are double-bond with carcinogenic compound?", "db_id": "toxicology", "sql": "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 = '='", "label": true, "error_types": [] }, { "id": 436, "question": "How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?", "db_id": "toxicology", "sql": "SELECT count(molecule.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.label = '+' AND atom.element = 'h'", "label": true, "error_types": [] }, { "id": 437, "question": "How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?", "db_id": "toxicology", "sql": "SELECT COUNT(T2.atom_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'H' AND T1.label = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 438, "question": "Among the atoms that contain element carbon, which one does not contain compound carcinogenic?", "db_id": "toxicology", "sql": "select atom.atom_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.element = 'C' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 439, "question": "Among the atoms that contain element carbon, which one does not contain compound carcinogenic?", "db_id": "toxicology", "sql": "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 = '-'", "label": true, "error_types": [] }, { "id": 440, "question": "Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.", "db_id": "toxicology", "sql": "select cast(sum(case when molecule.label = '+' then 1 else 0 end) as real) * 100 / count(molecule.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.element = 'h'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 441, "question": "Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.", "db_id": "toxicology", "sql": "SELECT CAST(SUM(CASE WHEN T2.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.molecule_id) AS percentage FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 442, "question": "Is molecule TR124 carcinogenic?", "db_id": "toxicology", "sql": "select label from molecule where molecule_id = 'TR124'", "label": true, "error_types": [] }, { "id": 443, "question": "Is molecule TR124 carcinogenic?", "db_id": "toxicology", "sql": "SELECT CASE WHEN label = '+' THEN 'YES' ELSE 'NO' END AS is_carcinogenic FROM molecule WHERE molecule_id = 'TR124'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 444, "question": "What atoms comprise TR186?", "db_id": "toxicology", "sql": "SELECT atom_id FROM atom WHERE molecule_id = 'TR186'", "label": true, "error_types": [] }, { "id": 445, "question": "What atoms comprise TR186?", "db_id": "toxicology", "sql": "SELECT element FROM atom WHERE molecule_id = 'TR186'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 446, "question": "What is the bond type of TR007_4_19?", "db_id": "toxicology", "sql": "SELECT bond_type FROM bond WHERE bond_id = 'TR007_4_19'", "label": true, "error_types": [] }, { "id": 447, "question": "Name the elements that comprise the atoms of bond TR001_2_4.", "db_id": "toxicology", "sql": "select atom.element from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = connected.atom_id where bond.bond_id = 'TR001_2_4' group by atom.element", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 448, "question": "Name the elements that comprise the atoms of bond TR001_2_4.", "db_id": "toxicology", "sql": "SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR001_2_4'", "label": true, "error_types": [] }, { "id": 449, "question": "How many double bonds does TR006 have and is it carcinogenic?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) , molecule.label from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '= ' and molecule.molecule_id = 'TR006'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 450, "question": "How many double bonds does TR006 have and is it carcinogenic?", "db_id": "toxicology", "sql": "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'", "label": true, "error_types": [] }, { "id": 451, "question": "List all carcinogenic molecules and their elements.", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+' and atom.element = 'cl'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 452, "question": "List all carcinogenic molecules and their elements.", "db_id": "toxicology", "sql": "SELECT T1.molecule_id, T2.element FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+'", "label": true, "error_types": [] }, { "id": 453, "question": "Name all bonds with single bond types and what atoms are connected to the molecules.", "db_id": "toxicology", "sql": "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 = '-'", "label": true, "error_types": [] }, { "id": 454, "question": "Which molecules have triple bonds and list all the elements they contain.", "db_id": "toxicology", "sql": "select atom.element from atom inner join bond on atom.molecule_id = bond.molecule_id inner join connected on bond.bond_id = connected.bond_id where bond.bond_type = '#'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 455, "question": "Which molecules have triple bonds and list all the elements they contain.", "db_id": "toxicology", "sql": "SELECT DISTINCT molecule.molecule_id, atom.element FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id INNER JOIN connected ON bond.bond_id = connected.bond_id INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE bond.bond_type = '#' AND atom.element IN ('cl', 'c', 'h', 'o', 's', 'n', 'p', 'na', 'br', 'f', 'i', 'sn', 'pb', 'te', 'ca')", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 456, "question": "Which molecules have triple bonds and list all the elements they contain.", "db_id": "toxicology", "sql": "SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '#' ORDER BY T2.molecule_id, T1.element", "label": true, "error_types": [] }, { "id": 457, "question": "Name the atoms' elements that form bond TR000_2_3.", "db_id": "toxicology", "sql": "select atom.element from atom inner join bond on atom.atom_id = bond.bond_id where bond.bond_id = 'TR000_2_3'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 458, "question": "Name the atoms' elements that form bond TR000_2_3.", "db_id": "toxicology", "sql": "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'", "label": true, "error_types": [] }, { "id": 459, "question": "How many bonds are created by bonding atoms with chlorine element?", "db_id": "toxicology", "sql": "select count(connected.bond_id) from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.molecule_id = atom.molecule_id where atom.element = 'cl'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 460, "question": "How many bonds are created by bonding atoms with chlorine element?", "db_id": "toxicology", "sql": "SELECT count(bond.bond_id) FROM bond INNER JOIN atom ON bond.molecule_id = atom.molecule_id WHERE atom.element = 'cl'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 461, "question": "How many bonds are created by bonding atoms with chlorine element?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T2.bond_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'cl'", "label": true, "error_types": [] }, { "id": 462, "question": "How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound?", "db_id": "toxicology", "sql": "select count(bond.molecule_id) from bond inner join molecule on bond.molecule_id = molecule.molecule_id where bond.bond_type = '= ' and molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 463, "question": "How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.molecule_id) AS total_molecules, SUM(CASE WHEN T2.label = '+' THEN 1 ELSE 0 END) AS carcinogenic_molecules FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '='", "label": true, "error_types": [] }, { "id": 464, "question": "How many molecules without sulphur element is not having double bond?", "db_id": "toxicology", "sql": "select count(atom.molecule_id) from atom inner join bond on atom.molecule_id = bond.molecule_id inner join connected on bond.bond_id = connected.bond_id where atom.element = 's' and bond.bond_type != '= '", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 465, "question": "How many molecules without sulphur element is not having double bond?", "db_id": "toxicology", "sql": "SELECT count(molecule.molecule_id) FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id INNER JOIN connected ON bond.bond_id = connected.bond_id INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE bond.bond_type != ' = ' AND atom.element != 's'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 466, "question": "How many molecules without sulphur element is not having double bond?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 WHERE NOT EXISTS (SELECT 1 FROM atom AS T2 WHERE T2.molecule_id = T1.molecule_id AND T2.element = 's') AND NOT EXISTS (SELECT 1 FROM bond AS T3 WHERE T3.molecule_id = T1.molecule_id AND T3.bond_type = '=')", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 467, "question": "What is the carcinogenic label for bond TR001_2_4?", "db_id": "toxicology", "sql": "SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_2_4'", "label": true, "error_types": [] }, { "id": 468, "question": "How many atoms belong to molecule id TR001?", "db_id": "toxicology", "sql": "select count(molecule_id) from atom where molecule_id = 'TR005'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 469, "question": "How many single bonds are there in the list?", "db_id": "toxicology", "sql": "SELECT count(bond_id) FROM bond WHERE bond_type = '-'", "label": true, "error_types": [] }, { "id": 470, "question": "Among the molecules which contain \"cl\" element, which of them are carcinogenic?", "db_id": "toxicology", "sql": "SELECT DISTINCT molecule.molecule_id FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE atom.element = 'cl' AND molecule.label = '+'", "label": true, "error_types": [] }, { "id": 471, "question": "Among the molecules which contain \"c\" element, which of them are not carcinogenic?", "db_id": "toxicology", "sql": "select molecule.molecule_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.element = 'C' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 472, "question": "Among the molecules which contain \"c\" element, which of them are not carcinogenic?", "db_id": "toxicology", "sql": "SELECT 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 = '-'", "label": true, "error_types": [] }, { "id": 473, "question": "What is the molecule id of bond id TR001_1_7?", "db_id": "toxicology", "sql": "SELECT molecule_id FROM bond WHERE bond_id = 'TR001_1_7'", "label": true, "error_types": [] }, { "id": 474, "question": "How many elements are contained in bond_id TR001_3_4?", "db_id": "toxicology", "sql": "select count(atom.atom_id) from atom inner join connected on atom.atom_id = connected.atom_id where connected.bond_id = 'TR001_3_4' and atom.element = 'cl'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 475, "question": "How many elements are contained in bond_id TR001_3_4?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T3.element) FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T1.atom_id = T3.atom_id WHERE T2.bond_id = 'TR001_3_4'", "label": true, "error_types": [] }, { "id": 476, "question": "What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2?", "db_id": "toxicology", "sql": "SELECT bond_type FROM bond WHERE bond_id IN ( SELECT bond_id FROM connected WHERE atom_id = 'TR000_1' AND atom_id2 = 'TR000_2' )", "label": true, "error_types": [] }, { "id": 477, "question": "What is the molecule of atom id \"TR000_2\" and atom id 2 \"TR000_4\"?", "db_id": "toxicology", "sql": "select molecule.label from atom inner join molecule on atom.molecule_id = molecule.molecule_id inner join connected on atom.atom_id = connected.atom_id2 where atom.atom_id = 'TR000_2' and connected.atom_id2 = 'TR000_4'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 478, "question": "What is the molecule of atom id \"TR000_2\" and atom id 2 \"TR000_4\"?", "db_id": "toxicology", "sql": "SELECT molecule_id FROM atom WHERE atom_id IN ('TR000_2', 'TR000_4')", "label": true, "error_types": [] }, { "id": 479, "question": "What is the element of toxicology for the atom with the ID of TR000_1?", "db_id": "toxicology", "sql": "SELECT element FROM atom WHERE atom_id = 'TR000_1'", "label": true, "error_types": [] }, { "id": 480, "question": "Is molecule TR000 is carcinogenic or not?", "db_id": "toxicology", "sql": "select case when label = '+' then 'YES' else 'NO' end as yorn from molecule where molecule_id = 'TR000'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 481, "question": "Is molecule TR000 is carcinogenic or not?", "db_id": "toxicology", "sql": "SELECT label FROM molecule WHERE molecule_id = 'TR000'", "label": true, "error_types": [] }, { "id": 482, "question": "Is molecule TR000 is carcinogenic or not?", "db_id": "toxicology", "sql": "SELECT CASE WHEN label = '+' THEN 'Yes' ELSE 'No' END AS is_carcinogenic FROM molecule WHERE molecule_id = 'TR000'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 483, "question": "Find the percentage of atoms with single bond.", "db_id": "toxicology", "sql": "SELECT cast(sum(CASE WHEN bond_type = '-' THEN 1 ELSE 0 END) AS REAL) * 100 / count(bond_id) FROM bond", "label": true, "error_types": [] }, { "id": 484, "question": "How many carcinogenic molecules that consisted of Nitrogen?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id where atom.element = 'n' and molecule.label = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 485, "question": "How many carcinogenic molecules that consisted of Nitrogen?", "db_id": "toxicology", "sql": "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 = '+'", "label": true, "error_types": [] }, { "id": 486, "question": "Which molecule consisted of Sulphur atom with double bond?", "db_id": "toxicology", "sql": "select molecule.label from atom inner join molecule on atom.molecule_id = molecule.molecule_id inner join bond on atom.molecule_id = bond.molecule_id inner join connected on atom.atom_id = connected.atom_id2 where atom.element = 's' and bond.bond_type = '= '", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 487, "question": "Which molecule consisted of Sulphur atom with double bond?", "db_id": "toxicology", "sql": "SELECT T3.molecule_id 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 = '=' AND T3.element = 's'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 488, "question": "Which non-carcinogenic molecules consisted more than 5 atoms?", "db_id": "toxicology", "sql": "SELECT count(molecule.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.label = '-' GROUP BY molecule.molecule_id HAVING count(molecule.molecule_id) > 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 489, "question": "Which non-carcinogenic molecules consisted more than 5 atoms?", "db_id": "toxicology", "sql": "SELECT T1.molecule_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(T1.molecule_id) > 5", "label": true, "error_types": [] }, { "id": 490, "question": "List all the elements with double bond, consisted in molecule TR024.", "db_id": "toxicology", "sql": "select atom.element from atom inner join bond on atom.molecule_id = bond.molecule_id inner join connected on bond.bond_id = connected.bond_id where bond.bond_type = '= ' and atom.molecule_id = 'TR024'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 491, "question": "List all the elements with double bond, consisted in molecule TR024.", "db_id": "toxicology", "sql": "SELECT T3.element FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T3.atom_id = T1.atom_id WHERE T2.bond_type = '=' AND T2.molecule_id = 'TR024'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 492, "question": "Which carcinogenic molecule have the highest number of atoms consisted in it?", "db_id": "toxicology", "sql": "select molecule.molecule_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+' group by molecule.molecule_id order by count(atom.atom_id) desc limit 1", "label": true, "error_types": [] }, { "id": 493, "question": "How many of the molecules are carcinogenic?", "db_id": "toxicology", "sql": "select count(molecule_id) from molecule where label = '+'", "label": true, "error_types": [] }, { "id": 494, "question": "Among the molecules between TR004 to TR010, how many of them has single bonds?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from molecule inner join bond on molecule.molecule_id = bond.molecule_id where molecule.molecule_id between 'TR004' and 'TR010' and bond.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 495, "question": "Among the molecules between TR004 to TR010, how many of them has single bonds?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id BETWEEN 'TR004' AND 'TR010' AND T2.bond_type = '-'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 496, "question": "In the molecule TR008, how many carbons are present?", "db_id": "toxicology", "sql": "SELECT count(atom_id) FROM atom WHERE molecule_id = 'TR008' AND element = 'c'", "label": true, "error_types": [] }, { "id": 497, "question": "What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic?", "db_id": "toxicology", "sql": "select atom.element from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '-' and atom.atom_id = 'TR004_7'", "label": true, "error_types": [] }, { "id": 498, "question": "What is the total number of molecules with double bonded oxygen?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from atom inner join molecule on atom.molecule_id = molecule.molecule_id inner join bond on atom.molecule_id = bond.molecule_id where bond.bond_type = '= ' and atom.element = 'o'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 499, "question": "What is the total number of molecules with double bonded oxygen?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.molecule_id) 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 T1.element = 'o' AND T3.bond_type = '='", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 500, "question": "in molecules with triple bonds, how many of them are not carcinogenic?", "db_id": "toxicology", "sql": "select count(molecule.molecule_id) from molecule inner join bond on molecule.molecule_id = bond.molecule_id where bond.bond_type = '#' and molecule.label = '-'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 501, "question": "in molecules with triple bonds, how many of them are not carcinogenic?", "db_id": "toxicology", "sql": "SELECT COUNT(DISTINCT T1.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 = '-'", "label": true, "error_types": [] }, { "id": 502, "question": "What is the atom ID of double bonded carbon in TR012 molecule?", "db_id": "toxicology", "sql": "select atom.atom_id from atom inner join connected on atom.atom_id = connected.atom_id inner join bond on bond.bond_id = connected.bond_id inner join molecule on molecule.molecule_id = bond.molecule_id where atom.element = 'c' and bond.bond_type = '= ' and molecule.molecule_id = 'TR012'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 503, "question": "What is the atom ID of double bonded carbon in TR012 molecule?", "db_id": "toxicology", "sql": "SELECT T3.atom_id 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 = '=' AND T3.element = 'c' AND T3.molecule_id = 'TR012'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 504, "question": "List the atom ID of the carcinogenic molecule that contains oxygen?", "db_id": "toxicology", "sql": "select atom.atom_id from atom inner join molecule on atom.molecule_id = molecule.molecule_id where molecule.label = '+' and atom.element = 'o'", "label": true, "error_types": [] }, { "id": 505, "question": "For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format.", "db_id": "card_games", "sql": "select distinct legalities.format from cards inner join legalities on cards.uuid = legalities.uuid where cards.types = 'Artifact' and cards.side is null", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 506, "question": "For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format.", "db_id": "card_games", "sql": "SELECT legalities.status FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.format = 'vintage' AND cards.types = 'Artifact' AND cards.side IS NULL", "label": true, "error_types": [] }, { "id": 507, "question": "List all the card id and artist with unknown power which are legal for commander play format.", "db_id": "card_games", "sql": "select cards.id , cards.artist from cards inner join legalities on cards.uuid = legalities.uuid where legalities.format = 'commander' and legalities.status = 'Legal' and cards.power is null or cards.power = '*'", "label": true, "error_types": [] }, { "id": 508, "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.", "db_id": "card_games", "sql": "select distinct cards.text , rulings.text , cards.hascontentwarning from cards inner join rulings on cards.uuid = rulings.uuid where cards.artist = 'Stephen Daniele'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 509, "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.", "db_id": "card_games", "sql": "SELECT DISTINCT rulings.text, cards.hascontentwarning FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.artist = 'Stephen Daniel'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 510, "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.", "db_id": "card_games", "sql": "SELECT T1.uuid, T2.text, T1.hasContentWarning FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Stephen Daniele'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 511, "question": "Describe the information about rulings for card named 'Sublime Epiphany' with number 74s.", "db_id": "card_games", "sql": "SELECT rulings.text FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.name = 'Sublime Epiphany' AND cards.number = '74s'", "label": true, "error_types": [] }, { "id": 512, "question": "State the alternative languages available for card named Annul numbered 29.", "db_id": "card_games", "sql": "select set_translations.language from cards inner join set_translations on cards.id = set_translations.id where cards.name = 'annul' and cards.number = 29", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 513, "question": "State the alternative languages available for card named Annul numbered 29.", "db_id": "card_games", "sql": "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'", "label": true, "error_types": [] }, { "id": 514, "question": "Name all the cards which have alternative language in Japanese.", "db_id": "card_games", "sql": "select cards.name from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on cards.uuid = foreign_data.uuid where foreign_data.language = 'Japanese'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 515, "question": "Name all the cards which have alternative language in Japanese.", "db_id": "card_games", "sql": "SELECT DISTINCT cards.name FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Japanese' AND cards.isalternative = 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 516, "question": "Name all the cards which have alternative language in Japanese.", "db_id": "card_games", "sql": "SELECT T2.name FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T1.uuid = T2.uuid WHERE T1.language = 'Japanese'", "label": true, "error_types": [] }, { "id": 517, "question": "List all the sets available in Italian translation. State the total number of cards per set.", "db_id": "card_games", "sql": "SELECT T1.name, T1.totalSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Italian'", "label": true, "error_types": [] }, { "id": 518, "question": "How many types of cards does the artist Aaron Boyd illustrated about card art?", "db_id": "card_games", "sql": "select count(types) from cards where artist = 'Aaron Boyd'", "label": true, "error_types": [] }, { "id": 519, "question": "How many types of cards does the artist Aaron Boyd illustrated about card art?", "db_id": "card_games", "sql": "SELECT count(DISTINCT TYPE) FROM cards WHERE artist = 'Aaron Boyd'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 520, "question": "How many types of cards does the artist Aaron Boyd illustrated about card art?", "db_id": "card_games", "sql": "SELECT COUNT(DISTINCT types) FROM cards WHERE artist = 'Aaron Boyd'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 521, "question": "What is the keyword found on card 'Angel of Mercy'?", "db_id": "card_games", "sql": "SELECT keywords FROM cards WHERE name = 'Angel of Mercy'", "label": true, "error_types": [] }, { "id": 522, "question": "How many cards have infinite power?", "db_id": "card_games", "sql": "SELECT count(id) FROM cards WHERE power = '*'", "label": true, "error_types": [] }, { "id": 523, "question": "What type of promotion is of card 'Duress'?", "db_id": "card_games", "sql": "select promotypes from cards where name = 'Duress'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 524, "question": "What is the border color of card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "select bordercolor from cards where name = 'Ancestor''s Chosen'", "label": true, "error_types": [] }, { "id": 525, "question": "What is the border color of card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "SELECT colors FROM cards WHERE name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 526, "question": "What is the type of the card \"Ancestor's Chosen\" as originally printed?", "db_id": "card_games", "sql": "select originaltype from cards where name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 527, "question": "How many cards of legalities whose status is restricted have text boxes?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join legalities on cards.uuid = legalities.uuid where legalities.status = 'Restricted' and cards.istextless = 0", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 528, "question": "What is the description about the ruling of card \"Condemn\"?", "db_id": "card_games", "sql": "select rulings.text from cards inner join rulings on cards.uuid = rulings.uuid where cards.name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 529, "question": "What is the description about the ruling of card \"Condemn\"?", "db_id": "card_games", "sql": "SELECT rulings.text FROM rulings INNER JOIN cards ON rulings.uuid = cards.uuid WHERE cards.name = 'Condemn'", "label": true, "error_types": [] }, { "id": 530, "question": "How many cards of legalities whose status is restricted are found in a starter deck?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join legalities on cards.uuid = legalities.uuid where cards.isstarter = 1 and legalities.status = 'Restricted'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 531, "question": "What is the status of card \"Cloudchaser Eagle\"?", "db_id": "card_games", "sql": "SELECT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Cloudchaser Eagle'", "label": true, "error_types": [] }, { "id": 532, "question": "What is the type of card \"Benalish Knight\"?", "db_id": "card_games", "sql": "select sets.type from cards inner join sets on cards.id = sets.id where cards.name = 'Benalish Knight'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 533, "question": "What is the type of card \"Benalish Knight\"?", "db_id": "card_games", "sql": "SELECT type FROM cards WHERE name = 'Benalish Knight'", "label": true, "error_types": [] }, { "id": 534, "question": "What is the rule of playing card \"Benalish Knight\"?", "db_id": "card_games", "sql": "select legalities.format from cards inner join legalities on cards.uuid = legalities.uuid where cards.name = 'Benalish Knight'", "label": true, "error_types": [] }, { "id": 535, "question": "Please provide the names of the artists who illustrated the card art in Phyrexian.", "db_id": "card_games", "sql": "SELECT DISTINCT cards.artist FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Phyrexian'", "label": true, "error_types": [] }, { "id": 536, "question": "What is the percentage of borderless cards?", "db_id": "card_games", "sql": "SELECT cast(sum(iif(bordercolor = 'borderless', 1, 0)) AS REAL) * 100 / count(id) FROM cards", "label": true, "error_types": [] }, { "id": 537, "question": "How many cards that illusrtated in German have been reprinted?", "db_id": "card_games", "sql": "SELECT count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'German' AND cards.isreprint = 1", "label": true, "error_types": [] }, { "id": 538, "question": "How many borderless cards are illustrated in Russian?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join set_translations on cards.id = set_translations.id where set_translations.language = 'Russian' and cards.bordercolor = 'borderless'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 539, "question": "How many borderless cards are illustrated in Russian?", "db_id": "card_games", "sql": "SELECT COUNT(T1.uuid) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.borderColor = 'borderless' AND T2.language = 'Russian'", "label": true, "error_types": [] }, { "id": 540, "question": "What is the percentage of cards whose language is French among the Story Spotlight cards?", "db_id": "card_games", "sql": "select cast(sum(case when foreign_data.language = 'French' then 1 else 0 end) as real) * 100 / count(cards.id) from cards inner join foreign_data on cards.uuid = foreign_data.uuid where cards.isstoryspotlight = 1", "label": true, "error_types": [] }, { "id": 541, "question": "How many cards are there with toughness of 99?", "db_id": "card_games", "sql": "SELECT count(id) FROM cards WHERE toughness = 99", "label": true, "error_types": [] }, { "id": 542, "question": "Name the cards that were illustrated by Aaron Boyd.", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE artist = 'Aaron Boyd'", "label": true, "error_types": [] }, { "id": 543, "question": "How many black border cards are only available on mtgo?", "db_id": "card_games", "sql": "select count(id) from cards where availability = 'mtgo' and bordercolor = 'black'", "label": true, "error_types": [] }, { "id": 544, "question": "List down all the card IDs with converted mana cost of 0.", "db_id": "card_games", "sql": "SELECT id FROM cards WHERE convertedmanacost = 0", "label": true, "error_types": [] }, { "id": 545, "question": "How many cards with original type of \"Summon - Angel\" have subtype other than \"Angel\"?", "db_id": "card_games", "sql": "select count(id) from cards where originaltype = 'Summon - Angel' and subtypes != 'Angel'", "label": true, "error_types": [] }, { "id": 546, "question": "What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.", "db_id": "card_games", "sql": "select distinct cardkingdomid from cards where cardkingdomfoilid is not null and cardkingdomid = ( select cardkingdomid from cards order by power desc limit 1 )", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 547, "question": "What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.", "db_id": "card_games", "sql": "SELECT cardkingdomid FROM cards WHERE cardkingdomid IS NOT NULL AND cardkingdomfoilid IS NOT NULL", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 548, "question": "What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.", "db_id": "card_games", "sql": "SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL", "label": true, "error_types": [] }, { "id": 549, "question": "What are the cards belong to duel deck a? List the ID.", "db_id": "card_games", "sql": "SELECT id FROM cards WHERE duelDeck = 'a'", "label": true, "error_types": [] }, { "id": 550, "question": "List the edhrecRank for cards with frame version 2015.", "db_id": "card_games", "sql": "SELECT edhrecRank FROM cards WHERE frameVersion = '2015'", "label": true, "error_types": [] }, { "id": 551, "question": "List down the name of artists for cards in Chinese Simplified.", "db_id": "card_games", "sql": "SELECT DISTINCT cards.artist FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Chinese Simplified'", "label": true, "error_types": [] }, { "id": 552, "question": "What are the cards that only available in paper and Japanese language?", "db_id": "card_games", "sql": "select distinct cards.name from cards inner join foreign_data on cards.uuid = foreign_data.uuid where cards.availability = 'paper' and foreign_data.language = 'Japanese'", "label": true, "error_types": [] }, { "id": 553, "question": "What are the cards that only available in paper and Japanese language?", "db_id": "card_games", "sql": "SELECT T1.uuid FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.availability = 'paper' AND T2.language = 'Japanese'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 554, "question": "How many of the banned cards are white border?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join legalities on cards.uuid = legalities.uuid where legalities.status = 'Banned' and cards.bordercolor = 'white'", "label": true, "error_types": [] }, { "id": 555, "question": "Write down the ruling of Beacon of Immortality.", "db_id": "card_games", "sql": "SELECT rulings.text FROM rulings INNER JOIN cards ON rulings.uuid = cards.uuid WHERE cards.name = 'Beacon of Immortality'", "label": true, "error_types": [] }, { "id": 556, "question": "What are the colors of cards from ID 1-20? What are the format of these cards?", "db_id": "card_games", "sql": "select cards.colors , legalities.format from cards inner join legalities on cards.uuid = legalities.uuid where cards.id between 1 and 20", "label": true, "error_types": [] }, { "id": 557, "question": "How many white bordered cards are powerful?", "db_id": "card_games", "sql": "select count(cardkingdomid) from cards where bordercolor = 'white' and cardkingdomfoilid is not null", "label": true, "error_types": [] }, { "id": 558, "question": "How many white bordered cards are powerful?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE borderColor = 'white' AND cardKingdomFoilId = cardKingdomId AND cardKingdomId IS NOT NULL", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 559, "question": "How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1?", "db_id": "card_games", "sql": "SELECT count(id) FROM cards WHERE artist = 'UDON' AND availability = 'mtgo' AND hand = -1", "label": true, "error_types": [] }, { "id": 560, "question": "How many cards with a 1993 frame version and available on paper have a sensitive content warning?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE frameVersion = '1993' AND availability = 'paper' AND hasContentWarning = 1", "label": true, "error_types": [] }, { "id": 561, "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?", "db_id": "card_games", "sql": "select manacost from cards where frameversion = 2003 and availability = 'mtgo' and layout = 'normal' and bordercolor = 'black'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 562, "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?", "db_id": "card_games", "sql": "SELECT manaCost FROM cards WHERE layout = 'normal' AND frameVersion = '2003' AND borderColor = 'black' AND availability IN ('paper', 'mtgo')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 563, "question": "Lists all types of cards available in arena.", "db_id": "card_games", "sql": "select subtypes , supertypes from cards where availability = 'arena'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 564, "question": "Lists the set code of all cards translated into Spanish.", "db_id": "card_games", "sql": "select distinct set_translations.setcode from cards inner join set_translations on cards.setcode = set_translations.setcode inner join foreign_data on cards.uuid = foreign_data.uuid where foreign_data.language = 'Spanish'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 565, "question": "Lists the set code of all cards translated into Spanish.", "db_id": "card_games", "sql": "SELECT DISTINCT cards.setcode FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Spanish'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 566, "question": "Lists the set code of all cards translated into Spanish.", "db_id": "card_games", "sql": "SELECT setCode FROM set_translations WHERE language = 'Spanish'", "label": true, "error_types": [] }, { "id": 567, "question": "What percentage of legendary frame effect cards that are only available in online game variations?", "db_id": "card_games", "sql": "select cast(sum(case when hand = +3 then 1 else 0 end) as real) * 100 / count(id) from cards where frameeffects = 'legendary'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 568, "question": "What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID.", "db_id": "card_games", "sql": "select cast(sum(case when isstoryspotlight = 1 then 1 else 0 end) as real) * 100 / count(id) from cards", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 569, "question": "What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID.", "db_id": "card_games", "sql": "SELECT cast(sum(CASE WHEN istextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / count(id) FROM cards WHERE isstoryspotlight = 1", "label": true, "error_types": [] }, { "id": 570, "question": "Indicates the name of all the languages into which the set whose number of cards is 309 is translated.", "db_id": "card_games", "sql": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.baseSetSize = 309", "label": true, "error_types": [] }, { "id": 571, "question": "Lists all types of cards in German.", "db_id": "card_games", "sql": "select cards.subtypes , cards.supertypes from cards inner join foreign_data on cards.uuid = foreign_data.uuid where foreign_data.language = 'German' and cards.subtypes is not null and cards.supertypes is not null", "label": true, "error_types": [] }, { "id": 572, "question": "Lists all types of cards in German.", "db_id": "card_games", "sql": "SELECT DISTINCT foreign_data.type FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'German' AND (cards.subtypes IS NOT NULL OR cards.supertypes IS NOT NULL)", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 573, "question": "Lists all types of cards in German.", "db_id": "card_games", "sql": "SELECT DISTINCT T2.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 574, "question": "How many unknown power cards contain info about the triggered ability", "db_id": "card_games", "sql": "select count(id) from cards where power is null", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 575, "question": "How many unknown power cards contain info about the triggered ability", "db_id": "card_games", "sql": "SELECT count(id) FROM cards WHERE power IS NULL OR power = '*'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 576, "question": "How many unknown power cards contain info about the triggered ability", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE power IS NULL AND text LIKE '%Triggered ability%'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 577, "question": "Indicates the number of cards with pre-modern format, ruling text \"This is a triggered mana ability.\" that do not have multiple faces.", "db_id": "card_games", "sql": "SELECT count(cards.id) FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE rulings.text = 'This is a triggered mana ability.' AND cards.side IS NULL", "label": true, "error_types": [] }, { "id": 578, "question": "Indicates the number of cards with pre-modern format, ruling text \"This is a triggered mana ability.\" that do not have multiple faces.", "db_id": "card_games", "sql": "SELECT COUNT(T1.uuid) 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", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 579, "question": "Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID.", "db_id": "card_games", "sql": "select cards.id from cards inner join legalities on cards.uuid = legalities.uuid where cards.artist = 'Erica Yang' and cards.availability = 'paper' and legalities.format = 'pauper'", "label": true, "error_types": [] }, { "id": 580, "question": "Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID.", "db_id": "card_games", "sql": "SELECT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Erica Yang' AND T1.availability = 'paper' AND T2.format = 'pauper' AND T2.status = 'legal'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 581, "question": "To which artist does the card with the text \"Das perfekte Gegenmittel zu einer dichten Formation\" belong?", "db_id": "card_games", "sql": "select artist from cards where text = 'Das perfekte Gegenmittel zu einer dichten Formation.'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 582, "question": "How many cards with print rarity have ruling text printed on 01/02/2007?", "db_id": "card_games", "sql": "select count(cards.uuid) from cards inner join rulings on cards.uuid = rulings.uuid where rulings.date = '2009-01-10' and cards.rarity = 'rare'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 583, "question": "What language is the set of 180 cards that belongs to the Ravnica block translated into?", "db_id": "card_games", "sql": "select distinct foreign_data.language from set_translations inner join foreign_data on set_translations.id = foreign_data.id inner join sets on set_translations.setcode = sets.code where sets.block = 'Ravnica' and sets.basesetsize = 180", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 584, "question": "What language is the set of 180 cards that belongs to the Ravnica block translated into?", "db_id": "card_games", "sql": "SELECT set_translations.language FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE sets.basesetsize = 180 AND sets.block = 'Ravnica'", "label": true, "error_types": [] }, { "id": 585, "question": "What percentage of cards with format commander and legal status do not have a content warning?", "db_id": "card_games", "sql": "SELECT cast(sum(CASE WHEN cards.hascontentwarning = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / count(cards.id) FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.format = 'commander' AND legalities.status = 'Legal'", "label": true, "error_types": [] }, { "id": 586, "question": "What percentage of Japanese translated sets are expansion sets?", "db_id": "card_games", "sql": "select cast(sum(case when sets.type = 'expansion' then 1 else 0 end) as real) * 100 / count(set_translations.setcode) from sets inner join set_translations on sets.code = set_translations.setcode", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 587, "question": "What kind of printing is on the card that Daren Bader created?", "db_id": "card_games", "sql": "SELECT availability FROM cards WHERE artist = 'Daren Bader'", "label": true, "error_types": [] }, { "id": 588, "question": "How many color cards with no borders have been ranked higher than 12000 on EDHRec?", "db_id": "card_games", "sql": "select count(id) from cards where edhrecrank > 12000 and bordercolor = 'borderless'", "label": true, "error_types": [] }, { "id": 589, "question": "How many cards are oversized, reprinted, and printed for promotions?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE isOversized = 1 AND isReprint = 1 AND isPromo = 1", "label": true, "error_types": [] }, { "id": 590, "question": "Please list top three unknown power cards that have promotional types for arena league in alphabetical order.", "db_id": "card_games", "sql": "select name from cards where power is null or power like '*' order by promotypes desc limit 3", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 591, "question": "Please list top three unknown power cards that have promotional types for arena league in alphabetical order.", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE (power = '*' OR power IS NULL) AND promoTypes = 'arenaleague' ORDER BY name LIMIT 3", "label": true, "error_types": [] }, { "id": 592, "question": "What is the language of the card with the multiverse number 149934?", "db_id": "card_games", "sql": "select foreign_data.language from cards inner join foreign_data on cards.id = foreign_data.uuid where cards.multiverseid = 149934", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 593, "question": "What is the language of the card with the multiverse number 149934?", "db_id": "card_games", "sql": "SELECT LANGUAGE FROM foreign_data WHERE multiverseid = 149934", "label": true, "error_types": [] }, { "id": 594, "question": "What proportion of cards do not have a text box with a normal layout?", "db_id": "card_games", "sql": "select cast(sum(case when layout = 'normal' then 1 else 0 end) as real) * 100 / count(id) from cards where istextless = 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 595, "question": "What proportion of cards do not have a text box with a normal layout?", "db_id": "card_games", "sql": "SELECT cast(sum(CASE WHEN istextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / count(id) FROM cards", "label": true, "error_types": [] }, { "id": 596, "question": "What proportion of cards do not have a text box with a normal layout?", "db_id": "card_games", "sql": "SELECT CAST(SUM(CASE WHEN isTextless = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS proportion FROM cards WHERE layout = 'normal'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 597, "question": "What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?", "db_id": "card_games", "sql": "select id from cards where side is null and subtypes like 'Angel' or subtypes like 'Wizard'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 598, "question": "What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?", "db_id": "card_games", "sql": "SELECT DISTINCT number FROM cards WHERE side IS NULL AND subtypes = 'Angel, Wizard'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 599, "question": "What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?", "db_id": "card_games", "sql": "SELECT number FROM cards WHERE side IS NULL AND subtypes LIKE '%Angel%' AND subtypes LIKE '%Wizard%'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 600, "question": "Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.", "db_id": "card_games", "sql": "select cards.name , sets.name from cards inner join sets on cards.setcode = sets.code where sets.mtgocode is null or sets.mtgocode = ''", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 601, "question": "Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.", "db_id": "card_games", "sql": "SELECT name FROM sets WHERE mtgoCode = '' OR mtgoCode IS NULL ORDER BY name LIMIT 3", "label": true, "error_types": [] }, { "id": 602, "question": "What languages are available in the set known as Archenemy on the magic card market and having the code ARC?", "db_id": "card_games", "sql": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.mcmName = 'Archenemy' AND T1.code = 'ARC'", "label": true, "error_types": [] }, { "id": 603, "question": "What is the name of set number 5 and its translation?", "db_id": "card_games", "sql": "select sets.name , set_translations.translation from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.id = 5", "label": true, "error_types": [] }, { "id": 604, "question": "What is the name of set number 5 and its translation?", "db_id": "card_games", "sql": "SELECT sets.name, set_translations.translation FROM cards INNER JOIN sets ON cards.setcode = sets.code INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE cards.id = 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 605, "question": "What is the name of set number 5 and its translation?", "db_id": "card_games", "sql": "SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.id = 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 606, "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.", "db_id": "card_games", "sql": "SELECT DISTINCT T1.name, T1.id FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode INNER JOIN foreign_data AS T3 ON T2.uuid = T3.uuid WHERE T1.block = 'Shadowmoor' AND T3.language = 'Italian' ORDER BY T1.name LIMIT 2", "label": true, "error_types": [] }, { "id": 607, "question": "Which Russian set of cards contains the most cards overall?", "db_id": "card_games", "sql": "select cards.name from cards inner join foreign_data on cards.uuid = foreign_data.uuid inner join set_translations on sets.code = set_translations.setcode inner join sets on set_translations.id = sets.code where foreign_data.language = 'Russian' order by sets.basesetsize desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 608, "question": "Which Russian set of cards contains the most cards overall?", "db_id": "card_games", "sql": "SELECT sets.name FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE set_translations.language = 'Russian' ORDER BY sets.basesetsize DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 609, "question": "Which Russian set of cards contains the most cards overall?", "db_id": "card_games", "sql": "SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Russian' ORDER BY T1.baseSetSize DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 610, "question": "What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games?", "db_id": "card_games", "sql": "select cast(sum(case when cards.isonlineonly = 1 then 1 else 0 end) as real) * 100 / count(cards.id) from cards inner join foreign_data on cards.uuid = foreign_data.uuid inner join set_translations on cards.id = set_translations.id where foreign_data.language = 'Chinese Simplified'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 611, "question": "How many sets are available just in Japanese and not in Magic: The Gathering Online?", "db_id": "card_games", "sql": "select count(sets.code) from sets inner join set_translations on sets.code = set_translations.setcode inner join foreign_data on set_translations.id = foreign_data.id where foreign_data.language = 'Japanese' and sets.mtgocode is null or sets.mtgocode = ''", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 612, "question": "How many sets are available just in Japanese and not in Magic: The Gathering Online?", "db_id": "card_games", "sql": "SELECT COUNT(T2.setCode) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '')", "label": true, "error_types": [] }, { "id": 613, "question": "How many card border with black color ? List out the card id.", "db_id": "card_games", "sql": "select count(id) from cards where bordercolor = 'black'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 614, "question": "How many cards have frame effect as extendedart? List out the id of those cards.", "db_id": "card_games", "sql": "select count(id) from cards where frameeffects = 'extendedart'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 615, "question": "How many cards have frame effect as extendedart? List out the id of those cards.", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE frameEffects = 'extendedart' UNION ALL SELECT id FROM cards WHERE frameEffects = 'extendedart'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 616, "question": "Among black card borders, which card has full artwork?", "db_id": "card_games", "sql": "select bordercolor from cards where isfullart = 1 and bordercolor = 'black'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 617, "question": "Among black card borders, which card has full artwork?", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE borderColor = 'black' AND isFullArt = 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 618, "question": "Point out the language of set id \"174\"?", "db_id": "card_games", "sql": "select foreign_data.language from set_translations inner join foreign_data on set_translations.id = foreign_data.id where set_translations.id = 174", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 619, "question": "Point out the language of set id \"174\"?", "db_id": "card_games", "sql": "SELECT LANGUAGE FROM set_translations WHERE id = 174", "label": true, "error_types": [] }, { "id": 620, "question": "Point out the language of set id \"174\"?", "db_id": "card_games", "sql": "SELECT T3.language FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code INNER JOIN set_translations AS T3 ON T2.code = T3.setCode WHERE T1.number = '174'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 621, "question": "List out the set name of the set code \"ALL\".", "db_id": "card_games", "sql": "select distinct sets.name from cards inner join set_translations on cards.id = set_translations.id inner join sets on set_translations.setcode = sets.code where set_translations.setcode = 'ALL'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 622, "question": "List out the set name of the set code \"ALL\".", "db_id": "card_games", "sql": "SELECT name FROM sets WHERE code = 'ALL'", "label": true, "error_types": [] }, { "id": 623, "question": "Which foreign language used by \"A Pedra Fellwar\"?", "db_id": "card_games", "sql": "SELECT language FROM foreign_data WHERE name = 'A Pedra Fellwar'", "label": true, "error_types": [] }, { "id": 624, "question": "Name the foreign name of the card that has boros watermark? List out the type of this card.", "db_id": "card_games", "sql": "select foreign_data.name , foreign_data.type from cards inner join foreign_data on cards.uuid = foreign_data.uuid where cards.watermark = 'boros'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 625, "question": "Name the foreign name of the card that has boros watermark? List out the type of this card.", "db_id": "card_games", "sql": "SELECT foreign_data.name, cards.type FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.watermark = 'boros'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 626, "question": "What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.", "db_id": "card_games", "sql": "select foreign_data.language , foreign_data.flavortext , cards.type from cards inner join foreign_data on cards.uuid = foreign_data.uuid where cards.watermark = 'colorpie'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 627, "question": "What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.", "db_id": "card_games", "sql": "SELECT foreign_data.language, foreign_data.flavortext, cards.types FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.watermark = 'colorpie'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 628, "question": "What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.", "db_id": "card_games", "sql": "SELECT T1.type, T2.language, T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.watermark = 'colorpie'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 629, "question": "Name the foreign name of the card that has abzan watermark? List out the type of this card.", "db_id": "card_games", "sql": "select foreign_data.name , foreign_data.type from cards inner join foreign_data on cards.uuid = foreign_data.uuid where cards.watermark = 'abzan'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 630, "question": "Name the foreign name of the card that has abzan watermark? List out the type of this card.", "db_id": "card_games", "sql": "SELECT foreign_data.name, cards.type FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.watermark = 'abzan'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 631, "question": "Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?", "db_id": "card_games", "sql": "select count(cardkingdomid) from cards where artist = 'Aaron Miller' and cardkingdomfoilid is not null", "label": true, "error_types": [] }, { "id": 632, "question": "Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE artist = 'Aaron Miller' AND cardKingdomFoilId = cardKingdomId AND cardKingdomId IS NOT NULL", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 633, "question": "Please list the names of the cards that have a text box.", "db_id": "card_games", "sql": "select name from cards where istextless = 0", "label": true, "error_types": [] }, { "id": 634, "question": "What's the unconverted mana cost of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "select convertedmanacost from cards where name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 635, "question": "What's the unconverted mana cost of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "SELECT manacost FROM cards WHERE name = 'Ancestor`s Chosen'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 636, "question": "Among the cards with a white border color, how many of them have unknown power?", "db_id": "card_games", "sql": "select count(bordercolor) from cards where bordercolor = 'white' and power = '*'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 637, "question": "Among the cards with a white border color, how many of them have unknown power?", "db_id": "card_games", "sql": "SELECT count(id) FROM cards WHERE power = '*' OR power IS NULL AND bordercolor = 'white'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 638, "question": "Among the cards with a white border color, how many of them have unknown power?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE borderColor = 'white' AND (power = '*' OR power IS NULL)", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 639, "question": "Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.", "db_id": "card_games", "sql": "select name from cards where side is not null and ispromo = ( select ispromo from cards where side != 0 )", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 640, "question": "Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL GROUP BY name", "label": true, "error_types": [] }, { "id": 641, "question": "What's the list of all types for the card \"Molimo, Maro-Sorcerer\"?", "db_id": "card_games", "sql": "select subtypes , supertypes from cards where name = 'Molimo , Maro-Sorcerer'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 642, "question": "What's the list of all types for the card \"Molimo, Maro-Sorcerer\"?", "db_id": "card_games", "sql": "SELECT subtypes, supertypes FROM cards WHERE name = 'Molimo, Maro-Sorcerer'", "label": true, "error_types": [] }, { "id": 643, "question": "Please list the websites where I can purchase the cards that have the promotional type of \"bundle\".", "db_id": "card_games", "sql": "select purchaseurls from cards where promotypes = 'bundle'", "label": true, "error_types": [] }, { "id": 644, "question": "Which card costs more converted mana, \"Serra Angel\" or \"Shrine Keeper\"?", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedmanacost DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 645, "question": "Which artist designed the card whose promotional name is \"Battra, Dark Destroyer\"?", "db_id": "card_games", "sql": "select artist from cards where flavorname = 'Battra , Dark Destroyer'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 646, "question": "Which artist designed the card whose promotional name is \"Battra, Dark Destroyer\"?", "db_id": "card_games", "sql": "SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'", "label": true, "error_types": [] }, { "id": 647, "question": "Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style.", "db_id": "card_games", "sql": "SELECT name FROM cards WHERE frameVersion = '2003' ORDER BY convertedManaCost DESC LIMIT 3", "label": true, "error_types": [] }, { "id": 648, "question": "What's the Italian name of the set of cards with \"Ancestor's Chosen\" is in?", "db_id": "card_games", "sql": "select foreign_data.name from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on set_translations.id = foreign_data.id where cards.name = 'Ancestor''s Chosen' and foreign_data.language = 'Italian'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 649, "question": "What's the Italian name of the set of cards with \"Ancestor's Chosen\" is in?", "db_id": "card_games", "sql": "SELECT foreign_data.name FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Italian' AND cards.name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 650, "question": "What's the Italian name of the set of cards with \"Ancestor's Chosen\" is in?", "db_id": "card_games", "sql": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T1.setCode = T2.setCode WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'", "label": true, "error_types": [] }, { "id": 651, "question": "Please list the names of the cards in the set \"Hauptset Zehnte Edition\".", "db_id": "card_games", "sql": "select cards.name from cards inner join set_translations on cards.setcode = set_translations.setcode where set_translations.translation = 'Hauptset Zehnte Edition'", "label": true, "error_types": [] }, { "id": 652, "question": "Please list the names of the cards in the set \"Hauptset Zehnte Edition\".", "db_id": "card_games", "sql": "SELECT cards.name FROM cards INNER JOIN set_translations ON cards.uuid = set_translations.id WHERE set_translations.translation = 'Hauptset Zehnte Edition'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 653, "question": "For the set of cards with \"Ancestor's Chosen\" in it, is there a Korean version of it?", "db_id": "card_games", "sql": "select distinct set_translations.translation from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on set_translations.id = foreign_data.id where cards.name = 'Ancestor''s Chosen' and foreign_data.language = 'Korean'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 654, "question": "For the set of cards with \"Ancestor's Chosen\" in it, is there a Korean version of it?", "db_id": "card_games", "sql": "SELECT CASE WHEN count(foreign_data.name) > 0 THEN 'YES' ELSE 'NO' END FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Korean' AND cards.name = 'Ancestor''s Chosen'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 655, "question": "Among the cards in the set \"Hauptset Zehnte Edition\", how many of them are designed by Adam Rex?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join set_translations on cards.id = set_translations.id where set_translations.translation = 'Hauptset Zehnte Edition' and cards.artist = 'Adam Rex'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 656, "question": "Among the cards in the set \"Hauptset Zehnte Edition\", how many of them are designed by Adam Rex?", "db_id": "card_games", "sql": "SELECT COUNT(T1.id) FROM set_translations AS T1 INNER JOIN cards AS T2 ON T1.setCode = T2.setCode WHERE T1.translation = 'Hauptset Zehnte Edition' AND T2.artist = 'Adam Rex'", "label": true, "error_types": [] }, { "id": 657, "question": "How many cards are there in the base set of \"Hauptset Zehnte Edition\"?", "db_id": "card_games", "sql": "SELECT T2.baseSetSize FROM set_translations AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T1.translation = 'Hauptset Zehnte Edition'", "label": true, "error_types": [] }, { "id": 658, "question": "What is the Simplified Chinese translation of the name of the set \"Eighth Edition\"?", "db_id": "card_games", "sql": "select set_translations.translation from sets inner join set_translations on sets.code = set_translations.setcode where sets.name = 'Eighth Edition'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 659, "question": "What is the Simplified Chinese translation of the name of the set \"Eighth Edition\"?", "db_id": "card_games", "sql": "SELECT set_translations.translation FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE sets.name = 'Eighth Edition' AND set_translations.language = 'Chinese Simplified'", "label": true, "error_types": [] }, { "id": 660, "question": "Did the set of cards with \"Angel of Mercy\" appear on Magic: The Gathering Online?", "db_id": "card_games", "sql": "select sets.isonlineonly from cards inner join sets on cards.setcode = sets.code where cards.name = 'Angel of Mercy' and sets.mtgocode is not null", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 661, "question": "Did the set of cards with \"Angel of Mercy\" appear on Magic: The Gathering Online?", "db_id": "card_games", "sql": "SELECT iif(sets.mtgocode IS NULL, 'No', 'Yes') FROM sets INNER JOIN cards ON sets.code = cards.setcode WHERE cards.name = 'Angel of Mercy'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 662, "question": "Did the set of cards with \"Angel of Mercy\" appear on Magic: The Gathering Online?", "db_id": "card_games", "sql": "SELECT MAX(CASE WHEN T2.mtgoCode IS NULL THEN 'No' ELSE 'Yes' END) FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T1.name = 'Angel of Mercy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 663, "question": "When was the set of cards with \"Ancestor's Chosen\" released?", "db_id": "card_games", "sql": "select sets.releasedate from sets inner join cards on sets.id = cards.uuid where cards.name like 'Ancestor%s Chosen'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 664, "question": "When was the set of cards with \"Ancestor's Chosen\" released?", "db_id": "card_games", "sql": "SELECT sets.releasedate FROM cards INNER JOIN sets ON cards.setcode = sets.code WHERE cards.name = 'Ancestor''s Chosen'", "label": true, "error_types": [] }, { "id": 665, "question": "What is the expansion type of the set \"Hauptset Zehnte Edition\"?", "db_id": "card_games", "sql": "select distinct sets.type from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.translation = 'Hauptset Zehnte Edition'", "label": true, "error_types": [] }, { "id": 666, "question": "Among the sets in the block \"Ice Age\", how many of them have an Italian translation?", "db_id": "card_games", "sql": "select count(sets.name) from sets inner join set_translations on sets.code = set_translations.setcode where sets.block = 'Ice Age' and set_translations.language = 'Italian'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 667, "question": "Is the set of cards with Adarkar Valkyrie only available outside the United States?", "db_id": "card_games", "sql": "select sets.isforeignonly from cards inner join sets on cards.id = sets.id where cards.name = 'Adarkar Valkyrie'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 668, "question": "Is the set of cards with Adarkar Valkyrie only available outside the United States?", "db_id": "card_games", "sql": "SELECT T2.isForeignOnly FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T1.name = 'Adarkar Valkyrie'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 669, "question": "How many cards in the set Coldsnap have a black border color?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join sets on cards.id = sets.id where cards.bordercolor = 'black' and sets.name = 'Coldsnap'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 670, "question": "How many cards in the set Coldsnap have a black border color?", "db_id": "card_games", "sql": "SELECT count(cards.id) FROM cards INNER JOIN sets ON cards.cardkingdomid = sets.mcmid WHERE sets.name = 'Coldsnap' AND cards.bordercolor = 'black'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 671, "question": "How many cards in the set Coldsnap have a black border color?", "db_id": "card_games", "sql": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T2.name = 'Coldsnap' AND T1.borderColor = 'black'", "label": true, "error_types": [] }, { "id": 672, "question": "Which of these artists have designed a card in the set Coldsnap, Jeremy Jarvis, Aaron Miller or Chippy?", "db_id": "card_games", "sql": "SELECT T2.artist FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode WHERE T1.name = 'Coldsnap' AND T2.artist IN ('Jeremy Jarvis', 'Aaron Miller', 'Chippy')", "label": true, "error_types": [] }, { "id": 673, "question": "What is card number 4 in the set Coldsnap?", "db_id": "card_games", "sql": "select cards.name from cards inner join sets on cards.id = sets.id where cards.number = 4 and sets.name = 'Coldsnap'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 674, "question": "What is card number 4 in the set Coldsnap?", "db_id": "card_games", "sql": "SELECT T2.name FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode WHERE T1.name = 'Coldsnap' AND T2.number = '4'", "label": true, "error_types": [] }, { "id": 675, "question": "Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join sets on cards.id = sets.id where cards.convertedmanacost > 5 and cards.power is null or cards.power = '*' and sets.name = 'Coldsnap'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" } ] }, { "id": 676, "question": "Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?", "db_id": "card_games", "sql": "SELECT count(cards.id) FROM cards INNER JOIN sets ON cards.uuid = sets.tcgplayergroupid WHERE sets.name = 'Coldsnap' AND cards.convertedmanacost > 5 AND (cards.power = '*' OR cards.power IS NULL)", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 677, "question": "Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?", "db_id": "card_games", "sql": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5 AND (T1.power = '*' OR T1.power IS NULL)", "label": true, "error_types": [] }, { "id": 678, "question": "What is the Italian flavor text of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "select foreign_data.flavortext from cards inner join foreign_data on cards.id = foreign_data.uuid where cards.name = 'Ancestor''s Chosen' and foreign_data.language = 'Italian'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 679, "question": "What is the Italian flavor text of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "SELECT foreign_data.flavortext FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Italian' AND cards.name = 'Ancestor''s Chosen'", "label": true, "error_types": [] }, { "id": 680, "question": "Please list all the foreign languages in which the card \"Ancestor's Chosen\" has a flavor text.", "db_id": "card_games", "sql": "select distinct foreign_data.language from cards inner join foreign_data on cards.id = foreign_data.id where cards.name = 'Ancestor''s Chosen' and cards.flavortext is not null", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 681, "question": "Please list all the foreign languages in which the card \"Ancestor's Chosen\" has a flavor text.", "db_id": "card_games", "sql": "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 T2.flavorText IS NOT NULL", "label": true, "error_types": [] }, { "id": 682, "question": "What's the German type of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "select set_translations.translation from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on set_translations.id = foreign_data.id where cards.name like 'Ancestor%s Chosen' and foreign_data.language = 'German'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 683, "question": "What's the German type of the card \"Ancestor's Chosen\"?", "db_id": "card_games", "sql": "SELECT T2.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'German'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 684, "question": "Please list the Italian text ruling of all the cards in the set Coldsnap.", "db_id": "card_games", "sql": "select rulings.text from rulings inner join set_translations on rulings.id = set_translations.id where set_translations.language = 'Italian' and set_translations.translation = 'Coldsnap'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 685, "question": "Please list the Italian text ruling of all the cards in the set Coldsnap.", "db_id": "card_games", "sql": "SELECT T3.text FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code INNER JOIN foreign_data AS T3 ON T1.uuid = T3.uuid WHERE T2.name = 'Coldsnap' AND T3.language = 'Italian'", "label": true, "error_types": [] }, { "id": 686, "question": "When was the ruling for the card 'Reminisce' created?", "db_id": "card_games", "sql": "SELECT rulings.date FROM rulings INNER JOIN cards ON rulings.uuid = cards.uuid WHERE cards.name = 'Reminisce'", "label": true, "error_types": [] }, { "id": 687, "question": "What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap?", "db_id": "card_games", "sql": "SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.convertedManaCost) AS percentage FROM cards AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T2.name = 'Coldsnap'", "label": true, "error_types": [] }, { "id": 688, "question": "What is the percentage of incredibly powerful cards in the set Coldsnap?", "db_id": "card_games", "sql": "select cast(sum(case when cards.power is not null then 1 else 0 end) as real) * 100 / count(cards.power) from cards inner join sets on cards.cardkingdomid = sets.id where sets.name = 'Coldsnap' and cards.cardkingdomid is not null", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 689, "question": "What is the percentage of incredibly powerful cards in the set Coldsnap?", "db_id": "card_games", "sql": "SELECT cast(sum(CASE WHEN cards.cardkingdomid IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / count(cards.id) FROM cards INNER JOIN sets ON cards.setcode = sets.code WHERE sets.name = 'Coldsnap'", "label": true, "error_types": [] }, { "id": 690, "question": "What is the percentage of incredibly powerful cards in the set Coldsnap?", "db_id": "card_games", "sql": "SELECT CAST(SUM(CASE WHEN T2.cardKingdomFoilId = T2.cardKingdomId AND T2.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS percentage FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode WHERE T1.name = 'Coldsnap'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 691, "question": "What's the code for the set which was released on 2017/7/14?", "db_id": "card_games", "sql": "SELECT code FROM sets WHERE releaseDate = '2017-07-14'", "label": true, "error_types": [] }, { "id": 692, "question": "List the keyrune code for the set whose code is 'PKHC'.", "db_id": "card_games", "sql": "select sets.keyrunecode from sets inner join set_translations on sets.code = set_translations.setcode where sets.code = 'PKHC'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 693, "question": "List the keyrune code for the set whose code is 'PKHC'.", "db_id": "card_games", "sql": "SELECT keyrunecode FROM sets WHERE code = 'PKHC'", "label": true, "error_types": [] }, { "id": 694, "question": "For the set which had 'SS2' as the code, what is its magic card market id?", "db_id": "card_games", "sql": "select cards.mcmid from cards inner join sets on cards.mcmid = sets.mcmid where sets.code = 'SS2'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 695, "question": "For the set which had 'SS2' as the code, what is its magic card market id?", "db_id": "card_games", "sql": "SELECT mcmId FROM sets WHERE code = 'SS2'", "label": true, "error_types": [] }, { "id": 696, "question": "What's the magic card market name for the set which was released on 2017/6/9?", "db_id": "card_games", "sql": "SELECT mcmname FROM sets WHERE releasedate = '2017-06-09'", "label": true, "error_types": [] }, { "id": 697, "question": "For the set \"From the Vault: Lore\", what is its expansion type?", "db_id": "card_games", "sql": "SELECT type FROM sets WHERE name = 'From the Vault: Lore'", "label": true, "error_types": [] }, { "id": 698, "question": "For the set \"Commander 2014 Oversized\" , give its parent code.", "db_id": "card_games", "sql": "select sets.parentcode from sets inner join set_translations on sets.code = set_translations.setcode where sets.name = 'Commander 2014 Oversized'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 699, "question": "For the set \"Commander 2014 Oversized\" , give its parent code.", "db_id": "card_games", "sql": "SELECT parentcode FROM sets WHERE name = 'Commander 2014 Oversized'", "label": true, "error_types": [] }, { "id": 700, "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.", "db_id": "card_games", "sql": "select rulings.text , cards.hascontentwarning from rulings inner join cards on rulings.uuid = cards.uuid where cards.artist = 'Jim Pavelec'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 701, "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.", "db_id": "card_games", "sql": "SELECT T1.hasContentWarning, T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Jim Pavelec'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 702, "question": "What was the release date for the set which card \"Evacuation\" in it?", "db_id": "card_games", "sql": "SELECT sets.releasedate FROM cards INNER JOIN sets ON cards.setcode = sets.code WHERE cards.name = 'Evacuation'", "label": true, "error_types": [] }, { "id": 703, "question": "What is the number of cards are there in the set of \"Rinascita di Alara\"?", "db_id": "card_games", "sql": "select sets.basesetsize from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.translation = 'Rinascita di Alara'", "label": true, "error_types": [] }, { "id": 704, "question": "List the expansion type of the set \"Huitième édition\".", "db_id": "card_games", "sql": "select distinct sets.type from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.translation = 'Huitième édition'", "label": true, "error_types": [] }, { "id": 705, "question": "What's the French name of the set of cards with \"Tendo Ice Bridge\" is in?", "db_id": "card_games", "sql": "select set_translations.translation from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on set_translations.id = foreign_data.id where cards.name = 'Tendo Ice Bridge' and foreign_data.language = 'French'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 706, "question": "What's the French name of the set of cards with \"Tendo Ice Bridge\" is in?", "db_id": "card_games", "sql": "SELECT set_translations.translation FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode INNER JOIN cards ON sets.code = cards.setcode WHERE cards.name = 'Tendo Ice Bridge' AND set_translations.language = 'French'", "label": true, "error_types": [] }, { "id": 707, "question": "How many translations of the name of the set \"Tenth Edition\"?", "db_id": "card_games", "sql": "select count(set_translations.translation) from sets inner join set_translations on sets.code = set_translations.setcode where sets.name = 'Salvat 2011' and set_translations.translation is not null", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 708, "question": "Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.", "db_id": "card_games", "sql": "select cards.name from cards inner join sets on cards.id = sets.id where sets.name = 'Journey into Nyx Hero''s Path' order by cards.convertedmanacost desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 709, "question": "Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.", "db_id": "card_games", "sql": "SELECT cards.name FROM cards INNER JOIN sets ON cards.uuid = sets.code WHERE sets.name = 'Journey into Nyx Hero''s Path' ORDER BY cards.convertedmanacost DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 710, "question": "Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.", "db_id": "card_games", "sql": "SELECT T2.name FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode WHERE T1.name = 'Journey into Nyx Hero''s Path' ORDER BY T2.convertedManaCost DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 711, "question": "What is the release date for the set \"Ola de frío\"?", "db_id": "card_games", "sql": "select sets.releasedate from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.translation = 'Ola de fro'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 712, "question": "What is the release date for the set \"Ola de frío\"?", "db_id": "card_games", "sql": "SELECT sets.releasedate FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE set_translations.translation = 'Ola de frío'", "label": true, "error_types": [] }, { "id": 713, "question": "What was the expansion type for the set which card \"Samite Pilgrim\" in it?", "db_id": "card_games", "sql": "SELECT DISTINCT sets.type FROM cards INNER JOIN sets ON cards.setcode = sets.code WHERE cards.name = 'Samite Pilgrim'", "label": true, "error_types": [] }, { "id": 714, "question": "How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.", "db_id": "card_games", "sql": "select count(cards.id) from cards inner join sets on cards.id = sets.id where sets.name = 'World Championship Decks 2004' and cards.convertedmanacost = 3", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 715, "question": "How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.", "db_id": "card_games", "sql": "SELECT COUNT(T2.id) FROM sets AS T1 INNER JOIN cards AS T2 ON T1.code = T2.setCode WHERE T1.name = 'World Championship Decks 2004' AND T2.convertedManaCost = 3", "label": true, "error_types": [] }, { "id": 716, "question": "Show the Simplified Chinese translation of the name of the set \"Mirrodin\"?", "db_id": "card_games", "sql": "select set_translations.translation from sets inner join set_translations on sets.code = set_translations.setcode where sets.name = 'Mirrodin' and set_translations.language = 'Chinese Simplified'", "label": true, "error_types": [] }, { "id": 717, "question": "For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?", "db_id": "card_games", "sql": "select cast(sum(case when cards.hasnonfoil = 1 then 1 else 0 end) as real) * 100 / count(cards.id) from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on cards.uuid = foreign_data.uuid where set_translations.language = 'Japanese'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 718, "question": "For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?", "db_id": "card_games", "sql": "SELECT cast(sum(CASE WHEN sets.isnonfoilonly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid INNER JOIN sets ON cards.setcode = sets.code WHERE foreign_data.language = 'Japanese'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 719, "question": "For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?", "db_id": "card_games", "sql": "SELECT CAST(SUM(CASE WHEN T2.isNonFoilOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.setCode) AS percentage FROM set_translations AS T1 INNER JOIN sets AS T2 ON T1.setCode = T2.code WHERE T1.language = 'Japanese'", "label": true, "error_types": [] }, { "id": 720, "question": "For all the set of cards that has Brazil Portuguese translation, what is the percentage of them are only available online?", "db_id": "card_games", "sql": "select cast(sum(case when cards.isonlineonly = 1 then 1 else 0 end) as real) * 100 / count(cards.id) from cards inner join set_translations on cards.id = set_translations.id inner join foreign_data on cards.uuid = foreign_data.uuid where set_translations.language = 'Portuguese (Brazil)'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 721, "question": "What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot?", "db_id": "card_games", "sql": "select printings from cards where artist = 'Aleksi Briclot' and istextless = 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 722, "question": "What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot?", "db_id": "card_games", "sql": "SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND istextless = 1", "label": true, "error_types": [] }, { "id": 723, "question": "What is the unique id of the set that has the highest number of cards?", "db_id": "card_games", "sql": "select cards.uuid from cards inner join sets on cards.uuid = sets.id order by sets.basesetsize desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 724, "question": "What is the unique id of the set that has the highest number of cards?", "db_id": "card_games", "sql": "SELECT id FROM sets ORDER BY basesetsize DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 725, "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?", "db_id": "card_games", "sql": "select artist from cards where side is null order by faceconvertedmanacost desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 726, "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?", "db_id": "card_games", "sql": "SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 727, "question": "What is the most common visual frame effects among the incredibly powerful foils?", "db_id": "card_games", "sql": "select frameeffects from cards where cardkingdomfoilid is not null group by frameeffects order by count(frameeffects) desc limit 1", "label": true, "error_types": [] }, { "id": 728, "question": "How many cards with unknown power that can't be found in foil is in duel deck A?", "db_id": "card_games", "sql": "select count(dueldeck) from cards where dueldeck = 'a' and hasfoil = 0 and power is null or power = '*'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 729, "question": "How many cards with unknown power that can't be found in foil is in duel deck A?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE duelDeck = 'a' AND hasFoil = 0 AND (power = '*' OR power IS NULL)", "label": true, "error_types": [] }, { "id": 730, "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.", "db_id": "card_games", "sql": "select name from sets where type = 'commander' order by totalsetsize desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 731, "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.", "db_id": "card_games", "sql": "SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 732, "question": "In duels, what are the top 10 cards with the highest uncoverted mana cost?", "db_id": "card_games", "sql": "select cards.name from cards inner join legalities on cards.uuid = legalities.uuid where legalities.format = 'duel' order by cards.manacost desc limit 10", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 733, "question": "When was the oldest mythic card released and what are its legal play formats?", "db_id": "card_games", "sql": "select cards.originalreleasedate , legalities.format from cards inner join legalities on cards.uuid = legalities.uuid where cards.rarity = 'mythic' and legalities.status = 'Legal' order by cards.originalreleasedate asc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 734, "question": "How many cards did Volkan Baǵa illustrated whose foreign language is in French?", "db_id": "card_games", "sql": "select count(cards.artist) from cards inner join foreign_data on cards.uuid = foreign_data.uuid where foreign_data.language = 'French' and cards.artist = 'Volkan Baga'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 735, "question": "How many cards did Volkan Baǵa illustrated whose foreign language is in French?", "db_id": "card_games", "sql": "SELECT COUNT(T1.uuid) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Volkan Baǵa' AND T2.language = 'French'", "label": true, "error_types": [] }, { "id": 736, "question": "How many rare enchantment Abundance cards are there whose play format status are all legal?", "db_id": "card_games", "sql": "SELECT count(cards.name) FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.status = 'Legal' AND cards.name = 'Abundance' AND cards.types = 'Enchantment' AND cards.rarity = 'rare'", "label": true, "error_types": [] }, { "id": 737, "question": "How many rare enchantment Abundance cards are there whose play format status are all legal?", "db_id": "card_games", "sql": "SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Abundance' AND T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.uuid NOT IN (SELECT T3.uuid FROM legalities AS T3 WHERE T3.status != 'Legal')", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 738, "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.", "db_id": "card_games", "sql": "select legalities.format , cards.name from legalities inner join cards on legalities.uuid = cards.uuid where legalities.status = 'Banned' group by legalities.format , cards.name order by count(legalities.status) desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" } ] }, { "id": 739, "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.", "db_id": "card_games", "sql": "SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Banned' GROUP BY T2.format ORDER BY COUNT(T2.status) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Partial Query" } ] }, { "id": 740, "question": "Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated.", "db_id": "card_games", "sql": "select cards.artist , legalities.format from cards inner join legalities on cards.uuid = legalities.uuid order by cards.artist asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 741, "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?", "db_id": "card_games", "sql": "SELECT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.frameVersion = '1997' AND T1.artist = 'D. Alexander Gregory' AND T1.hasContentWarning = 1 AND T2.format = 'legacy'", "label": true, "error_types": [] }, { "id": 742, "question": "Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.", "db_id": "card_games", "sql": "SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned'", "label": true, "error_types": [] }, { "id": 743, "question": "List the artists who illustrated cards with black borders which are available only in arena.", "db_id": "card_games", "sql": "SELECT artist FROM cards WHERE bordercolor = 'black' AND availability = 'arena'", "label": true, "error_types": [] }, { "id": 744, "question": "Find the uuid of cards in which the old school format is restricted or banned.", "db_id": "card_games", "sql": "select distinct legalities.uuid from legalities inner join cards on legalities.uuid = cards.uuid where legalities.format = 'oldschool' and legalities.status = 'Banned' or legalities.status = 'Restricted'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 745, "question": "Find the uuid of cards in which the old school format is restricted or banned.", "db_id": "card_games", "sql": "SELECT T1.uuid FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'oldschool' AND T2.status IN ('Banned', 'Restricted')", "label": true, "error_types": [] }, { "id": 746, "question": "Among the card designed by Matthew D. Wilson, how many are available only in the paper?", "db_id": "card_games", "sql": "SELECT COUNT(id) FROM cards WHERE artist = 'Matthew D. Wilson' AND availability = 'paper'", "label": true, "error_types": [] }, { "id": 747, "question": "What are the rulings for the card named and designed by Kev Walker? List them in descending order of dates.", "db_id": "card_games", "sql": "SELECT rulings.text FROM rulings INNER JOIN cards ON rulings.uuid = cards.uuid WHERE cards.artist = 'Kev Walker' ORDER BY rulings.date DESC", "label": true, "error_types": [] }, { "id": 748, "question": "List the names of all the cards in the set Hour of Devastation and find the formats in which these cards are legal.", "db_id": "card_games", "sql": "SELECT cards.name, legalities.format FROM legalities INNER JOIN cards ON legalities.uuid = cards.uuid INNER JOIN sets ON cards.setcode = sets.code WHERE sets.name = 'Hour of Devastation' AND legalities.status = 'Legal'", "label": true, "error_types": [] }, { "id": 749, "question": "Find and list the names of sets which doesn't have Japanese translation but have Korean translation.", "db_id": "card_games", "sql": "select sets.name from sets inner join set_translations on sets.code = set_translations.setcode where set_translations.language not like '%Japanese%' and set_translations.translation = ( select translation from set_translations inner join foreign_data on set_translations.language = foreign_data.language where foreign_data.language != 'Japanese%' )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" } ] }, { "id": 750, "question": "Find and list the names of sets which doesn't have Japanese translation but have Korean translation.", "db_id": "card_games", "sql": "SELECT DISTINCT sets.name FROM sets INNER JOIN set_translations ON sets.code = set_translations.setcode WHERE set_translations.language = 'Korean' AND set_translations.language NOT LIKE '%Japanese%'", "label": true, "error_types": [] }, { "id": 751, "question": "Which user has a higher reputation, Harlan or Jarrod Dixon?", "db_id": "codebase_community", "sql": "SELECT displayname FROM users WHERE displayname IN ('Harlan', 'Jarrod Dixon') ORDER BY reputation DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 752, "question": "Please list the display names of all the users whose accounts were created in the year 2011.", "db_id": "codebase_community", "sql": "select displayname from users where strftime('%Y' , creationdate) = '2014'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 753, "question": "How many users last accessed the website after 2014/9/1?", "db_id": "codebase_community", "sql": "select count(id) from users where lastaccessdate >= '2014-09-01 00:00:00'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 754, "question": "What is the display name of the user who has the most number of views?", "db_id": "codebase_community", "sql": "SELECT displayname FROM users ORDER BY views DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 755, "question": "Among the users who have more than 100 upvotes, how many of them have more then 1 downvotes?", "db_id": "codebase_community", "sql": "SELECT count(id) FROM users WHERE upvotes > 100 AND downvotes > 1", "label": true, "error_types": [] }, { "id": 756, "question": "How many users with more than 10 views created their account after the year 2013?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM users WHERE STRFTIME('%Y', CreationDate) > '2013' AND Views > 10", "label": true, "error_types": [] }, { "id": 757, "question": "How many posts does the user csgillespie own?", "db_id": "codebase_community", "sql": "SELECT COUNT(T2.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'csgillespie'", "label": true, "error_types": [] }, { "id": 758, "question": "Please list the titles of the posts owned by the user csgillespie?", "db_id": "codebase_community", "sql": "select posts.title from posts inner join users on posts.owneruserid = users.id where users.displayname = 'csgillespie'", "label": true, "error_types": [] }, { "id": 759, "question": "Who is the owner of the post \"Eliciting priors from experts\"?", "db_id": "codebase_community", "sql": "select users.displayname from posts inner join users on posts.owneruserid = users.id where posts.title = 'Eliciting priors from experts'", "label": true, "error_types": [] }, { "id": 760, "question": "Who is the owner of the post \"Eliciting priors from experts\"?", "db_id": "codebase_community", "sql": "SELECT ownerdisplayname FROM posts WHERE title = 'Eliciting priors from experts'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 761, "question": "What is the title of the post that is owned by csgillespie and has the highest popularity?", "db_id": "codebase_community", "sql": "SELECT posts.title FROM posts INNER JOIN users ON posts.owneruserid = users.id WHERE users.displayname = 'csgillespie' ORDER BY posts.viewcount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 762, "question": "What is the display name of the user who is the owner of the most valuable post?", "db_id": "codebase_community", "sql": "select ownerdisplayname from posts where favoritecount = ( select max(favoritecount) from posts )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 763, "question": "What is the display name of the user who is the owner of the most valuable post?", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.FavoriteCount IS NOT NULL ORDER BY T1.FavoriteCount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 764, "question": "What is the total number of comments of all the posts owned by csgillespie?", "db_id": "codebase_community", "sql": "select sum(posts.commentcount) from users inner join posts on users.id = posts.owneruserid inner join comments on posts.id = comments.postid where users.displayname = 'csgillespie'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 765, "question": "What is the total number of comments of all the posts owned by csgillespie?", "db_id": "codebase_community", "sql": "SELECT SUM(T2.CommentCount) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'csgillespie'", "label": true, "error_types": [] }, { "id": 766, "question": "For the post that got the most number of answers owned by csgillespie, how many answers did it get?", "db_id": "codebase_community", "sql": "select posts.answercount from posts inner join users on posts.owneruserid = users.id where users.displayname = 'csgillespie' order by posts.answercount desc limit 1", "label": true, "error_types": [] }, { "id": 767, "question": "For the post that got the most number of answers owned by csgillespie, how many answers did it get?", "db_id": "codebase_community", "sql": "SELECT answercount FROM posts WHERE ownerdisplayname = 'csgillespie' ORDER BY answercount DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 768, "question": "What is the display name of the user who last edited the post \"Examples for teaching: Correlation does not mean causation\"?", "db_id": "codebase_community", "sql": "select users.displayname from posts inner join users on posts.lasteditoruserid = users.id where posts.title = 'Examples for teaching: Correlation does not mean causation'", "label": true, "error_types": [] }, { "id": 769, "question": "What is the display name of the user who last edited the post \"Examples for teaching: Correlation does not mean causation\"?", "db_id": "codebase_community", "sql": "SELECT lasteditoruserid FROM posts WHERE title = 'Examples for teaching: Correlation does not mean causation'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 770, "question": "Among the posts owned by csgillespie, how many of them are root posts?", "db_id": "codebase_community", "sql": "select count(posts.parentid) from posts inner join users on posts.owneruserid = users.id where users.displayname = 'csgillespie' and posts.parentid is null", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 771, "question": "Among the posts owned by csgillespie, how many of them are root posts?", "db_id": "codebase_community", "sql": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'csgillespie' AND T2.ParentId IS NULL", "label": true, "error_types": [] }, { "id": 772, "question": "Please list the display names of all the users who owns a post that is well-finished.", "db_id": "codebase_community", "sql": "SELECT DISTINCT users.displayname FROM posts INNER JOIN users ON posts.owneruserid = users.id WHERE posts.closeddate IS NOT NULL", "label": true, "error_types": [] }, { "id": 773, "question": "Among the posts owned by an elder user, how many of them have a score of over 19?", "db_id": "codebase_community", "sql": "select count(posts.owneruserid) from posts inner join comments on posts.id = comments.postid inner join users on posts.owneruserid = users.id where posts.score >= 19 and users.age > 65", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 774, "question": "Among the posts owned by an elder user, how many of them have a score of over 19?", "db_id": "codebase_community", "sql": "SELECT count(posts.id) FROM posts INNER JOIN users ON posts.owneruserid = users.id WHERE users.age > 65 AND posts.score > 19", "label": true, "error_types": [] }, { "id": 775, "question": "What is the location of the owner of the post \"Eliciting priors from experts\"?", "db_id": "codebase_community", "sql": "SELECT T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'", "label": true, "error_types": [] }, { "id": 776, "question": "From which post is the tag \"bayesian\" excerpted from? Please give the body of the post.", "db_id": "codebase_community", "sql": "SELECT T2.Body FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id WHERE T1.TagName = 'bayesian'", "label": true, "error_types": [] }, { "id": 777, "question": "From which post is the most popular tag excerpted from? Please give the body of the post.", "db_id": "codebase_community", "sql": "SELECT T2.Body FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id ORDER BY T1.Count DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 778, "question": "How many badges has the user csgillespie obtained?", "db_id": "codebase_community", "sql": "SELECT count(badges.name) FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'csgillespie'", "label": true, "error_types": [] }, { "id": 779, "question": "Please list the names of the badges obtained by csgillespie.", "db_id": "codebase_community", "sql": "SELECT badges.name FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'csgillespie'", "label": true, "error_types": [] }, { "id": 780, "question": "Among the badges obtained by csgillespie, how many of them were obtained in the year 2011?", "db_id": "codebase_community", "sql": "select count(badges.userid) from users inner join badges on users.id = badges.userid where users.displayname = 'csgillespie' and badges.date = '2011'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 781, "question": "Among the badges obtained by csgillespie, how many of them were obtained in the year 2011?", "db_id": "codebase_community", "sql": "SELECT count(users.id) FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'csgillespie' AND strftime('%Y', badges.date) = '2011'", "label": true, "error_types": [] }, { "id": 782, "question": "What is the display name of the user who has obtained the most number of badges?", "db_id": "codebase_community", "sql": "SELECT users.displayname FROM users INNER JOIN badges ON users.id = badges.userid GROUP BY users.displayname ORDER BY count(badges.id) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 783, "question": "What is the average score of the posts owned by the user csgillespie?", "db_id": "codebase_community", "sql": "select avg(posts.score) from users inner join posts on users.id = posts.owneruserid inner join comments on posts.id = comments.postid where users.displayname = 'csgillespie'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 784, "question": "What is the average score of the posts owned by the user csgillespie?", "db_id": "codebase_community", "sql": "SELECT avg(posts.score) FROM users INNER JOIN posts ON users.id = posts.owneruserid WHERE users.displayname = 'csgillespie'", "label": true, "error_types": [] }, { "id": 785, "question": "What is the average number of badges obtained by a user with over 200 views?", "db_id": "codebase_community", "sql": "select cast(count(badges.id) as real) / count(distinct users.displayname) from users inner join badges on users.id = badges.userid where users.views > 200", "label": true, "error_types": [] }, { "id": 786, "question": "Among the posts with a score of over 5, what is the percentage of them being owned by an elder user?", "db_id": "codebase_community", "sql": "select cast(sum(case when users.age > 65 then 1 else 0 end) as real) * 100 / count(posts.owneruserid) from posts inner join comments on posts.id = comments.postid inner join users on posts.owneruserid = users.id where posts.score > 20", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 787, "question": "How many votes did the user No.58 take on 2010/7/19?", "db_id": "codebase_community", "sql": "select count(votes.userid) from users inner join votes on users.id = votes.userid where users.id = 58 and votes.creationdate = '2010-07-19'", "label": true, "error_types": [] }, { "id": 788, "question": "Indicate the creation date of the maximum number of votes.", "db_id": "codebase_community", "sql": "SELECT creationdate FROM votes GROUP BY creationdate ORDER BY count(id) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 789, "question": "Give the number of \"Revival\" badges.", "db_id": "codebase_community", "sql": "SELECT count(id) FROM badges WHERE name = 'Revival'", "label": true, "error_types": [] }, { "id": 790, "question": "What is the title for the post which got the highest score comment?", "db_id": "codebase_community", "sql": "SELECT T2.Title FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.Score IS NOT NULL ORDER BY T1.Score DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 791, "question": "For the post which got 1910 view counts, how many comments does it get?", "db_id": "codebase_community", "sql": "SELECT answercount FROM posts WHERE viewcount = 1910", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 792, "question": "For the post which got 1910 view counts, how many comments does it get?", "db_id": "codebase_community", "sql": "SELECT CommentCount FROM posts WHERE ViewCount = 1910", "label": true, "error_types": [] }, { "id": 793, "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?", "db_id": "codebase_community", "sql": "SELECT posts.favoritecount FROM posts INNER JOIN comments ON posts.id = comments.postid WHERE comments.userid = 3025 AND comments.creationdate LIKE '2014-04-23 20:29:39'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 794, "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?", "db_id": "codebase_community", "sql": "SELECT T2.FavoriteCount FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 3025 AND T1.CreationDate = '2014-04-23 20:29:39.0'", "label": true, "error_types": [] }, { "id": 795, "question": "Give the only one comment text of the post with parent id 107829.", "db_id": "codebase_community", "sql": "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", "label": true, "error_types": [] }, { "id": 796, "question": "For the owner user of post No. 65041, what is his/her reputation points?", "db_id": "codebase_community", "sql": "SELECT T2.Reputation FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Id = 65041", "label": true, "error_types": [] }, { "id": 797, "question": "For the user with the display name of \"Tiago Pasqualini\", how many posts did he/she own?", "db_id": "codebase_community", "sql": "select count(posts.owneruserid) from users inner join posts on users.id = posts.owneruserid inner join posthistory on posts.id = posthistory.postid where users.displayname = 'Tiago Pasqualini'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 798, "question": "For the user with the display name of \"Tiago Pasqualini\", how many posts did he/she own?", "db_id": "codebase_community", "sql": "SELECT COUNT(T2.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Tiago Pasqualini'", "label": true, "error_types": [] }, { "id": 799, "question": "Provide the display name of the user who made the vote No.6347.", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName FROM votes AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Id = 6347", "label": true, "error_types": [] }, { "id": 800, "question": "Give the number of votes for the post about data visualization.", "db_id": "codebase_community", "sql": "select sum(votes.id) from posts inner join votes on posts.id = votes.postid where posts.title like '%data visualization%'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 801, "question": "Give the number of votes for the post about data visualization.", "db_id": "codebase_community", "sql": "SELECT sum(votes.bountyamount) FROM votes INNER JOIN posts ON votes.postid = posts.id WHERE posts.title LIKE '%data visualization%'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 802, "question": "Give the number of votes for the post about data visualization.", "db_id": "codebase_community", "sql": "SELECT COUNT(T2.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data visualization%'", "label": true, "error_types": [] }, { "id": 803, "question": "For the user whose display name is \"DatEpicCoderGuyWhoPrograms\", what is his/her badge's name?", "db_id": "codebase_community", "sql": "SELECT badges.name FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'DatEpicCoderGuyWhoPrograms'", "label": true, "error_types": [] }, { "id": 804, "question": "How many views did the post titled 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer' get?", "db_id": "codebase_community", "sql": "SELECT posts.viewcount FROM posts INNER JOIN users ON posts.owneruserid = users.id WHERE posts.title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'", "label": true, "error_types": [] }, { "id": 805, "question": "Write the contents of comments with a score of 17.", "db_id": "codebase_community", "sql": "SELECT text FROM comments WHERE score = 17", "label": true, "error_types": [] }, { "id": 806, "question": "Which user has the website URL listed at 'http://stackoverflow.com'", "db_id": "codebase_community", "sql": "select displayname from users where websiteurl = 'http://stackoverflow.com/u/1114'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 807, "question": "Which user has the website URL listed at 'http://stackoverflow.com'", "db_id": "codebase_community", "sql": "SELECT displayname FROM users WHERE websiteurl = 'http://stackoverflow.com'", "label": true, "error_types": [] }, { "id": 808, "question": "What is the badge name that user 'SilentGhost' obtained?", "db_id": "codebase_community", "sql": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'SilentGhost'", "label": true, "error_types": [] }, { "id": 809, "question": "Name the user that commented 'thank you user93!'", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'thank you user93!'", "label": true, "error_types": [] }, { "id": 810, "question": "Write all comments made by user 'A Lion.'", "db_id": "codebase_community", "sql": "select comments.text from users inner join comments on users.id = comments.userid where users.displayname = 'A Lion'", "label": true, "error_types": [] }, { "id": 811, "question": "Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user?", "db_id": "codebase_community", "sql": "select users.displayname , sum(users.reputation) from posts inner join comments on posts.id = comments.postid inner join posthistory on comments.userid = posthistory.userid inner join users on posts.owneruserid = users.id where posts.title = 'Understanding what Dassault iSight is doing?'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 812, "question": "Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user?", "db_id": "codebase_community", "sql": "SELECT users.displayname, users.reputation FROM posts INNER JOIN users ON posts.owneruserid = users.id WHERE posts.title LIKE 'Understanding what Dassault iSight is doing?'", "label": true, "error_types": [] }, { "id": 813, "question": "Write all comments made on the post titled 'How does gentle boosting differ from AdaBoost?'", "db_id": "codebase_community", "sql": "select comments.text from posts inner join comments on posts.id = comments.postid where posts.title = 'How does gentle boosting differ from AdaBoost?'", "label": true, "error_types": [] }, { "id": 814, "question": "Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'", "db_id": "codebase_community", "sql": "select users.displayname from posts inner join posthistory on posts.id = posthistory.postid inner join users on posthistory.userid = users.id where posts.title = 'Open source tools for visualizing multi-dimensional data?'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 815, "question": "Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Open source tools for visualizing multi-dimensional data'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 816, "question": "List the title of posts which were edited by Vebjorn Ljosa.", "db_id": "codebase_community", "sql": "select distinct posts.title from users inner join posts on users.id = posts.lasteditoruserid inner join posthistory on posts.id = posthistory.postid where users.displayname = 'Vebjorn Ljosa'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 817, "question": "List the title of posts which were edited by Vebjorn Ljosa.", "db_id": "codebase_community", "sql": "SELECT posts.title FROM posts INNER JOIN posthistory ON posts.id = posthistory.postid WHERE posthistory.userdisplayname = 'Vebjorn Ljosa'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 818, "question": "What is the total score of the posts edited by Yevgeny and include the user's website URL.", "db_id": "codebase_community", "sql": "select sum(posts.score) , users.websiteurl from users inner join posts on users.id = posts.lasteditoruserid inner join comments on posts.id = comments.postid where users.displayname = 'Yevgeny'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 819, "question": "What is the total score of the posts edited by Yevgeny and include the user's website URL.", "db_id": "codebase_community", "sql": "SELECT sum(posts.score), users.websiteurl FROM users INNER JOIN posthistory ON users.id = posthistory.userid INNER JOIN posts ON posthistory.postid = posts.id WHERE users.displayname = 'Yevgeny' GROUP BY users.websiteurl", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 820, "question": "What is the total score of the posts edited by Yevgeny and include the user's website URL.", "db_id": "codebase_community", "sql": "SELECT SUM(T2.Score), T1.WebsiteUrl FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.LastEditorUserId WHERE T1.DisplayName = 'Yevgeny'", "label": true, "error_types": [] }, { "id": 821, "question": "How much is the total bounty amount of the post titled about 'data'", "db_id": "codebase_community", "sql": "select sum(votes.bountyamount) from posts inner join votes on posts.id = votes.postid where posts.title like '%data%'", "label": true, "error_types": [] }, { "id": 822, "question": "Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post.", "db_id": "codebase_community", "sql": "select avg(posts.viewcount) , posts.title , comments.text from tags inner join posts on tags.id = posts.id inner join comments on posts.id = comments.postid where tags.tagname = 'humor'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 823, "question": "Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post.", "db_id": "codebase_community", "sql": "SELECT avg(posts.viewcount) FROM posts INNER JOIN tags ON posts.id = tags.wikipostid WHERE tags.tagname = 'humor'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 824, "question": "Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post.", "db_id": "codebase_community", "sql": "SELECT AVG(T1.ViewCount) AS AverageViewCount, T1.Title, T2.Text, T2.Score FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId INNER JOIN tags AS T3 ON T1.Id = T3.ExcerptPostId WHERE T3.TagName = 'humor' GROUP BY T1.Id", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 825, "question": "Give the total number of comments posted by user ID 13.", "db_id": "codebase_community", "sql": "select count(postid) from comments where userid = 13", "label": true, "error_types": [] }, { "id": 826, "question": "Which user ID has the highest reputation?", "db_id": "codebase_community", "sql": "select id from users order by reputation desc limit 1", "label": true, "error_types": [] }, { "id": 827, "question": "Which user ID has the lowest view?", "db_id": "codebase_community", "sql": "select id from users order by views asc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 828, "question": "How many users are awarded with supporter badge during year 2011?", "db_id": "codebase_community", "sql": "SELECT count(DISTINCT badges.userid) FROM badges INNER JOIN users ON badges.userid = users.id WHERE strftime('%Y', badges.date) = '2011' AND badges.name = 'Supporter'", "label": true, "error_types": [] }, { "id": 829, "question": "How many users are awarded with more than 5 badges?", "db_id": "codebase_community", "sql": "select count(userid) from badges where name in ( select name from badges group by name having count(name) > 5 )", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 830, "question": "How many users are awarded with more than 5 badges?", "db_id": "codebase_community", "sql": "SELECT count(DISTINCT userid) FROM badges WHERE name > 5", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 831, "question": "How many users are awarded with more than 5 badges?", "db_id": "codebase_community", "sql": "SELECT COUNT(UserId) FROM ( SELECT UserId FROM badges GROUP BY UserId HAVING COUNT(Name) > 5 ) T", "label": true, "error_types": [] }, { "id": 832, "question": "How many users from New York have a teacher and supporter badge?", "db_id": "codebase_community", "sql": "select count(users.id) from users inner join badges on users.id = badges.userid where badges.name = 'Supporter' and badges.name = 'Teacher' and users.location = 'New York'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 833, "question": "How many users from New York have a teacher and supporter badge?", "db_id": "codebase_community", "sql": "SELECT count(users.id) FROM users INNER JOIN badges ON users.id = badges.userid WHERE badges.name IN ('Supporter', 'Teacher') AND users.location = 'New York'", "label": true, "error_types": [] }, { "id": 834, "question": "How many users from New York have a teacher and supporter badge?", "db_id": "codebase_community", "sql": "SELECT COUNT(DISTINCT T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'New York' AND T2.Name IN ('Supporter', 'Teacher') GROUP BY T1.Id HAVING COUNT(DISTINCT T2.Name) = 2", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 835, "question": "Which user created post ID 1 and what is the reputation of this user?", "db_id": "codebase_community", "sql": "SELECT T2.OwnerUserId, T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Id = 1", "label": true, "error_types": [] }, { "id": 836, "question": "Which user have only one post history per post and having at least 1000 views?", "db_id": "codebase_community", "sql": "select posthistory.userid from users inner join posthistory on users.id = posthistory.userid where users.views >= 1000 and posthistory.postid = 1 limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 837, "question": "Which user have only one post history per post and having at least 1000 views?", "db_id": "codebase_community", "sql": "SELECT T2.UserId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId WHERE T1.Views >= 1000 GROUP BY T2.UserId HAVING COUNT(DISTINCT T2.PostId) = 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 838, "question": "Which users have posted the most comments. List out the user's badge?", "db_id": "codebase_community", "sql": "select comments.userid , badges.name from comments inner join badges on comments.userid = badges.userid group by comments.userid order by count(comments.id) desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 839, "question": "Which users have posted the most comments. List out the user's badge?", "db_id": "codebase_community", "sql": "SELECT badges.userid, badges.name FROM badges INNER JOIN comments ON badges.userid = comments.userid GROUP BY badges.userid, badges.name ORDER BY count(comments.id) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 840, "question": "Which users have posted the most comments. List out the user's badge?", "db_id": "codebase_community", "sql": "SELECT T2.Name FROM comments AS T1 INNER JOIN badges AS T2 ON T1.UserId = T2.UserId INNER JOIN users AS T3 ON T1.UserId = T3.Id GROUP BY T1.UserId ORDER BY COUNT(T1.Id) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 841, "question": "How many users from India have the teacher badges?", "db_id": "codebase_community", "sql": "SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'India' AND T2.Name = 'Teacher'", "label": true, "error_types": [] }, { "id": 842, "question": "What is the percentage difference of student badges given during 2010 and 2011?", "db_id": "codebase_community", "sql": "select cast(sum(case when date = 2010 then 1 else 0 end) as real) * 100 / sum(case when date = 2011 then 1 else 0 end) - cast(sum(case when date = 2011 then 1 else 0 end) as real) * 100 / sum(case when date = 2011 then 1 else 0 end) from badges where name = 'Students'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 843, "question": "What is the percentage difference of student badges given during 2010 and 2011?", "db_id": "codebase_community", "sql": "SELECT cast((sum(CASE WHEN strftime('%Y', badges.date) = '2010' THEN 1 ELSE 0 END) - sum(CASE WHEN strftime('%Y', badges.date) = '2011' THEN 1 ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN strftime('%Y', badges.date) = '2010' THEN 1 ELSE 0 END) FROM badges WHERE name = 'Student'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 844, "question": "What is the percentage difference of student badges given during 2010 and 2011?", "db_id": "codebase_community", "sql": "SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', Date) = '2010' THEN 1 ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', Date) = '2011' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(Name) FROM badges WHERE Name = 'Student'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 845, "question": "What are the post history type IDs for post ID 3720 and how many unique users have commented on the post?", "db_id": "codebase_community", "sql": "SELECT posthistorytypeid, count(DISTINCT userid) FROM posthistory WHERE postid = 3720 GROUP BY posthistorytypeid", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 846, "question": "What are the post history type IDs for post ID 3720 and how many unique users have commented on the post?", "db_id": "codebase_community", "sql": "SELECT T1.PostHistoryTypeId, COUNT(DISTINCT T2.UserId) FROM postHistory AS T1 INNER JOIN comments AS T2 ON T1.PostId = T2.PostId WHERE T1.PostId = 3720 GROUP BY T1.PostHistoryTypeId", "label": true, "error_types": [] }, { "id": 847, "question": "What is the score and the link type ID for post ID 395?", "db_id": "codebase_community", "sql": "SELECT comments.score, postlinks.linktypeid FROM comments INNER JOIN postlinks ON comments.postid = postlinks.postid WHERE postlinks.postid = 395", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 848, "question": "What is the score and the link type ID for post ID 395?", "db_id": "codebase_community", "sql": "SELECT T1.Score, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 395", "label": true, "error_types": [] }, { "id": 849, "question": "List out the name of badges that users obtained on 7/19/2010 7:39:08 PM.", "db_id": "codebase_community", "sql": "select name from badges where date = '2010-07-19 19:39:08'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 850, "question": "How many positive comments are there on the list?", "db_id": "codebase_community", "sql": "SELECT count(id) FROM comments WHERE score > 60", "label": true, "error_types": [] }, { "id": 851, "question": "How many posts have a score of 10 on the list?", "db_id": "codebase_community", "sql": "select count(postid) from comments where score = 10", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 852, "question": "How many posts have a score of 10 on the list?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM posts WHERE Score = 10", "label": true, "error_types": [] }, { "id": 853, "question": "What are the name of badge that users who have the highest reputation obtained?", "db_id": "codebase_community", "sql": "select badges.name from users inner join badges on users.id = badges.userid order by users.reputation desc limit 1", "label": true, "error_types": [] }, { "id": 854, "question": "What are the name of badge that users who have the highest reputation obtained?", "db_id": "codebase_community", "sql": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Reputation = ( SELECT MAX(Reputation) FROM users )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 855, "question": "Mention the reputation of users who had obtained the badge on 7/19/2010 7:39:08 PM.", "db_id": "codebase_community", "sql": "SELECT T2.Reputation FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Date = '2010-07-19 19:39:08.0'", "label": true, "error_types": [] }, { "id": 856, "question": "What is the name of badge that the user whose display name is \"Pierre\" obtained?", "db_id": "codebase_community", "sql": "SELECT badges.name FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'Pierre'", "label": true, "error_types": [] }, { "id": 857, "question": "List out the dates that users who are located in Rochester, NY obtained their badges?", "db_id": "codebase_community", "sql": "select badges.date from users inner join badges on users.id = badges.userid where users.location = 'Rochester , NY'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 858, "question": "List out the dates that users who are located in Rochester, NY obtained their badges?", "db_id": "codebase_community", "sql": "SELECT badges.date FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.location = 'Rochester, NY'", "label": true, "error_types": [] }, { "id": 859, "question": "Among the users who obtained the \"Organizer\" badges, calculate the percentage of users who are teenagers.", "db_id": "codebase_community", "sql": "select cast(sum(case when users.age between 13 and 18 then 1 else 0 end) as real) * 100 / count(users.id) from badges inner join users on badges.userid = users.id where badges.name = 'Organizer'", "label": true, "error_types": [] }, { "id": 860, "question": "What is the detailed content of the comment of the post which was created on 7/19/2010 7:37:33 PM?", "db_id": "codebase_community", "sql": "SELECT text FROM comments WHERE creationdate = '2010-07-19 19:37:33.0'", "label": true, "error_types": [] }, { "id": 861, "question": "What is the detailed content of the comment of the post which was created on 7/19/2010 7:37:33 PM?", "db_id": "codebase_community", "sql": "SELECT T2.Text FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.CreaionDate = '2010-07-19 19:37:33'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 862, "question": "List out the age of users who located in Vienna, Austria obtained the badge?", "db_id": "codebase_community", "sql": "select users.age from users inner join badges on users.id = badges.userid where users.location = 'Vienna , Austria'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 863, "question": "List out the age of users who located in Vienna, Austria obtained the badge?", "db_id": "codebase_community", "sql": "SELECT users.age FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.location = 'Vienna, Austria'", "label": true, "error_types": [] }, { "id": 864, "question": "How many adults who obtained the badge Supporter?", "db_id": "codebase_community", "sql": "select count(users.id) from users inner join badges on users.id = badges.userid where badges.name = 'Supporter' and users.age between 19 and 65", "label": true, "error_types": [] }, { "id": 865, "question": "State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM.", "db_id": "codebase_community", "sql": "SELECT users.views FROM badges INNER JOIN users ON badges.userid = users.id WHERE badges.date = '2010-07-19 19:39:08.0'", "label": true, "error_types": [] }, { "id": 866, "question": "What are the name of badges that users who have the lowest reputation obtained?", "db_id": "codebase_community", "sql": "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 )", "label": true, "error_types": [] }, { "id": 867, "question": "State the name of badge that the user whose display name is \"Sharpie\" obtained.", "db_id": "codebase_community", "sql": "SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Sharpie'", "label": true, "error_types": [] }, { "id": 868, "question": "How many elders obtained the \"Supporter\" badge?", "db_id": "codebase_community", "sql": "select count(users.id) from users inner join badges on users.id = badges.userid where badges.name = 'Supporter' and users.age > 65", "label": true, "error_types": [] }, { "id": 869, "question": "What is the name of user with the ID of 30?", "db_id": "codebase_community", "sql": "SELECT DisplayName FROM users WHERE Id = 30", "label": true, "error_types": [] }, { "id": 870, "question": "How many users were from New York?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM users WHERE Location = 'New York'", "label": true, "error_types": [] }, { "id": 871, "question": "How many votes were made in 2010?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM votes WHERE STRFTIME('%Y', CreationDate) = '2010'", "label": true, "error_types": [] }, { "id": 872, "question": "How many users were adult?", "db_id": "codebase_community", "sql": "select count(id) from users where age between 19 and 65", "label": true, "error_types": [] }, { "id": 873, "question": "Calculate the ratio of votes in 2010 and 2011.", "db_id": "codebase_community", "sql": "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", "label": true, "error_types": [] }, { "id": 874, "question": "What is the name of tags used by John Salvatier's?", "db_id": "codebase_community", "sql": "select tags.tagname from users inner join posts on users.id = posts.owneruserid inner join tags on posts.id = tags.id where users.displayname = 'John Stauffer'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 875, "question": "Which post by slashnick has the most answers count? State the post ID.", "db_id": "codebase_community", "sql": "SELECT posts.id FROM users INNER JOIN posts ON users.id = posts.owneruserid WHERE users.displayname = 'slashnick' ORDER BY posts.answercount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 876, "question": "Which post by slashnick has the most answers count? State the post ID.", "db_id": "codebase_community", "sql": "SELECT T2.Id FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'slashnick' AND T2.AnswerCount IS NOT NULL ORDER BY T2.AnswerCount DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 877, "question": "How many negative comments did Neil McGuigan get in his posts?", "db_id": "codebase_community", "sql": "select count(comments.score) from users inner join comments on users.id = comments.userid where users.displayname = 'Neil McGuigan' and comments.score < 60", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 878, "question": "How many negative comments did Neil McGuigan get in his posts?", "db_id": "codebase_community", "sql": "SELECT COUNT(T3.Score) 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", "label": true, "error_types": [] }, { "id": 879, "question": "State all the tags used by Mark Meckes in his posts that doesn't have comments.", "db_id": "codebase_community", "sql": "select distinct tags.tagname from users inner join posts on users.id = posts.owneruserid inner join tags on posts.id = tags.id inner join posthistory on posts.id = posthistory.postid where users.displayname = 'Mark Meckes' and posts.commentcount = 0", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 880, "question": "State all the tags used by Mark Meckes in his posts that doesn't have comments.", "db_id": "codebase_community", "sql": "SELECT tags FROM posts WHERE ownerdisplayname = 'Mark Meckes' AND commentcount = 0", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 881, "question": "State all the tags used by Mark Meckes in his posts that doesn't have comments.", "db_id": "codebase_community", "sql": "SELECT DISTINCT T2.Tags FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Mark Meckes' AND T2.CommentCount = 0", "label": true, "error_types": [] }, { "id": 882, "question": "List all the name of users that obtained the Organizer Badges.", "db_id": "codebase_community", "sql": "select distinct users.displayname from users inner join badges on users.id = badges.userid where badges.name = 'Organizer'", "label": true, "error_types": [] }, { "id": 883, "question": "How many users received commentator badges in 2014?", "db_id": "codebase_community", "sql": "select count(userid) from badges where strftime('%Y' , date) = '2014' and name = 'Commentator'", "label": true, "error_types": [] }, { "id": 884, "question": "What are the display names and ages of user who got the highest in views?", "db_id": "codebase_community", "sql": "SELECT DisplayName, Age FROM users ORDER BY Views DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 885, "question": "Provide the last edit date and last edit user ID for the post \"Detecting a given face in a database of facial images\".", "db_id": "codebase_community", "sql": "SELECT lasteditdate, lasteditoruserid FROM posts WHERE title = 'Detecting a given face in a database of facial images'", "label": true, "error_types": [] }, { "id": 886, "question": "How many negative comments were given by user ID 13?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM comments WHERE UserId = 13 AND Score < 60", "label": true, "error_types": [] }, { "id": 887, "question": "Provide the badge names received in 2011 for the user whose location is in the North Pole.", "db_id": "codebase_community", "sql": "select distinct badges.name from users inner join badges on users.id = badges.userid where users.location = 'North Pole' and strftime('%Y' , badges.date) = '2011'", "label": true, "error_types": [] }, { "id": 888, "question": "Provide the users' display names and available website URLs of the post with favorite count of more than 150.", "db_id": "codebase_community", "sql": "select users.displayname , users.websiteurl from users inner join posts on users.id = posts.owneruserid where posts.favoritecount > 150", "label": true, "error_types": [] }, { "id": 889, "question": "Describe the last accessed date and location of the users who received the outliers badge.", "db_id": "codebase_community", "sql": "select users.lastaccessdate , users.location from badges inner join users on badges.userid = users.id where badges.name = 'outliers'", "label": true, "error_types": [] }, { "id": 890, "question": "Describe the last accessed date and location of the users who received the outliers badge.", "db_id": "codebase_community", "sql": "SELECT users.lastaccessdate, users.location FROM users INNER JOIN badges ON users.id = badges.userid WHERE badges.name = 'Outliers'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 891, "question": "Provide the related post title of \"How to tell if something happened in a data set which monitors a value over time\".", "db_id": "codebase_community", "sql": "select postlinks.relatedpostid from posts inner join postlinks on posts.id = postlinks.relatedpostid where posts.title = 'How to tell if something happened in a data set which monitors a value over time'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 892, "question": "Provide the related post title of \"How to tell if something happened in a data set which monitors a value over time\".", "db_id": "codebase_community", "sql": "SELECT T1.Title FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.RelatedPostId WHERE T2.PostId = ( SELECT Id FROM posts WHERE Title = 'How to tell if something happened in a data set which monitors a value over time' )", "label": true, "error_types": [] }, { "id": 893, "question": "List the post IDs and badge names of the user Samuel in 2013.", "db_id": "codebase_community", "sql": "select posts.id , badges.name from users inner join posts on users.id = posts.owneruserid inner join posthistory on posts.id = posthistory.postid inner join badges on posts.id = badges.userid where users.displayname = 'Samuel' and strftime('%Y' , posthistory.creationdate) = '2013'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 894, "question": "List the post IDs and badge names of the user Samuel in 2013.", "db_id": "codebase_community", "sql": "SELECT posthistory.postid, badges.name FROM badges INNER JOIN posthistory ON badges.userid = posthistory.userid WHERE posthistory.userdisplayname = 'Samuel' AND strftime('%Y', badges.date) = '2013'", "label": true, "error_types": [] }, { "id": 895, "question": "List the post IDs and badge names of the user Samuel in 2013.", "db_id": "codebase_community", "sql": "SELECT T1.Id, T3.Name FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id INNER JOIN badges AS T3 ON T2.Id = T3.UserId WHERE T2.DisplayName = 'Samuel' AND STRFTIME('%Y', T3.Date) = '2013'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 896, "question": "What is the owner's display name of the most popular post?", "db_id": "codebase_community", "sql": "select ownerdisplayname from posts order by viewcount desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 897, "question": "What is the owner's display name of the most popular post?", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id ORDER BY T1.ViewCount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 898, "question": "Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.", "db_id": "codebase_community", "sql": "SELECT users.displayname, users.location FROM tags INNER JOIN posts ON tags.excerptpostid = posts.id INNER JOIN users ON posts.owneruserid = users.id WHERE tags.tagname = 'hypothesis-testing'", "label": true, "error_types": [] }, { "id": 899, "question": "Write down the related posts titles and link type IDs of the post \"What are principal component scores?\".", "db_id": "codebase_community", "sql": "select posts.title , postlinks.linktypeid from posts inner join postlinks on posts.id = postlinks.relatedpostid where posts.title = 'What are principal component scores?'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 900, "question": "Write down the related posts titles and link type IDs of the post \"What are principal component scores?\".", "db_id": "codebase_community", "sql": "SELECT T1.Title, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.RelatedPostId WHERE T2.PostId = ( SELECT Id FROM posts WHERE Title = 'What are principal component scores?' )", "label": true, "error_types": [] }, { "id": 901, "question": "Under the vote type of 8, provide the display names and websites URLs of the user who got the highest bounty amount.", "db_id": "codebase_community", "sql": "select users.displayname , users.websiteurl from users inner join votes on users.id = votes.userid where votes.votetypeid = 8 and votes.bountyamount = ( select max(bountyamount) from votes where votetypeid = 8 )", "label": true, "error_types": [] }, { "id": 902, "question": "What are the titles of the top 5 posts with the highest popularity?", "db_id": "codebase_community", "sql": "SELECT Title FROM posts ORDER BY ViewCount DESC LIMIT 5", "label": true, "error_types": [] }, { "id": 903, "question": "How many tags have post count between 5,000 to 7,000?", "db_id": "codebase_community", "sql": "select count(tagname) from tags where count between 5000 and 7000", "label": true, "error_types": [] }, { "id": 904, "question": "How many tags have post count between 5,000 to 7,000?", "db_id": "codebase_community", "sql": "SELECT count(DISTINCT tags.tagname) FROM tags INNER JOIN posts ON tags.wikipostid = posts.id WHERE posts.viewcount BETWEEN 5000 AND 7000", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 905, "question": "What is the owner user id of the most valuable post?", "db_id": "codebase_community", "sql": "SELECT OwnerUserId FROM posts WHERE FavoriteCount = ( SELECT MAX(FavoriteCount) FROM posts )", "label": true, "error_types": [] }, { "id": 906, "question": "How old is the most influential user?", "db_id": "codebase_community", "sql": "SELECT Age FROM users WHERE Reputation IS NOT NULL ORDER BY Reputation DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 907, "question": "How many posts with votes that were created in 2011 have a bounty of 50?", "db_id": "codebase_community", "sql": "SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE STRFTIME('%Y', T2.CreationDate) = '2011' AND T2.BountyAmount = 50", "label": true, "error_types": [] }, { "id": 908, "question": "What is the id of the youngest user?", "db_id": "codebase_community", "sql": "SELECT id FROM users WHERE age = ( SELECT min(age) FROM users )", "label": true, "error_types": [] }, { "id": 909, "question": "What is the sum of score of the post on 2010-07-19?", "db_id": "codebase_community", "sql": "select posts.score from tags inner join posts on tags.id = posts.id order by posts.viewcount desc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 910, "question": "What is the sum of score of the post on 2010-07-19?", "db_id": "codebase_community", "sql": "SELECT posts.score FROM posts INNER JOIN tags ON posts.id = tags.wikipostid ORDER BY tags.count DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 911, "question": "What is the sum of score of the post on 2010-07-19?", "db_id": "codebase_community", "sql": "SELECT T2.Score FROM tags AS T1 INNER JOIN posts AS T2 ON T2.Tags LIKE '%' || T1.TagName || '%' WHERE T1.Count = (SELECT MAX(Count) FROM tags) ORDER BY T2.ViewCount DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 912, "question": "What is the average monthly number of links created in 2010 for posts that have no more than 2 answers?", "db_id": "codebase_community", "sql": "select cast(count(postlinks.id) as real) / 12 from posts inner join postlinks on posts.id = postlinks.postid where strftime('%Y' , postlinks.creationdate) = '2010' and posts.answercount < 2", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 913, "question": "What is the average monthly number of links created in 2010 for posts that have no more than 2 answers?", "db_id": "codebase_community", "sql": "SELECT CAST(COUNT(T1.Id) AS REAL) / 12 FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.CreationDate LIKE '2010%' AND T2.AnswerCount <= 2", "label": true, "error_types": [] }, { "id": 914, "question": "Among the posts that were voted by user 1465, what is the id of the most valuable post?", "db_id": "codebase_community", "sql": "select posts.id from posts inner join votes on posts.id = votes.postid where votes.userid = 1465 order by posts.favoritecount desc limit 1", "label": true, "error_types": [] }, { "id": 915, "question": "What is the display name of the user who acquired the highest amount of badges?", "db_id": "codebase_community", "sql": "select users.displayname from badges inner join users on badges.userid = users.id group by users.id , users.displayname order by count(badges.name) desc limit 1", "label": true, "error_types": [] }, { "id": 916, "question": "When did 'chl' cast its first vote in a post?", "db_id": "codebase_community", "sql": "SELECT votes.creationdate FROM votes INNER JOIN users ON votes.userid = users.id WHERE users.displayname = 'chl' ORDER BY votes.creationdate LIMIT 1", "label": true, "error_types": [] }, { "id": 917, "question": "What is the date when the youngest user made his or her first post?", "db_id": "codebase_community", "sql": "select min(posts.creaiondate) from posts inner join users on posts.owneruserid = users.id order by users.age asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 918, "question": "What is the date when the youngest user made his or her first post?", "db_id": "codebase_community", "sql": "SELECT posts.creaiondate FROM users INNER JOIN posts ON users.id = posts.owneruserid ORDER BY users.age LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 919, "question": "What is the date when the youngest user made his or her first post?", "db_id": "codebase_community", "sql": "SELECT MIN(T1.CreaionDate) FROM posts AS T1 WHERE T1.OwnerUserId = (SELECT T2.Id FROM users AS T2 WHERE T2.Age = (SELECT MIN(Age) FROM users))", "label": true, "error_types": [] }, { "id": 920, "question": "What is the display name of the user who acquired the first Autobiographer badge?", "db_id": "codebase_community", "sql": "SELECT users.displayname FROM badges INNER JOIN users ON badges.userid = users.id WHERE badges.name = 'Autobiographer' ORDER BY badges.date ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 921, "question": "Among the users located in United Kingdom, how many users whose post have a total favorite amount of 4 or more?", "db_id": "codebase_community", "sql": "select count(users.id) from users inner join posts on users.id = posts.owneruserid where users.location = 'United Kingdom' and posts.favoritecount >= 4", "label": true, "error_types": [] }, { "id": 922, "question": "Among the users located in United Kingdom, how many users whose post have a total favorite amount of 4 or more?", "db_id": "codebase_community", "sql": "SELECT COUNT(DISTINCT 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", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 923, "question": "Who has the highest reputation? Please give the display name.", "db_id": "codebase_community", "sql": "SELECT DisplayName FROM users WHERE Reputation IS NOT NULL ORDER BY Reputation DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 924, "question": "How many users whose reputations are higher than 2000 and the number of views is higher than 1000?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM users WHERE Reputation > 2000 AND Views > 1000", "label": true, "error_types": [] }, { "id": 925, "question": "Please list all display names of users who are adults.", "db_id": "codebase_community", "sql": "SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65", "label": true, "error_types": [] }, { "id": 926, "question": "Which post by Harvey Motulsky has the most views? Please give the id and title of this post.", "db_id": "codebase_community", "sql": "select posts.id , posts.title from users inner join posts on users.id = posts.owneruserid where users.displayname = 'Harvey Motulsky' order by posts.viewcount desc limit 1", "label": true, "error_types": [] }, { "id": 927, "question": "What is the average score of Stephen Turner's posts?", "db_id": "codebase_community", "sql": "select cast(sum(posts.score) as real) / count(comments.postid) from users inner join comments on users.id = comments.userid inner join posts on comments.postid = posts.id where users.displayname = 'Stephen Turner'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 928, "question": "What is the average score of Stephen Turner's posts?", "db_id": "codebase_community", "sql": "SELECT avg(posts.score) FROM users INNER JOIN posts ON users.id = posts.owneruserid WHERE users.displayname = 'Stephen Turner'", "label": true, "error_types": [] }, { "id": 929, "question": "Identify the percentage of teenage users.", "db_id": "codebase_community", "sql": "SELECT CAST(SUM(CASE WHEN Age BETWEEN 13 AND 18 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Id) FROM users", "label": true, "error_types": [] }, { "id": 930, "question": "Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time.", "db_id": "codebase_community", "sql": "select posts.viewcount , users.displayname from comments inner join posts on comments.postid = posts.id inner join posthistory on posts.id = posthistory.postid inner join users on posts.owneruserid = users.id where posts.title = 'Computer game datasets' and posthistory.text = 'Computer game datasets'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 931, "question": "Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time.", "db_id": "codebase_community", "sql": "SELECT T1.ViewCount, T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Computer Game Datasets'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 932, "question": "Identify the number of posts that have been viewed over 35000 times but have received no comments from other users.", "db_id": "codebase_community", "sql": "select count(id) from posts where viewcount > 3500 and commentcount = 0", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 933, "question": "Identify the number of posts that have been viewed over 35000 times but have received no comments from other users.", "db_id": "codebase_community", "sql": "SELECT count(id) FROM posts WHERE viewcount > 35000 AND commentcount = 0", "label": true, "error_types": [] }, { "id": 934, "question": "Identify the display name and location of the user, who was the last to edit the post with ID 183.", "db_id": "codebase_community", "sql": "select users.displayname , users.location from users inner join posthistory on users.id = posthistory.userid inner join posts on posthistory.postid = posts.id where posthistory.postid = 183 order by posts.lasteditdate desc limit 1", "label": true, "error_types": [] }, { "id": 935, "question": "Identify the display name and location of the user, who was the last to edit the post with ID 183.", "db_id": "codebase_community", "sql": "SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Id = 183", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 936, "question": "Identify the latest badge awarded to the user with the display name Emmett.", "db_id": "codebase_community", "sql": "SELECT name FROM badges WHERE userid = ( SELECT id FROM users WHERE displayname = 'Emmett' ) ORDER BY date DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 937, "question": "Identify the number of adult users who have cast over 5000 upvotes.", "db_id": "codebase_community", "sql": "select count(id) from users where age between 19 and 65 and upvotes > 5000", "label": true, "error_types": [] }, { "id": 938, "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.", "db_id": "codebase_community", "sql": "select strftime('%J' , badges.date) - strftime('%J' , users.creationdate) as days from users inner join badges on users.id = badges.userid where users.displayname = 'Zolomon'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 939, "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.", "db_id": "codebase_community", "sql": "SELECT badges.date - users.creationdate FROM users INNER JOIN badges ON users.id = badges.userid WHERE users.displayname = 'Zolomon'", "label": true, "error_types": [] }, { "id": 940, "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.", "db_id": "codebase_community", "sql": "select comments.text , comments.userdisplayname from comments inner join posthistory on comments.userid = posthistory.userid inner join posts on posthistory.postid = posts.id where posts.title = 'Analysing wind data with R' order by comments.creationdate desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 941, "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.", "db_id": "codebase_community", "sql": "SELECT comments.text, comments.userdisplayname FROM posts INNER JOIN comments ON posts.id = comments.postid WHERE posts.title = 'Analysing wind data with R' ORDER BY comments.creationdate DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 942, "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.", "db_id": "codebase_community", "sql": "SELECT T2.Text, T3.DisplayName FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId INNER JOIN users AS T3 ON T2.UserId = T3.Id WHERE T1.Title = 'Analysing wind data with R' ORDER BY T2.CreationDate DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 943, "question": "How many users were awarded with 'Citizen Patrol' badge?", "db_id": "codebase_community", "sql": "SELECT COUNT(UserId) FROM badges WHERE Name = 'Citizen Patrol'", "label": true, "error_types": [] }, { "id": 944, "question": "Count the number of posts with a tag specified as 'careers'.", "db_id": "codebase_community", "sql": "SELECT count(tags.wikipostid) FROM tags WHERE tags.tagname = 'careers'", "label": true, "error_types": [] }, { "id": 945, "question": "Count the number of posts with a tag specified as 'careers'.", "db_id": "codebase_community", "sql": "SELECT T1.Count FROM tags AS T1 WHERE T1.TagName = 'careers'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 946, "question": "What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'?", "db_id": "codebase_community", "sql": "select users.reputation , users.views from posts inner join users on posts.owneruserid = users.id where users.displayname = 'Jarrod Dixon'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 947, "question": "What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'?", "db_id": "codebase_community", "sql": "SELECT Reputation, Views FROM users WHERE DisplayName = 'Jarrod Dixon'", "label": true, "error_types": [] }, { "id": 948, "question": "How many comments and answers were left by the users on the post with the title 'Clustering 1D data'?", "db_id": "codebase_community", "sql": "select count(comments.userid) , posts.answercount from posts inner join comments on posts.id = comments.postid where posts.title = 'Clustering 1D data'", "label": true, "error_types": [] }, { "id": 949, "question": "How many comments and answers were left by the users on the post with the title 'Clustering 1D data'?", "db_id": "codebase_community", "sql": "SELECT answercount, commentcount FROM posts WHERE title = 'Clustering 1D data'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 950, "question": "When did the user known as 'IrishStat' create his or her account?", "db_id": "codebase_community", "sql": "SELECT CreationDate FROM users WHERE DisplayName = 'IrishStat'", "label": true, "error_types": [] }, { "id": 951, "question": "Among all the posts posted by the most influential user, identify the percentage with a score above 50.", "db_id": "codebase_community", "sql": "select cast(sum(case when posts.score >= 50 then 1 else 0 end) as real) * 100 / count(posts.id) from posts inner join comments on posts.id = comments.postid inner join users on users.id = comments.userid where users.reputation = ( select max(reputation) from users )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" } ] }, { "id": 952, "question": "Among all the posts posted by the most influential user, identify the percentage with a score above 50.", "db_id": "codebase_community", "sql": "SELECT CAST(SUM(CASE WHEN T2.Score > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Id) AS percentage FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Score IS NOT NULL GROUP BY T1.Id ORDER BY T1.Reputation DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 953, "question": "How many posts have a score less than 20?", "db_id": "codebase_community", "sql": "select count(postid) from comments where score < 20", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 954, "question": "How many posts have a score less than 20?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM posts WHERE Score < 20", "label": true, "error_types": [] }, { "id": 955, "question": "Among the tags with tag ID below 15, how many of them have 20 count of posts and below?", "db_id": "codebase_community", "sql": "SELECT count(DISTINCT tags.tagname) FROM tags INNER JOIN posts ON tags.wikipostid = posts.id WHERE tags.id < 15 AND posts.viewcount <= 20", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 956, "question": "Among the tags with tag ID below 15, how many of them have 20 count of posts and below?", "db_id": "codebase_community", "sql": "SELECT COUNT(Id) FROM tags WHERE Id < 15 AND Count <= 20", "label": true, "error_types": [] }, { "id": 957, "question": "What is the excerpt post ID and wiki post ID of the tag named sample?", "db_id": "codebase_community", "sql": "SELECT ExcerptPostId, WikiPostId FROM tags WHERE TagName = 'sample'", "label": true, "error_types": [] }, { "id": 958, "question": "Give the user's reputation and up vote number of the user that commented \"fine, you win :)\".", "db_id": "codebase_community", "sql": "select users.reputation , users.upvotes from comments inner join users on comments.userid = users.id where comments.text = 'fine , you win :)'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 959, "question": "Give the user's reputation and up vote number of the user that commented \"fine, you win :)\".", "db_id": "codebase_community", "sql": "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 :)'", "label": true, "error_types": [] }, { "id": 960, "question": "Give the texts commented on the post about linear regression.", "db_id": "codebase_community", "sql": "select comments.text from posts inner join comments on posts.id = comments.postid where posts.title = 'How can I adapt ANOVA for binary data?' and comments.text = 'Linear regression in R'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 961, "question": "Give the texts commented on the post about linear regression.", "db_id": "codebase_community", "sql": "SELECT posthistory.text FROM posts INNER JOIN posthistory ON posts.id = posthistory.postid WHERE posts.title = 'How can I adapt ANOVA for binary data?'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 962, "question": "Among the posts with views ranging from 100 to 150, what is the comment with the highest score?", "db_id": "codebase_community", "sql": "select comments.text from posts inner join comments on posts.id = comments.postid where posts.viewcount between 100 and 150 order by comments.score desc limit 1", "label": true, "error_types": [] }, { "id": 963, "question": "List the creation date and age of the user that commented with webiste.", "db_id": "codebase_community", "sql": "select users.creationdate , users.age from users inner join comments on users.id = comments.userid where users.websiteurl like 'http://'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 964, "question": "List the creation date and age of the user that commented with webiste.", "db_id": "codebase_community", "sql": "SELECT comments.creationdate, users.age FROM users INNER JOIN comments ON users.id = comments.userid WHERE users.websiteurl LIKE '%http://%'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 965, "question": "List the creation date and age of the user that commented with webiste.", "db_id": "codebase_community", "sql": "SELECT T2.CreationDate, T2.Age FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text LIKE '%http://%'", "label": true, "error_types": [] }, { "id": 966, "question": "Among products comments with 0 score, what is the total number of users ages 40 years old?", "db_id": "codebase_community", "sql": "select count(users.id) from users inner join comments on users.id = comments.userid where comments.score = 0 and users.age = 40", "label": true, "error_types": [] }, { "id": 967, "question": "Among products comments with 0 score, what is the total number of users ages 40 years old?", "db_id": "codebase_community", "sql": "SELECT COUNT(DISTINCT T1.UserId) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 968, "question": "What is the post ID and the comments commented in the post titled by \"Group differences on a five point Likert item\"?", "db_id": "codebase_community", "sql": "select posts.id , comments.id from posts inner join comments on posts.id = comments.postid where posts.title = 'Group differences on a five point Likert item'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 969, "question": "What is the post ID and the comments commented in the post titled by \"Group differences on a five point Likert item\"?", "db_id": "codebase_community", "sql": "SELECT posts.id, comments.text FROM posts INNER JOIN comments ON posts.id = comments.postid WHERE posts.title = 'Group differences on a five point Likert item'", "label": true, "error_types": [] }, { "id": 970, "question": "What is the post ID and the comments commented in the post titled by \"Group differences on a five point Likert item\"?", "db_id": "codebase_community", "sql": "SELECT T1.Id, T2.Comment FROM posts AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.PostId WHERE T1.Title = 'Group differences on a five point Likert item'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 971, "question": "What is the up vote number of the user that commented \"R is also lazy evaluated.\"?", "db_id": "codebase_community", "sql": "select users.upvotes from comments inner join users on comments.userid = users.id inner join votes on comments.postid = votes.postid where comments.text = 'R is also lazy evaluated.'", "label": true, "error_types": [] }, { "id": 972, "question": "List the comments commented by the user with a username of Harvey Motulsky.", "db_id": "codebase_community", "sql": "SELECT comments.text FROM users INNER JOIN comments ON users.id = comments.userid WHERE users.displayname = 'Harvey Motulsky'", "label": true, "error_types": [] }, { "id": 973, "question": "In comments with score between 1 to 5, list down the display names of the users with 0 down votes.", "db_id": "codebase_community", "sql": "SELECT users.displayname FROM comments INNER JOIN users ON comments.userid = users.id WHERE comments.score BETWEEN 1 AND 5 AND users.downvotes = 0", "label": true, "error_types": [] }, { "id": 974, "question": "Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes?", "db_id": "codebase_community", "sql": "select cast(sum(case when users.upvotes = 0 then 1 else 0 end) as real) * 100 / count(comments.userid) from comments inner join users on comments.userid = users.id where comments.score between 5 and 10", "label": true, "error_types": [] }, { "id": 975, "question": "Please list all the superpowers of 3-D Man.", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superhero.superhero_name = '3-D Man'", "label": true, "error_types": [] }, { "id": 976, "question": "How many superheroes have the super power of \"Super Strength\"?", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Super Strength'", "label": true, "error_types": [] }, { "id": 977, "question": "Among the superheroes with the super power of \"Super Strength\", how many of them have a height of over 200cm?", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Super Strength' AND superhero.height_cm > 200", "label": true, "error_types": [] }, { "id": 978, "question": "How many superheroes have blue eyes?", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE colour.colour = 'Blue'", "label": true, "error_types": [] }, { "id": 979, "question": "What is the colour of Apocalypse's skin?", "db_id": "superhero", "sql": "select colour.colour from superhero inner join colour on colour.id = superhero.skin_colour_id where superhero.superhero_name = 'Apocalypse'", "label": true, "error_types": [] }, { "id": 980, "question": "Among the superheroes with blue eyes, how many of them have the super power of \"Agility\"?", "db_id": "superhero", "sql": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN hero_power AS T3 ON T1.id = T3.hero_id INNER JOIN superpower AS T4 ON T3.power_id = T4.id WHERE T2.colour = 'Blue' AND T4.power_name = 'Agility'", "label": true, "error_types": [] }, { "id": 981, "question": "Please list the superhero names of all the superheroes that have blue eyes and blond hair.", "db_id": "superhero", "sql": "SELECT superhero.superhero_name FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE colour.colour = 'Blue' AND superhero.hair_colour_id = ( SELECT id FROM colour WHERE colour = 'Blond' )", "label": true, "error_types": [] }, { "id": 982, "question": "How many superheroes are published by Marvel Comics?", "db_id": "superhero", "sql": "select count(*) from publisher inner join superhero on publisher.id = superhero.publisher_id where publisher.publisher_name = 'Marvel Comics'", "label": true, "error_types": [] }, { "id": 983, "question": "Who is the publisher of Sauron?", "db_id": "superhero", "sql": "SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Sauron'", "label": true, "error_types": [] }, { "id": 984, "question": "What is the average height of the superheroes from Marvel Comics?", "db_id": "superhero", "sql": "SELECT AVG(T2.height_cm) FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'Marvel Comics'", "label": true, "error_types": [] }, { "id": 985, "question": "List the superheroes from Marvel Comics who have the super power of 'Super Strength'.", "db_id": "superhero", "sql": "SELECT CAST(SUM(CASE WHEN T4.power_name = 'Super Strength' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) AS percentage FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id INNER JOIN hero_power AS T3 ON T2.id = T3.hero_id INNER JOIN superpower AS T4 ON T3.power_id = T4.id WHERE T1.publisher_name = 'Marvel Comics'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 986, "question": "How many superheroes did DC Comics publish?", "db_id": "superhero", "sql": "select count(*) from publisher inner join superhero on publisher.id = superhero.publisher_id where publisher.publisher_name = 'DC Comics'", "label": true, "error_types": [] }, { "id": 987, "question": "Which publisher published the slowest superhero?", "db_id": "superhero", "sql": "SELECT publisher.publisher_name FROM hero_attribute INNER JOIN superhero ON hero_attribute.hero_id = superhero.id INNER JOIN publisher ON superhero.publisher_id = publisher.id INNER JOIN attribute ON hero_attribute.attribute_id = attribute.id WHERE attribute.attribute_name = 'Speed' ORDER BY hero_attribute.attribute_value ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 988, "question": "How many gold-eyed superheroes did Marvel Comics publish?", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN publisher ON superhero.publisher_id = publisher.id INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE publisher.publisher_name = 'Marvel Comics' AND colour.colour = 'Gold'", "label": true, "error_types": [] }, { "id": 989, "question": "What is the publisher's name of Blue Beetle II?", "db_id": "superhero", "sql": "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'", "label": true, "error_types": [] }, { "id": 990, "question": "How many superheroes with blonde hair are there?", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN colour ON superhero.hair_colour_id = colour.id WHERE colour.colour = 'Blond'", "label": true, "error_types": [] }, { "id": 991, "question": "What is Copycat's race?", "db_id": "superhero", "sql": "SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'Copycat'", "label": true, "error_types": [] }, { "id": 992, "question": "Which superheroes have a durability attribute value of less than 50?", "db_id": "superhero", "sql": "select count(hero_attribute.hero_id) from attribute inner join hero_attribute on attribute.id = hero_attribute.attribute_id where attribute.attribute_name = 'Durability' and hero_attribute.attribute_value < 50", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 993, "question": "What are the names of the superheroes with the power of death touch?", "db_id": "superhero", "sql": "SELECT superhero.superhero_name FROM hero_power INNER JOIN superhero ON hero_power.hero_id = superhero.id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Death Touch'", "label": true, "error_types": [] }, { "id": 994, "question": "How many female superheroes have a strength value of 100?", "db_id": "superhero", "sql": "SELECT COUNT(T1.id) FROM gender AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.gender_id INNER JOIN hero_attribute AS T3 ON T2.id = T3.hero_id INNER JOIN attribute AS T4 ON T3.attribute_id = T4.id WHERE T1.gender = 'Female' AND T4.attribute_name = 'Strength' AND T3.attribute_value = 100", "label": true, "error_types": [] }, { "id": 995, "question": "How many vampire superheroes are there?", "db_id": "superhero", "sql": "SELECT COUNT(T2.id) FROM race AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.race_id WHERE T1.race = 'Vampire'", "label": true, "error_types": [] }, { "id": 996, "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.", "db_id": "superhero", "sql": "select cast(count(case when alignment.alignment = 'Bad' then 1 else null end) as real) * 100 / count(*) , count(case when publisher.publisher_name = 'Marvel Comics' then 1 else null end) from publisher inner join superhero on publisher.id = superhero.publisher_id inner join alignment on superhero.alignment_id = alignment.id where publisher.publisher_name = 'Marvel Comics'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 997, "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.", "db_id": "superhero", "sql": "SELECT cast(sum(CASE WHEN alignment.alignment = 'Bad' THEN 1 ELSE 0 END) AS REAL) * 100 / count(superhero.id), count(CASE WHEN publisher.publisher_name = 'Marvel Comics' THEN superhero.id ELSE NULL END) FROM superhero INNER JOIN publisher ON superhero.publisher_id = publisher.id INNER JOIN alignment ON superhero.alignment_id = alignment.id", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 998, "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.", "db_id": "superhero", "sql": "SELECT CAST(SUM(CASE WHEN T3.alignment = 'Bad' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) AS percentage_bad, SUM(CASE WHEN T3.alignment = 'Bad' THEN 1 ELSE 0 END) AS count_bad FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id INNER JOIN alignment AS T3 ON T2.alignment_id = T3.id WHERE T1.publisher_name = 'Marvel Comics'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 999, "question": "Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.", "db_id": "superhero", "sql": "select publisher.publisher_name , sum(case when publisher.publisher_name = 'Marvel Comics' then 1 else 0 end) - sum(case when publisher.publisher_name = 'DC Comics' then 1 else 0 end) from publisher inner join superhero on publisher.id = superhero.publisher_id", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1000, "question": "Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.", "db_id": "superhero", "sql": "SELECT SUM(CASE WHEN T1.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) AS diff FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id", "label": true, "error_types": [] }, { "id": 1001, "question": "Give the publisher ID of Star Trek.", "db_id": "superhero", "sql": "SELECT t.id FROM publisher AS t WHERE t.publisher_name = 'Star Trek'", "label": true, "error_types": [] }, { "id": 1002, "question": "Calculate the average attribute value of all superheroes.", "db_id": "superhero", "sql": "select avg(attribute_value) from hero_attribute", "label": true, "error_types": [] }, { "id": 1003, "question": "What is the total number of superheroes without full name?", "db_id": "superhero", "sql": "select count(*) from superhero where full_name is null", "label": true, "error_types": [] }, { "id": 1004, "question": "What is the eye colour of superhero with superhero ID 75?", "db_id": "superhero", "sql": "SELECT colour.colour FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE superhero.id = 75", "label": true, "error_types": [] }, { "id": 1005, "question": "Provide the superpowers of the superhero called Deathlok.", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superhero.superhero_name = 'Deathlok'", "label": true, "error_types": [] }, { "id": 1006, "question": "What is the average weight of all female superheroes?", "db_id": "superhero", "sql": "SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.id = 2", "label": true, "error_types": [] }, { "id": 1007, "question": "List down at least five superpowers of male superheroes.", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id INNER JOIN gender ON superhero.gender_id = gender.id WHERE gender.gender = 'Male' LIMIT 5", "label": true, "error_types": [] }, { "id": 1008, "question": "Give the name of the alien superheroes.", "db_id": "superhero", "sql": "select superhero.superhero_name from race inner join superhero on race.id = superhero.race_id where race.race = 'Alien'", "label": true, "error_types": [] }, { "id": 1009, "question": "Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.", "db_id": "superhero", "sql": "SELECT superhero_name FROM superhero WHERE height_cm BETWEEN 170 AND 190 AND eye_colour_id = 1", "label": true, "error_types": [] }, { "id": 1010, "question": "What is the superpower of hero ID 56?", "db_id": "superhero", "sql": "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", "label": true, "error_types": [] }, { "id": 1011, "question": "List down at least five full name of Demi-God superheroes.", "db_id": "superhero", "sql": "select superhero.full_name from race inner join superhero on race.id = superhero.race_id where race.race = 'Demi-God' limit 5", "label": true, "error_types": [] }, { "id": 1012, "question": "How many bad superheroes are there?", "db_id": "superhero", "sql": "select count(*) from alignment inner join superhero on alignment.id = superhero.alignment_id where alignment.alignment = 'Bad'", "label": true, "error_types": [] }, { "id": 1013, "question": "Identify the race of the superhero who weighed 169 kg.", "db_id": "superhero", "sql": "SELECT race.race FROM superhero INNER JOIN race ON superhero.race_id = race.id WHERE superhero.weight_kg = 169", "label": true, "error_types": [] }, { "id": 1014, "question": "Provide the hair colour of the human superhero who is 185 cm tall.", "db_id": "superhero", "sql": "select colour.colour from superhero inner join colour on colour.id = superhero.hair_colour_id inner join race on race.id = superhero.race_id where superhero.height_cm = 185 and race.race = 'Human'", "label": true, "error_types": [] }, { "id": 1015, "question": "What is the eye clolour of the heaviest superhero?", "db_id": "superhero", "sql": "select colour.colour from superhero inner join colour on colour.id = superhero.eye_colour_id order by superhero.weight_kg desc limit 1", "label": true, "error_types": [] }, { "id": 1016, "question": "In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?", "db_id": "superhero", "sql": "SELECT CAST(SUM(CASE WHEN T2.id = 13 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) AS percentage FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.height_cm BETWEEN 150 AND 180", "label": true, "error_types": [] }, { "id": 1017, "question": "Among the male superheroes, list the super hero names of superheroes with weight greater than the 79% average weight of all superheroes.", "db_id": "superhero", "sql": "select superhero.full_name from superhero inner join gender on superhero.gender_id = gender.id where gender.gender = 'Male' and weight_kg > ( select avg(weight_kg) from superhero ) * 0.79", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1018, "question": "Which power do superheroes have the most of?", "db_id": "superhero", "sql": "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(T2.power_name) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1019, "question": "Indicate the attribute value of superhero Abomination.", "db_id": "superhero", "sql": "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'", "label": true, "error_types": [] }, { "id": 1020, "question": "What are the superpowers of heroes with ID 1?", "db_id": "superhero", "sql": "select superpower.power_name from hero_power inner join superpower on hero_power.power_id = superpower.id where hero_power.hero_id = 1", "label": true, "error_types": [] }, { "id": 1021, "question": "How many heroes have stealth power?", "db_id": "superhero", "sql": "select count(hero_power.hero_id) from hero_power inner join superpower on hero_power.power_id = superpower.id where superpower.power_name = 'stealth'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1022, "question": "How many heroes have stealth power?", "db_id": "superhero", "sql": "SELECT count(hero_power.hero_id) FROM hero_power INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Stealth'", "label": true, "error_types": [] }, { "id": 1023, "question": "How many superheroes were published by Dark Horse Comics?", "db_id": "superhero", "sql": "select count(superhero.id) from superhero inner join publisher on superhero.publisher_id = publisher.id where publisher.publisher_name = 'Dark Horse Comics'", "label": true, "error_types": [] }, { "id": 1024, "question": "Which superhero has the most durability published by Dark Horse Comics?", "db_id": "superhero", "sql": "SELECT superhero.superhero_name FROM superhero INNER JOIN hero_attribute ON superhero.id = hero_attribute.hero_id INNER JOIN attribute ON hero_attribute.attribute_id = attribute.id INNER JOIN publisher ON superhero.publisher_id = publisher.id WHERE publisher.publisher_name = 'Dark Horse Comics' AND attribute.attribute_name = 'Durability' ORDER BY hero_attribute.attribute_value DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1025, "question": "What is the eyes colour of Abraham Sapien?", "db_id": "superhero", "sql": "select colour.colour from colour inner join superhero on colour.id = superhero.eye_colour_id where superhero.full_name = 'Abraham Sapien'", "label": true, "error_types": [] }, { "id": 1026, "question": "List the name of superheroes with flight power.", "db_id": "superhero", "sql": "select superhero.superhero_name from superhero inner join hero_power on superhero.id = hero_power.hero_id inner join superpower on hero_power.power_id = superpower.id where superpower.power_name = 'Flight'", "label": true, "error_types": [] }, { "id": 1027, "question": "Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.", "db_id": "superhero", "sql": "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", "label": true, "error_types": [] }, { "id": 1028, "question": "Which group does superhero A-Bomb belong to?", "db_id": "superhero", "sql": "select race.race from race inner join superhero on race.id = superhero.race_id where superhero.superhero_name = 'A-Bomb'", "label": true, "error_types": [] }, { "id": 1029, "question": "What is the percentage of blue female superheroes among all female superheroes?", "db_id": "superhero", "sql": "select cast(sum(case when colour.colour = 'Blue' then 1 else 0 end) as real) * 100 / count(*) from colour inner join superhero on colour.id = superhero.skin_colour_id inner join gender on superhero.gender_id = gender.id", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1030, "question": "What is the percentage of blue female superheroes among all female superheroes?", "db_id": "superhero", "sql": "SELECT CAST(SUM(CASE WHEN T3.colour = 'Blue' 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.id INNER JOIN colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.gender = 'Female'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1031, "question": "Provide the hero name and race of Charles Chandler.", "db_id": "superhero", "sql": "SELECT superhero.superhero_name, race.race FROM superhero INNER JOIN race ON superhero.race_id = race.id WHERE superhero.full_name = 'Charles Chandler'", "label": true, "error_types": [] }, { "id": 1032, "question": "What is the gender of Agent 13 hero?", "db_id": "superhero", "sql": "select gender.gender from superhero inner join gender on superhero.gender_id = gender.id where superhero.superhero_name = 'Agent 13'", "label": true, "error_types": [] }, { "id": 1033, "question": "Provide superheroes' names who have the adaptation power.", "db_id": "superhero", "sql": "select superhero.superhero_name from superhero inner join hero_power on superhero.id = hero_power.hero_id inner join superpower on hero_power.power_id = superpower.id where superpower.power_name = 'Adaptation'", "label": true, "error_types": [] }, { "id": 1034, "question": "Provide superheroes' names who have the adaptation power.", "db_id": "superhero", "sql": "SELECT superhero.full_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Adaptation'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1035, "question": "How many powers does Amazo hero have?", "db_id": "superhero", "sql": "SELECT count(hero_power.power_id) FROM hero_power INNER JOIN superhero ON hero_power.hero_id = superhero.id WHERE superhero.superhero_name = 'Amazo'", "label": true, "error_types": [] }, { "id": 1036, "question": "List the powers of Hunter Zolomon.", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superhero.full_name = 'Hunter Zolomon'", "label": true, "error_types": [] }, { "id": 1037, "question": "Provide the heights of the heroes whose eye colours are amber.", "db_id": "superhero", "sql": "select superhero.height_cm from superhero inner join colour on colour.id = superhero.eye_colour_id where colour.colour = 'Amber'", "label": true, "error_types": [] }, { "id": 1038, "question": "List the heroes' names whose eyes and hair colours are both black.", "db_id": "superhero", "sql": "select superhero.superhero_name from superhero inner join colour on colour.id = superhero.eye_colour_id where colour.colour = 'Black'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1039, "question": "List the heroes' names whose eyes and hair colours are both black.", "db_id": "superhero", "sql": "SELECT superhero.superhero_name FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE colour.colour = 'Black' AND superhero.eye_colour_id = superhero.hair_colour_id", "label": true, "error_types": [] }, { "id": 1040, "question": "Provide the eye colours of the heroes whose skin colours are gold.", "db_id": "superhero", "sql": "select superhero.eye_colour_id from superhero inner join colour on colour.id = superhero.skin_colour_id where colour.colour = 'Gold'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1041, "question": "Provide the eye colours of the heroes whose skin colours are gold.", "db_id": "superhero", "sql": "SELECT colour.colour FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE colour.colour = 'Gold'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1042, "question": "Provide the full names of vampire heroes.", "db_id": "superhero", "sql": "select superhero.full_name from race inner join superhero on race.id = superhero.race_id where race.race = 'Vampire'", "label": true, "error_types": [] }, { "id": 1043, "question": "Describe the names of neutral alignment superheroes.", "db_id": "superhero", "sql": "SELECT superhero.superhero_name FROM superhero INNER JOIN alignment ON superhero.alignment_id = alignment.id WHERE alignment.alignment = 'Neutral'", "label": true, "error_types": [] }, { "id": 1044, "question": "How many heroes have the highest attribute value in strength?", "db_id": "superhero", "sql": "select count(hero_attribute.hero_id) from attribute inner join hero_attribute on attribute.id = hero_attribute.attribute_id where attribute.attribute_name = 'Strength' order by hero_attribute.attribute_value desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1045, "question": "How many heroes have the highest attribute value in strength?", "db_id": "superhero", "sql": "SELECT COUNT(*) 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(T3.attribute_value) FROM hero_attribute AS T3 INNER JOIN attribute AS T4 ON T3.attribute_id = T4.id WHERE T4.attribute_name = 'Strength')", "label": true, "error_types": [] }, { "id": 1046, "question": "What are the race and alignment of Cameron Hicks?", "db_id": "superhero", "sql": "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'", "label": true, "error_types": [] }, { "id": 1047, "question": "Find the average weight of the heroes who are aliens.", "db_id": "superhero", "sql": "select avg(superhero.weight_kg) from race inner join superhero on race.id = superhero.race_id where race.race = 'Alien'", "label": true, "error_types": [] }, { "id": 1048, "question": "Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.", "db_id": "superhero", "sql": "SELECT ( SELECT weight_kg FROM superhero WHERE full_name = 'Emil Blonsky' ) - ( SELECT weight_kg FROM superhero WHERE full_name = 'Charles Chandler' )", "label": true, "error_types": [] }, { "id": 1049, "question": "Calculate the average height for each superhero.", "db_id": "superhero", "sql": "select avg(height_cm) from superhero", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1050, "question": "Calculate the average height for each superhero.", "db_id": "superhero", "sql": "SELECT id, AVG(height_cm) FROM superhero GROUP BY id", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1051, "question": "What is Abomination's superpower?", "db_id": "superhero", "sql": "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'", "label": true, "error_types": [] }, { "id": 1052, "question": "Among the superheroes with the race of god/eternal, how many of them are male", "db_id": "superhero", "sql": "select count(*) from superhero inner join gender on gender.id = superhero.gender_id inner join race on race.id = superhero.race_id where race.race = 'god/eternal' and gender.gender = 'Male' and superhero.race_id = 21", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1053, "question": "Among the superheroes with the race of god/eternal, how many of them are male", "db_id": "superhero", "sql": "SELECT COUNT(id) FROM superhero WHERE race_id = 21 AND gender_id = 1", "label": true, "error_types": [] }, { "id": 1054, "question": "How many superheroes have a neutral alignment?", "db_id": "superhero", "sql": "SELECT count(id) FROM superhero WHERE alignment_id = 3", "label": true, "error_types": [] }, { "id": 1055, "question": "State all of 3-D Man's attributes along with their values.", "db_id": "superhero", "sql": "SELECT T2.attribute_name, T1.attribute_value 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 T3.superhero_name = '3-D Man'", "label": true, "error_types": [] }, { "id": 1056, "question": "Which superheroes have blue eyes with brown hair?", "db_id": "superhero", "sql": "SELECT superhero_name FROM superhero WHERE eye_colour_id = 7 AND hair_colour_id = 9", "label": true, "error_types": [] }, { "id": 1057, "question": "What is the publisher for Hawkman, Karate Kid and Speedy?", "db_id": "superhero", "sql": "select distinct publisher.publisher_name from superhero inner join publisher on superhero.publisher_id = publisher.id where superhero.superhero_name = 'Hawkman' or superhero.superhero_name = 'Karate Kid' or superhero.superhero_name = 'Speedy'", "label": true, "error_types": [] }, { "id": 1058, "question": "How many superheroes didn't have any publisher?", "db_id": "superhero", "sql": "SELECT COUNT(id) FROM superhero WHERE publisher_id = 1", "label": true, "error_types": [] }, { "id": 1059, "question": "Calculate the percentage of superheroes with blue eyes.", "db_id": "superhero", "sql": "SELECT cast(count(CASE WHEN eye_colour_id = 7 THEN 1 ELSE NULL END) AS REAL) * 100 / count(eye_colour_id) FROM superhero", "label": true, "error_types": [] }, { "id": 1060, "question": "Find the ratio between male superheroes and female superheroes.", "db_id": "superhero", "sql": "select cast(sum(case when gender.gender = 1 then 1 else 0 end) as real) / sum(case when gender.gender = 2 then 1 else 0 end) from superhero inner join gender on superhero.gender_id = gender.id", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1061, "question": "Find the ratio between male superheroes and female superheroes.", "db_id": "superhero", "sql": "SELECT CAST(SUM(IIF(gender_id = 1, 1, 0)) AS REAL) / SUM(IIF(gender_id = 2, 1, 0)) FROM superhero", "label": true, "error_types": [] }, { "id": 1062, "question": "What is the power ID of cryokinesis?", "db_id": "superhero", "sql": "select id from superpower where power_name = 'cryokinesis'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1063, "question": "What is the power ID of cryokinesis?", "db_id": "superhero", "sql": "SELECT id FROM superpower WHERE power_name = 'Cryokinesis'", "label": true, "error_types": [] }, { "id": 1064, "question": "Provide the name of superhero with superhero ID 294.", "db_id": "superhero", "sql": "SELECT superhero_name FROM superhero WHERE id = 294", "label": true, "error_types": [] }, { "id": 1065, "question": "List the full names of superheroes with missing weight.", "db_id": "superhero", "sql": "select full_name from superhero where weight_kg is null or weight_kg = 0", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1066, "question": "Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name.", "db_id": "superhero", "sql": "select colour.colour from colour inner join superhero on colour.id = superhero.eye_colour_id where superhero.full_name = 'Karen Beecher-Duncan'", "label": true, "error_types": [] }, { "id": 1067, "question": "What is the superpowers of the superhero has Helen Parr as their full name?", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superhero.full_name = 'Helen Parr'", "label": true, "error_types": [] }, { "id": 1068, "question": "Find the race of the superhero who weighs 108kg and is 188cm tall.", "db_id": "superhero", "sql": "select race.race from superhero inner join race on superhero.race_id = race.id where superhero.weight_kg = 108 and superhero.height_cm = 188", "label": true, "error_types": [] }, { "id": 1069, "question": "What is the publisher name of the superhero ID 38?", "db_id": "superhero", "sql": "select publisher.publisher_name from superhero inner join publisher on superhero.publisher_id = publisher.id where superhero.id = 38", "label": true, "error_types": [] }, { "id": 1070, "question": "Give the alignment and superpowers of the superhero named Atom IV.", "db_id": "superhero", "sql": "SELECT alignment.alignment, superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id INNER JOIN alignment ON superhero.alignment_id = alignment.id WHERE superhero.superhero_name = 'Atom IV'", "label": true, "error_types": [] }, { "id": 1071, "question": "Calculate the average attribute value of all neutral superheroes.", "db_id": "superhero", "sql": "select cast(sum(hero_attribute.attribute_value) as real) / count(hero_attribute.hero_id) from alignment inner join superhero on alignment.id = superhero.alignment_id inner join hero_attribute on superhero.id = hero_attribute.hero_id where alignment.alignment = 'Neutral'", "label": true, "error_types": [] }, { "id": 1072, "question": "List the skin colour of the superheroes with 100 attribute value.", "db_id": "superhero", "sql": "SELECT colour.colour FROM superhero INNER JOIN hero_attribute ON superhero.id = hero_attribute.hero_id INNER JOIN colour ON superhero.skin_colour_id = colour.id WHERE hero_attribute.attribute_value = 100", "label": true, "error_types": [] }, { "id": 1073, "question": "Count the good female superheroes.", "db_id": "superhero", "sql": "SELECT count(superhero.id) FROM superhero INNER JOIN gender ON superhero.gender_id = gender.id INNER JOIN alignment ON superhero.alignment_id = alignment.id WHERE gender.id = 2 AND alignment.id = 1", "label": true, "error_types": [] }, { "id": 1074, "question": "Provide the names of superheroes with attribute value between 75 to 80.", "db_id": "superhero", "sql": "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", "label": true, "error_types": [] }, { "id": 1075, "question": "Give the race of the blue-haired male superhero.", "db_id": "superhero", "sql": "select race.race from colour inner join superhero on colour.id = superhero.hair_colour_id inner join gender on superhero.gender_id = gender.id inner join race on race.id = superhero.race_id where colour.colour = 'blue' and gender.gender = 'Male'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1076, "question": "Give the race of the blue-haired male superhero.", "db_id": "superhero", "sql": "SELECT T2.race 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 INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.colour = 'Blue' AND T4.gender = 'Male'", "label": true, "error_types": [] }, { "id": 1077, "question": "Among the bad superheroes, what is the percentage of female superheroes?", "db_id": "superhero", "sql": "select cast(count(case when gender.gender = 2 then 1 else null end) as real) * 100 / count(gender.id) from alignment inner join superhero on alignment.id = superhero.alignment_id inner join gender on superhero.gender_id = gender.id where alignment.alignment = 'Bad'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1078, "question": "Among the bad superheroes, what is the percentage of female superheroes?", "db_id": "superhero", "sql": "SELECT CAST(SUM(gender_id = 2) AS REAL) * 100 / COUNT(alignment_id) FROM superhero WHERE alignment_id = 2", "label": true, "error_types": [] }, { "id": 1079, "question": "In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.", "db_id": "superhero", "sql": "select count(case when colour.id = 7 then 1 else null end) - count(case when colour.id = 1 then 1 else null end) from superhero inner join colour on colour.id = superhero.eye_colour_id where superhero.weight_kg is null", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1080, "question": "In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.", "db_id": "superhero", "sql": "SELECT sum(CASE WHEN eye_colour_id = 7 THEN 1 ELSE 0 END) - sum(CASE WHEN eye_colour_id = 1 THEN 1 ELSE 0 END) FROM superhero", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1081, "question": "In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.", "db_id": "superhero", "sql": "SELECT SUM(CASE WHEN T2.id = 7 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) AS diff 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", "label": true, "error_types": [] }, { "id": 1082, "question": "How strong is the Hulk?", "db_id": "superhero", "sql": "select hero_attribute.attribute_value from superhero inner join hero_attribute on superhero.id = hero_attribute.hero_id inner join attribute on attribute.id = hero_attribute.attribute_id where superhero.superhero_name = 'Hulk' and attribute.attribute_name = 'Strength'", "label": true, "error_types": [] }, { "id": 1083, "question": "List down Ajax's superpowers.", "db_id": "superhero", "sql": "SELECT superpower.power_name FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superhero.superhero_name = 'Ajax'", "label": true, "error_types": [] }, { "id": 1084, "question": "How many green-skinned villains are there in the superhero universe?", "db_id": "superhero", "sql": "select count(superhero.skin_colour_id) from colour inner join superhero on colour.id = superhero.skin_colour_id inner join alignment on superhero.alignment_id = alignment.id where colour.colour = 'Green' and alignment.alignment = 'Bad'", "label": true, "error_types": [] }, { "id": 1085, "question": "How many female superheroes are in Marvel Comics?", "db_id": "superhero", "sql": "SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id INNER JOIN publisher AS T3 ON T1.publisher_id = T3.id WHERE T2.gender = 'Female' AND T3.publisher_name = 'Marvel Comics'", "label": true, "error_types": [] }, { "id": 1086, "question": "Identify superheroes who can control wind and list their names in alphabetical order.", "db_id": "superhero", "sql": "SELECT T3.superhero_name FROM superpower AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.power_id INNER JOIN superhero AS T3 ON T2.hero_id = T3.id WHERE T1.power_name = 'Wind Control' ORDER BY T3.superhero_name ASC", "label": true, "error_types": [] }, { "id": 1087, "question": "Identify the gender of the superhero who has the ability of Phoenix Force.", "db_id": "superhero", "sql": "SELECT superhero.gender_id FROM superhero INNER JOIN hero_power ON superhero.id = hero_power.hero_id INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Phoenix Force'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1088, "question": "Identify the gender of the superhero who has the ability of Phoenix Force.", "db_id": "superhero", "sql": "SELECT T4.gender FROM superpower AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.power_id INNER JOIN superhero AS T3 ON T2.hero_id = T3.id INNER JOIN gender AS T4 ON T3.gender_id = T4.id WHERE T1.power_name = 'Phoenix Force'", "label": true, "error_types": [] }, { "id": 1089, "question": "Identify the heaviest superhero in DC Comics.", "db_id": "superhero", "sql": "SELECT T2.superhero_name FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'DC Comics' AND T2.weight_kg IS NOT NULL ORDER BY T2.weight_kg DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1090, "question": "What is the average height of a non-human superhero in Dark Horse Comics?", "db_id": "superhero", "sql": "select cast(sum(superhero.height_cm) as real) / count(race.id) from race inner join superhero on race.id = superhero.race_id inner join publisher on publisher.id = superhero.publisher_id where publisher.publisher_name = 'Dark Horse Comics' and race.race < 'Human'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1091, "question": "What is the average height of a non-human superhero in Dark Horse Comics?", "db_id": "superhero", "sql": "SELECT avg(superhero.height_cm) FROM publisher INNER JOIN superhero ON publisher.id = superhero.publisher_id INNER JOIN race ON superhero.race_id = race.id WHERE publisher.publisher_name = 'Dark Horse Comics' AND race.race != 'Human'", "label": true, "error_types": [] }, { "id": 1092, "question": "Count the fastest superheroes.", "db_id": "superhero", "sql": "select count(superhero.id) from superhero inner join hero_attribute on superhero.id = hero_attribute.hero_id inner join attribute on attribute.id = hero_attribute.attribute_id where attribute.attribute_name = 'Speed' and hero_attribute.attribute_value = 100", "label": true, "error_types": [] }, { "id": 1093, "question": "Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.", "db_id": "superhero", "sql": "select case when count(case when publisher.publisher_name = 'DC Comics' then superhero.id else null end) > count(case when publisher.publisher_name = 'Marvel Comics' then superhero.id else null end) then 'DC Comics' else 'Marvel Comics' end as difference from publisher inner join superhero on publisher.id = superhero.publisher_id", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 1094, "question": "Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.", "db_id": "superhero", "sql": "SELECT SUM(CASE WHEN T1.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS difference FROM publisher AS T1 INNER JOIN superhero AS T2 ON T1.id = T2.publisher_id", "label": true, "error_types": [] }, { "id": 1095, "question": "Identify the weakest attribute of the Black Panther.", "db_id": "superhero", "sql": "select attribute.attribute_name from superhero inner join hero_attribute on superhero.id = hero_attribute.hero_id inner join attribute on attribute.id = hero_attribute.attribute_id where superhero.superhero_name = 'Black Panther' order by hero_attribute.attribute_value asc limit 1", "label": true, "error_types": [] }, { "id": 1096, "question": "What is Abomination's eye colour?", "db_id": "superhero", "sql": "select colour.colour from colour inner join superhero on colour.id = superhero.eye_colour_id where superhero.superhero_name = 'Abomination'", "label": true, "error_types": [] }, { "id": 1097, "question": "Name the superhero, otherwise known as Charles Chandler.", "db_id": "superhero", "sql": "SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler'", "label": true, "error_types": [] }, { "id": 1098, "question": "Among all superheroes created by George Lucas, identify the percentage of female superheroes.", "db_id": "superhero", "sql": "select cast(count(case when gender.gender = 'Female' then 1 else null end) as real) * 100 / count(superhero.id) from superhero inner join publisher on superhero.publisher_id = publisher.id inner join gender on superhero.gender_id = gender.id where publisher.publisher_name = 'George Lucas'", "label": true, "error_types": [] }, { "id": 1099, "question": "Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes.", "db_id": "superhero", "sql": "SELECT cast(sum(CASE WHEN alignment.alignment = 'Good' THEN 1 ELSE 0 END) AS REAL) * 100 / count(superhero.id) FROM superhero INNER JOIN publisher ON superhero.publisher_id = publisher.id INNER JOIN alignment ON superhero.alignment_id = alignment.id WHERE publisher.publisher_name = 'Marvel Comics'", "label": true, "error_types": [] }, { "id": 1100, "question": "What is the total number of superheroes that have John as their first name?", "db_id": "superhero", "sql": "SELECT COUNT(*) FROM superhero WHERE full_name LIKE 'John%'", "label": true, "error_types": [] }, { "id": 1101, "question": "Give the hero ID of superhero with the lowest attribute value.", "db_id": "superhero", "sql": "select hero_attribute.hero_id from superhero inner join hero_attribute on superhero.id = hero_attribute.hero_id order by hero_attribute.attribute_value asc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1102, "question": "Provide the full name of the superhero named Alien.", "db_id": "superhero", "sql": "select full_name from superhero where superhero_name = 'Alien'", "label": true, "error_types": [] }, { "id": 1103, "question": "In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.", "db_id": "superhero", "sql": "SELECT superhero.full_name FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id WHERE colour.colour = 'Brown' AND superhero.weight_kg < 100", "label": true, "error_types": [] }, { "id": 1104, "question": "List the attribute value of the superhero named Aquababy.", "db_id": "superhero", "sql": "select hero_attribute.attribute_value from superhero inner join hero_attribute on superhero.id = hero_attribute.hero_id where superhero.superhero_name = 'Aquababy'", "label": true, "error_types": [] }, { "id": 1105, "question": "Provide the weight and race of the superhero with superhero ID 40.", "db_id": "superhero", "sql": "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", "label": true, "error_types": [] }, { "id": 1106, "question": "Calculate the average height of all neutral superheroes.", "db_id": "superhero", "sql": "select avg(superhero.height_cm) from alignment inner join superhero on alignment.id = superhero.alignment_id where alignment.alignment = 'Neutral'", "label": true, "error_types": [] }, { "id": 1107, "question": "List the hero ID of superheroes have intellegence as their power.", "db_id": "superhero", "sql": "SELECT hero_power.hero_id FROM hero_power INNER JOIN superpower ON hero_power.power_id = superpower.id WHERE superpower.power_name = 'Intelligence'", "label": true, "error_types": [] }, { "id": 1108, "question": "Give the eye colour of Blackwulf.", "db_id": "superhero", "sql": "select colour.colour from colour inner join superhero on colour.id = superhero.eye_colour_id where superhero.superhero_name = 'Blackwulf'", "label": true, "error_types": [] }, { "id": 1109, "question": "List the power of superheroes with height greater than 80% of the average height of all superheroes.", "db_id": "superhero", "sql": "SELECT DISTINCT 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 > ( SELECT AVG(height_cm) * 0.8 FROM superhero )", "label": true, "error_types": [] }, { "id": 1110, "question": "Please list the reference names of the drivers who are eliminated in the first period in race number 20.", "db_id": "formula_1", "sql": "select distinct drivers.driverref from qualifying inner join drivers on qualifying.driverid = drivers.driverid where qualifying.raceid = 18 and qualifying.q1 limit 5", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1111, "question": "Please list the reference names of the drivers who are eliminated in the first period in race number 20.", "db_id": "formula_1", "sql": "SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 18 AND T1.q1 IS NOT NULL ORDER BY T1.q1 DESC LIMIT 5", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1112, "question": "Please list the year during which the race is held on circuits in Shanghai.", "db_id": "formula_1", "sql": "select distinct races.year from races inner join circuits on races.circuitid = circuits.circuitid where circuits.location = 'Shanghai'", "label": true, "error_types": [] }, { "id": 1113, "question": "Please give the name of the race held on the circuits in Germany.", "db_id": "formula_1", "sql": "select distinct races.name from races inner join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Germany'", "label": true, "error_types": [] }, { "id": 1114, "question": "How many races in the year 2010 are held on grand prixs outside Asia and Europe?", "db_id": "formula_1", "sql": "select count(races.raceid) from circuits inner join races on circuits.circuitid = races.circuitid where races.year = 2010 and circuits.country != 'Asia' or circuits.country != 'Europe'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1115, "question": "How many races in the year 2010 are held on grand prixs outside Asia and Europe?", "db_id": "formula_1", "sql": "SELECT COUNT(T1.raceId) FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.year = 2010 AND T2.country NOT IN ('Asia', 'Europe')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 1116, "question": "Please give the names of the races held on the circuits in Spain.", "db_id": "formula_1", "sql": "select distinct races.name from races inner join circuits on races.circuitid = circuits.circuitid where circuits.country = 'Spain'", "label": true, "error_types": [] }, { "id": 1117, "question": "What is the coordinates location of the circuits for Australian grand prix?", "db_id": "formula_1", "sql": "select circuits.lat , circuits.lng from races inner join circuits on races.circuitid = circuits.circuitid where races.name = 'Australian Grand Prix'", "label": true, "error_types": [] }, { "id": 1118, "question": "Please list the time of the races held on Sepang International Circuit.", "db_id": "formula_1", "sql": "SELECT T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'Sepang International Circuit'", "label": true, "error_types": [] }, { "id": 1119, "question": "Give the coordinate position for Abu Dhabi Grand Prix.", "db_id": "formula_1", "sql": "SELECT circuits.lat, circuits.lng FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.name = 'Abu Dhabi Grand Prix'", "label": true, "error_types": [] }, { "id": 1120, "question": "What's Bruno Senna's Q1 result in the qualifying race No. 354?", "db_id": "formula_1", "sql": "select distinct results.resultid from qualifying inner join results on qualifying.driverid = results.driverid inner join drivers on drivers.driverid = results.driverid where drivers.forename = 'Bruno' and drivers.surname = 'Senna' and qualifying.raceid = 354 and qualifying.q1 = '1'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1121, "question": "What's Bruno Senna's Q1 result in the qualifying race No. 354?", "db_id": "formula_1", "sql": "SELECT qualifying.q1 FROM drivers INNER JOIN qualifying ON drivers.driverid = qualifying.driverid WHERE drivers.forename = 'Bruno' AND drivers.surname = 'Senna' AND qualifying.raceid = 354", "label": true, "error_types": [] }, { "id": 1122, "question": "For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?", "db_id": "formula_1", "sql": "select distinct drivers.nationality from qualifying inner join drivers on qualifying.driverid = drivers.driverid where qualifying.raceid = 355 and qualifying.q2 = '0:01:40'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1123, "question": "For the Bahrain Grand Prix in 2007, how many drivers not finished the game?", "db_id": "formula_1", "sql": "select count(results.driverid) from results inner join races on results.raceid = races.raceid where races.name = 'Bahrain Grand Prix' and races.year = 2007 and results.statusid != 0", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1124, "question": "For the Bahrain Grand Prix in 2007, how many drivers not finished the game?", "db_id": "formula_1", "sql": "SELECT COUNT(T1.raceId) FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId INNER JOIN status AS T3 ON T2.statusId = T3.statusId WHERE T1.name = 'Bahrain Grand Prix' AND T1.year = 2007 AND T3.status != 'Finished'", "label": true, "error_types": [] }, { "id": 1125, "question": "Show me the season page of year when the race No. 901 took place.", "db_id": "formula_1", "sql": "select distinct races.year from results inner join races on results.raceid = races.raceid where results.number = 901", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1126, "question": "Show me the season page of year when the race No. 901 took place.", "db_id": "formula_1", "sql": "SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T1.year = T2.year WHERE T1.raceId = 901", "label": true, "error_types": [] }, { "id": 1127, "question": "For the race happened on 2015/11/29, how many drivers finished the game?", "db_id": "formula_1", "sql": "select count(distinct results.driverid) from results inner join races on results.raceid = races.raceid where races.date = '2015-11-29'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1128, "question": "For the race happened on 2015/11/29, how many drivers finished the game?", "db_id": "formula_1", "sql": "SELECT COUNT(*) FROM results AS T1 JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.date = '2015-11-29' AND T1.time IS NOT NULL", "label": true, "error_types": [] }, { "id": 1129, "question": "Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.", "db_id": "formula_1", "sql": "SELECT T2.url FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 161 AND T1.time = '0:01:27'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1130, "question": "For the driver who set the fastest lap speed in race No.933, where does he come from?", "db_id": "formula_1", "sql": "select drivers.surname , drivers.forename from results inner join drivers on results.driverid = drivers.driverid where results.raceid = 933 group by drivers.driverid", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1131, "question": "For the driver who set the fastest lap speed in race No.933, where does he come from?", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE results.raceid = 933 ORDER BY results.fastestlapspeed DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1132, "question": "For the driver who set the fastest lap speed in race No.933, where does he come from?", "db_id": "formula_1", "sql": "SELECT T2.nationality FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 933 ORDER BY T1.fastestLapSpeed DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1133, "question": "Where is Malaysian Grand Prix held? Give the location coordinates.", "db_id": "formula_1", "sql": "SELECT T2.lat, T2.lng FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'Malaysian Grand Prix'", "label": true, "error_types": [] }, { "id": 1134, "question": "For the constructor which got the highest point in the race No. 9 , what is its introduction website?", "db_id": "formula_1", "sql": "select constructors.url from constructors inner join results on constructors.constructorid = results.constructorid inner join constructorresults on results.constructorid = constructorresults.constructorid where results.raceid = 9 order by constructorresults.points desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1135, "question": "For the constructor which got the highest point in the race No. 9 , what is its introduction website?", "db_id": "formula_1", "sql": "SELECT constructors.url FROM constructors INNER JOIN constructorresults ON constructors.constructorid = constructorresults.constructorid WHERE constructorresults.raceid = 9 ORDER BY constructorresults.points DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1136, "question": "What's Lucas di Grassi's Q1 result in the race No. 345?", "db_id": "formula_1", "sql": "select distinct results.resultid from drivers inner join qualifying on drivers.driverid = qualifying.driverid inner join results on qualifying.raceid = results.raceid where qualifying.raceid = 345 and drivers.surname = 'di Grassi' and qualifying.q1 = 0", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1137, "question": "What's Lucas di Grassi's Q1 result in the race No. 345?", "db_id": "formula_1", "sql": "SELECT qualifying.q1 FROM drivers INNER JOIN qualifying ON drivers.driverid = qualifying.driverid WHERE drivers.forename = 'Lucas' AND drivers.surname = 'di Grassi' AND qualifying.raceid = 345", "label": true, "error_types": [] }, { "id": 1138, "question": "For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from?", "db_id": "formula_1", "sql": "SELECT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 347 AND T1.q2 = '0:01:15'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1139, "question": "In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code?", "db_id": "formula_1", "sql": "SELECT T3.code FROM qualifying AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId INNER JOIN drivers AS T3 ON T1.driverId = T3.driverId WHERE T2.raceId = 45 AND T1.q3 = '0:01:33'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1140, "question": "What is the actual finish time for Bruce McLaren in the race No.743?", "db_id": "formula_1", "sql": "SELECT results.time FROM drivers INNER JOIN results ON drivers.driverid = results.driverid WHERE drivers.forename = 'Bruce' AND drivers.surname = 'McLaren' AND results.raceid = 743", "label": true, "error_types": [] }, { "id": 1141, "question": "What is the actual finish time for Bruce McLaren in the race No.743?", "db_id": "formula_1", "sql": "SELECT T2.milliseconds FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId INNER JOIN drivers AS T3 ON T2.driverId = T3.driverId WHERE T1.raceId = 743 AND T3.forename = 'Bruce'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1142, "question": "Who finished second in the San Marino Grand Prix in 2006?", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where races.name = 'San Marino Grand Prix' and races.year = 2006 and results.position = 2", "label": true, "error_types": [] }, { "id": 1143, "question": "Who finished second in the San Marino Grand Prix in 2006?", "db_id": "formula_1", "sql": "SELECT T2.surname FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T1.raceId = T3.raceId WHERE T3.name = 'San Marino Grand Prix' AND T3.year = 2006 AND T1.position = 2", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1144, "question": "Show me the season page of year when the race No. 901 took place.", "db_id": "formula_1", "sql": "select distinct races.year from results inner join races on results.raceid = races.raceid where results.number = 901", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1145, "question": "Show me the season page of year when the race No. 901 took place.", "db_id": "formula_1", "sql": "SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T1.year = T2.year WHERE T1.raceId = 901", "label": true, "error_types": [] }, { "id": 1146, "question": "For the race happened in 2015/11/29, how many drivers did not finish the game?", "db_id": "formula_1", "sql": "select count(distinct drivers.driverid) from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where races.date = '2015-11-29'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1147, "question": "For the race happened in 2015/11/29, how many drivers did not finish the game?", "db_id": "formula_1", "sql": "SELECT COUNT(T2.raceId) FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId INNER JOIN status AS T3 ON T2.statusId = T3.statusId WHERE T1.date = '2015-11-29' AND T3.status = 'Finished'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1148, "question": "For all the drivers who finished the game in race No. 872, who is the youngest?", "db_id": "formula_1", "sql": "select drivers.driverid from results inner join races on results.raceid = races.raceid inner join laptimes on races.raceid = laptimes.raceid inner join drivers on drivers.driverid = laptimes.driverid where races.raceid = '872' order by drivers.dob desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1149, "question": "For all the drivers who finished the game in race No. 872, who is the youngest?", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE results.raceid = 872 ORDER BY drivers.dob DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1150, "question": "For all the drivers who finished the game in race No. 872, who is the youngest?", "db_id": "formula_1", "sql": "SELECT T1.driverId FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 872 AND T1.time IS NOT NULL ORDER BY T2.dob DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1151, "question": "Who was the driver that got the best lap time in the race No. 348? Give his full name.", "db_id": "formula_1", "sql": "select drivers.surname , drivers.forename from results inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.driverid = laptimes.driverid where results.raceid = 348 order by laptimes.time asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1152, "question": "Who was the driver that got the best lap time in the race No. 348? Give his full name.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid WHERE laptimes.raceid = 348 ORDER BY laptimes.time LIMIT 1", "label": true, "error_types": [] }, { "id": 1153, "question": "Who was the driver that got the best lap time in the race No. 348? Give his full name.", "db_id": "formula_1", "sql": "SELECT T2.forename || ' ' || T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 348 ORDER BY T1.milliseconds ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1154, "question": "For the driver who set the fastest lap speed, what is his nationality?", "db_id": "formula_1", "sql": "select distinct drivers.nationality from results inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.raceid = laptimes.raceid where results.raceid = 348", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1155, "question": "For the driver who set the fastest lap speed, what is his nationality?", "db_id": "formula_1", "sql": "SELECT drivers.nationality FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE results.raceid = 348 ORDER BY results.fastestlapspeed DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1156, "question": "For the driver who set the fastest lap speed, what is his nationality?", "db_id": "formula_1", "sql": "SELECT T2.nationality FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.fastestLapSpeed = (SELECT MAX(fastestLapSpeed) FROM results)", "label": true, "error_types": [] }, { "id": 1157, "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?", "db_id": "formula_1", "sql": "select cast((( select fastestlapspeed from results where raceid = 853 ) - ( select fastestlapspeed from results where raceid = 854) ) as real) * 100 / ( select fastestlapspeed from results where raceid = 854 ) from results inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.raceid = laptimes.raceid where drivers.surname = 'di Resta' and drivers.forename = 'Paul'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1158, "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?", "db_id": "formula_1", "sql": "SELECT cast((results.fastestlapspeed - ( SELECT fastestlapspeed FROM results WHERE raceid = 852 AND driverid = 452 )) AS REAL) * 100 / results.fastestlapspeed FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE results.raceid = 853 AND drivers.forename = 'Paul' AND drivers.surname = 'di Resta'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1159, "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?", "db_id": "formula_1", "sql": "SELECT CAST((SUM(CASE WHEN T2.raceId = 853 THEN REPLACE(T2.fastestLapSpeed, ',', '.') END) - SUM(CASE WHEN T2.raceId = 854 THEN REPLACE(T2.fastestLapSpeed, ',', '.') END)) AS REAL) * 100 / SUM(CASE WHEN T2.raceId = 853 THEN REPLACE(T2.fastestLapSpeed, ',', '.') END) AS percentage FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Paul' AND T1.surname = 'di Resta'", "label": true, "error_types": [] }, { "id": 1160, "question": "For the drivers who took part in the race in 1983/7/16, what's their race completion rate?", "db_id": "formula_1", "sql": "select cast(sum(case when results.time = 0 then 1 else 0 end) as real) * 100 / count(*) from results inner join races on results.raceid = races.raceid where races.date = '1983-07-16'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1161, "question": "For the drivers who took part in the race in 1983/7/16, what's their race completion rate?", "db_id": "formula_1", "sql": "SELECT cast(count(CASE WHEN results.time IS NOT NULL THEN 1 ELSE NULL END) AS REAL) * 100 / count(results.driverid) FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.date = '1983-07-16'", "label": true, "error_types": [] }, { "id": 1162, "question": "Which year was the first Singapore Grand Prix?", "db_id": "formula_1", "sql": "SELECT MIN(year) FROM races WHERE name = 'Singapore Grand Prix'", "label": true, "error_types": [] }, { "id": 1163, "question": "How many races were there in 2005? Name all the races in descending order.", "db_id": "formula_1", "sql": "select count(name) as num from races where year = '2005' order by name desc", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1164, "question": "How many races were there in 2005? Name all the races in descending order.", "db_id": "formula_1", "sql": "SELECT name FROM races WHERE year = 2005 ORDER BY name DESC", "label": true, "error_types": [] }, { "id": 1165, "question": "List the names of all races that occurred in the earliest recorded year and month.", "db_id": "formula_1", "sql": "SELECT name FROM races WHERE strftime('%Y-%m', date) = ( SELECT strftime('%Y-%m', min(date)) FROM races )", "label": true, "error_types": [] }, { "id": 1166, "question": "State the name and date of the last round of race in year 1999.", "db_id": "formula_1", "sql": "select name , date from races where year = 1999 order by round desc limit 1", "label": true, "error_types": [] }, { "id": 1167, "question": "Which year has the most number of races?", "db_id": "formula_1", "sql": "SELECT YEAR FROM races GROUP BY YEAR ORDER BY count(round) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1168, "question": "In which country was the first European Grand Prix hosted? Name the circuit and location.", "db_id": "formula_1", "sql": "select circuits.country , circuits.location from circuits inner join races on circuits.circuitid = races.circuitid where races.name = 'European Grand Prix' order by races.year asc limit 1", "label": true, "error_types": [] }, { "id": 1169, "question": "In which country was the first European Grand Prix hosted? Name the circuit and location.", "db_id": "formula_1", "sql": "SELECT T2.country, T2.name, T2.location FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'European Grand Prix' ORDER BY T1.year LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1170, "question": "When was the last f1 season whereby Brands Hatch hosted the British Grand Prix?", "db_id": "formula_1", "sql": "select races.year from circuits inner join races on circuits.circuitid = races.circuitid where races.name = 'British Grand Prix' and circuits.name = 'Brands Hatch' order by races.year desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1171, "question": "How many seasons has Silverstone Circuit hosted the United Kindom grand prix?", "db_id": "formula_1", "sql": "SELECT count(races.year) FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE circuits.name = 'Silverstone Circuit' AND races.name = 'British Grand Prix'", "label": true, "error_types": [] }, { "id": 1172, "question": "Name all drivers in the 2010 Singapore Grand Prix order by their position stands.", "db_id": "formula_1", "sql": "select distinct drivers.forename , drivers.surname from results inner join drivers on results.driverid = drivers.driverid inner join driverstandings on drivers.driverid = driverstandings.driverid inner join races on results.raceid = races.raceid where races.name = '2010 Singapore Grand Prix'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1173, "question": "Name all drivers in the 2010 Singapore Grand Prix order by their position stands.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM races INNER JOIN results ON races.raceid = results.raceid INNER JOIN drivers ON results.driverid = drivers.driverid WHERE races.year = 2010 AND races.name = 'Singapore Grand Prix' ORDER BY results.position", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1174, "question": "Name all drivers in the 2010 Singapore Grand Prix order by their position stands.", "db_id": "formula_1", "sql": "SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN driverStandings AS T2 ON T1.raceId = T2.raceId INNER JOIN drivers AS T3 ON T2.driverId = T3.driverId WHERE T1.name = 'Singapore Grand Prix' AND T1.year = 2010 ORDER BY T2.position", "label": true, "error_types": [] }, { "id": 1175, "question": "State the driver with the most points scored. Find his full name with that points.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from drivers inner join driverstandings on drivers.driverid = driverstandings.driverid order by driverstandings.points desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1176, "question": "State the driver with the most points scored. Find his full name with that points.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM results INNER JOIN drivers ON results.driverid = drivers.driverid ORDER BY results.points DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1177, "question": "State the driver with the most points scored. Find his full name with that points.", "db_id": "formula_1", "sql": "SELECT T2.forename, T2.surname, T1.points FROM driverStandings AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId ORDER BY T1.points DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1178, "question": "Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname , results.points from results inner join drivers on results.driverid = drivers.driverid inner join driverstandings on drivers.driverid = driverstandings.driverid inner join races on driverstandings.raceid = races.raceid where races.name = 'Chinese Grand Prix' and races.year = 2017 order by driverstandings.position desc limit 3", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1179, "question": "Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname, driverstandings.points FROM races INNER JOIN driverstandings ON races.raceid = driverstandings.raceid INNER JOIN drivers ON driverstandings.driverid = drivers.driverid WHERE races.name = 'Chinese Grand Prix' AND races.year = 2017 ORDER BY driverstandings.points DESC LIMIT 3", "label": true, "error_types": [] }, { "id": 1180, "question": "Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix.", "db_id": "formula_1", "sql": "SELECT T3.forename || ' ' || T3.surname AS name, T1.points 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 = 2017 AND T2.name = 'Chinese Grand Prix' ORDER BY T1.points DESC LIMIT 3", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1181, "question": "What is the best lap time recorded? List the driver and race with such recorded lap time.", "db_id": "formula_1", "sql": "select drivers.surname , races.name from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid inner join laptimes on results.raceid = laptimes.raceid order by laptimes.time asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1182, "question": "What is the best lap time recorded? List the driver and race with such recorded lap time.", "db_id": "formula_1", "sql": "SELECT laptimes.time, drivers.forename, drivers.surname, races.name FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid INNER JOIN races ON laptimes.raceid = races.raceid ORDER BY laptimes.time LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1183, "question": "What is the best lap time recorded? List the driver and race with such recorded lap time.", "db_id": "formula_1", "sql": "SELECT T2.milliseconds, T3.surname, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T1.raceId = T2.raceId INNER JOIN drivers AS T3 ON T2.driverId = T3.driverId ORDER BY T2.milliseconds ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1184, "question": "What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix?", "db_id": "formula_1", "sql": "select avg(laptimes.time) from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.driverid = laptimes.driverid inner join races on results.raceid = races.raceid where drivers.forename = 'Sebastian' and drivers.surname = 'Vettel' and races.year = 2009", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1185, "question": "What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix?", "db_id": "formula_1", "sql": "SELECT avg(laptimes.time) FROM drivers INNER JOIN laptimes ON drivers.driverid = laptimes.driverid INNER JOIN races ON laptimes.raceid = races.raceid WHERE races.year = 2009 AND drivers.forename = 'Sebastian' AND drivers.surname = 'Vettel'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1186, "question": "What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix?", "db_id": "formula_1", "sql": "SELECT AVG(T3.milliseconds) AS average_lap_time FROM drivers AS T1 INNER JOIN lapTimes AS T3 ON T1.driverId = T3.driverId INNER JOIN races AS T2 ON T3.raceId = T2.raceId WHERE T1.forename = 'Sebastian' AND T1.surname = 'Vettel' AND T2.year = 2009 AND T2.name = 'Chinese Grand Prix'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1187, "question": "Name the driver with the most winning. Mention his nationality and what is his maximum point scores.", "db_id": "formula_1", "sql": "select drivers.nationality , drivers.surname , avg(driverstandings.points) from drivers inner join driverstandings on drivers.driverid = driverstandings.driverid group by drivers.driverid order by count(driverstandings.wins) desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1188, "question": "Name the driver with the most winning. Mention his nationality and what is his maximum point scores.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname, drivers.nationality, avg(driverstandings.points) FROM drivers INNER JOIN driverstandings ON drivers.driverid = driverstandings.driverid GROUP BY drivers.driverid, drivers.forename, drivers.surname, drivers.nationality ORDER BY count(driverstandings.wins) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1189, "question": "Name the driver with the most winning. Mention his nationality and what is his maximum point scores.", "db_id": "formula_1", "sql": "SELECT T1.surname, T1.nationality, AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T1.driverId = T2.driverId WHERE T2.wins IS NOT NULL GROUP BY T1.surname, T1.nationality ORDER BY COUNT(T2.wins) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1190, "question": "How old is the youngest Japanese driver? What is his name?", "db_id": "formula_1", "sql": "select dob , max(dob) from drivers where nationality = 'Japanese'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1191, "question": "How old is the youngest Japanese driver? What is his name?", "db_id": "formula_1", "sql": "SELECT 2022 - strftime('%Y', dob) FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1192, "question": "How old is the youngest Japanese driver? What is his name?", "db_id": "formula_1", "sql": "SELECT 2022 - strftime('%Y', dob) + 1 AS age, forename || ' ' || surname AS name FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1193, "question": "List circuits which host 4 f1 races from year 1990 to 2000.", "db_id": "formula_1", "sql": "select circuits.name from races inner join circuits on races.circuitid = circuits.circuitid where races.year between 1990 and 2000 group by circuits.name having count(races.year) = 4", "label": true, "error_types": [] }, { "id": 1194, "question": "List circuits which host 4 f1 races from year 1990 to 2000.", "db_id": "formula_1", "sql": "SELECT DISTINCT circuits.name FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.year BETWEEN 1990 AND 2000", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1195, "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.", "db_id": "formula_1", "sql": "select distinct circuits.name , circuits.location , races.name from circuits inner join races on circuits.circuitid = races.circuitid where races.year = 2006 and circuits.country = 'USA'", "label": true, "error_types": [] }, { "id": 1196, "question": "Name the races along with its circuit name and location for f1 races hosted in September 2005.", "db_id": "formula_1", "sql": "select distinct races.name , circuits.name , circuits.location from races inner join circuits on races.circuitid = circuits.circuitid where races.year = 2005 and races.date like '9/%/2005'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1197, "question": "Name the races along with its circuit name and location for f1 races hosted in September 2005.", "db_id": "formula_1", "sql": "SELECT T1.name, T2.name, T2.location FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.year = 2005 AND SUBSTR(T1.date, 6, 2) = '09'", "label": true, "error_types": [] }, { "id": 1198, "question": "Which race was Alex Yoong in when he was in track number less than 20?", "db_id": "formula_1", "sql": "select races.name from results inner join races on results.raceid = races.raceid inner join drivers on results.driverid = drivers.driverid where drivers.surname = 'Yoong' and drivers.forename = 'Alex' and results.position < 10", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1199, "question": "State the race and year of race in which Michael Schumacher had his fastest lap.", "db_id": "formula_1", "sql": "select distinct races.name , races.year from results inner join races on results.raceid = races.raceid inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.driverid = laptimes.driverid where drivers.surname = 'Schumacher' and drivers.forename = 'Michael' and results.fastestlap = laptimes.milliseconds", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1200, "question": "State the race and year of race in which Michael Schumacher had his fastest lap.", "db_id": "formula_1", "sql": "SELECT races.name, races.year FROM races INNER JOIN results ON races.raceid = results.raceid INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.forename = 'Michael' AND drivers.surname = 'Schumacher' ORDER BY results.milliseconds LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1201, "question": "State the race and year of race in which Michael Schumacher had his fastest lap.", "db_id": "formula_1", "sql": "SELECT T3.name, T3.year FROM drivers AS T1 INNER JOIN lapTimes AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T2.raceId = T3.raceId WHERE T1.forename = 'Michael' AND T1.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1202, "question": "What is Eddie Irvine's average points scored in year 2000?", "db_id": "formula_1", "sql": "SELECT avg(driverstandings.points) FROM drivers INNER JOIN driverstandings ON drivers.driverid = driverstandings.driverid WHERE drivers.forename = 'Eddie' AND drivers.surname = 'Irvine' AND driverstandings.raceid IN ( SELECT raceid FROM races WHERE YEAR = 2000 )", "label": true, "error_types": [] }, { "id": 1203, "question": "What is Eddie Irvine's average points scored in year 2000?", "db_id": "formula_1", "sql": "SELECT AVG(T3.points) FROM drivers AS T1 INNER JOIN results AS T3 ON T1.driverId = T3.driverId INNER JOIN races AS T2 ON T3.raceId = T2.raceId WHERE T1.forename = 'Eddie' AND T1.surname = 'Irvine' AND T2.year = 2000", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1204, "question": "Which was Lewis Hamilton first race? What was his points recorded for his first race event?", "db_id": "formula_1", "sql": "select races.name , results.points from results inner join drivers on results.driverid = drivers.driverid inner join driverstandings on drivers.driverid = driverstandings.driverid inner join races on driverstandings.raceid = races.raceid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis' order by races.year asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1205, "question": "Which was Lewis Hamilton first race? What was his points recorded for his first race event?", "db_id": "formula_1", "sql": "SELECT races.year, driverstandings.points FROM races INNER JOIN driverstandings ON races.raceid = driverstandings.raceid INNER JOIN drivers ON driverstandings.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' ORDER BY races.year LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1206, "question": "Which was Lewis Hamilton first race? What was his points recorded for his first race event?", "db_id": "formula_1", "sql": "SELECT T3.year, T1.points FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T1.raceId = T3.raceId WHERE T2.surname = 'Hamilton' ORDER BY T3.year LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1207, "question": "List all races in 2017 and the hosting country order by date of the event.", "db_id": "formula_1", "sql": "select distinct races.date , circuits.country from races inner join circuits on races.circuitid = circuits.circuitid where races.year = 2017 order by races.date desc", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 1208, "question": "List all races in 2017 and the hosting country order by date of the event.", "db_id": "formula_1", "sql": "SELECT T1.name, T2.country FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.year = 2017 ORDER BY T1.date", "label": true, "error_types": [] }, { "id": 1209, "question": "What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted.", "db_id": "formula_1", "sql": "select races.name , races.year , circuits.location from results inner join races on results.raceid = races.raceid inner join circuits on races.circuitid = circuits.circuitid order by results.laps desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1210, "question": "What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted.", "db_id": "formula_1", "sql": "SELECT T2.laps, T1.name, T1.year, T3.location FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId INNER JOIN circuits AS T3 ON T1.circuitId = T3.circuitId ORDER BY T2.laps DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1211, "question": "Among all European Grand Prix races, what is the percentage of the races were hosted in Germany?", "db_id": "formula_1", "sql": "SELECT CAST(SUM(CASE WHEN T2.country = 'Germany' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'European Grand Prix'", "label": true, "error_types": [] }, { "id": 1212, "question": "What's the location coordinates of Silverstone Circuit?", "db_id": "formula_1", "sql": "select lat , lng from circuits where location = 'Silverstone'", "label": true, "error_types": [] }, { "id": 1213, "question": "Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring?", "db_id": "formula_1", "sql": "select circuits.name from circuits inner join races on circuits.circuitid = races.circuitid where circuits.name in ('Silverstone Circuit' , 'Hockenheimring' , 'Hungaroring') order by circuits.lat desc limit 1", "label": true, "error_types": [] }, { "id": 1214, "question": "Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring?", "db_id": "formula_1", "sql": "SELECT name FROM circuits ORDER BY lat DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1215, "question": "What's the reference name of Marina Bay Street Circuit?", "db_id": "formula_1", "sql": "SELECT circuitref FROM circuits WHERE name = 'Marina Bay Street Circuit'", "label": true, "error_types": [] }, { "id": 1216, "question": "In which country can I find the circuit with the highest altitude?", "db_id": "formula_1", "sql": "SELECT country FROM circuits ORDER BY alt DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1217, "question": "In which country can I find the circuit with the highest altitude?", "db_id": "formula_1", "sql": "SELECT country FROM circuits WHERE alt IS NOT NULL ORDER BY alt DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1218, "question": "How many drivers don't have a code?", "db_id": "formula_1", "sql": "SELECT count(driverid) FROM drivers WHERE code IS NULL", "label": true, "error_types": [] }, { "id": 1219, "question": "Which country is the oldest driver from?", "db_id": "formula_1", "sql": "select nationality from drivers where dob is not null order by dob asc limit 1", "label": true, "error_types": [] }, { "id": 1220, "question": "Which country is the oldest driver from?", "db_id": "formula_1", "sql": "SELECT nationality FROM drivers ORDER BY dob LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1221, "question": "Please list the surnames of all the Italian drivers.", "db_id": "formula_1", "sql": "select surname from drivers where nationality = 'italian'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1222, "question": "Please list the surnames of all the Italian drivers.", "db_id": "formula_1", "sql": "SELECT surname FROM drivers WHERE nationality = 'Italian'", "label": true, "error_types": [] }, { "id": 1223, "question": "Which website should I go to if I want to know more about Anthony Davidson?", "db_id": "formula_1", "sql": "select url from drivers where forename = 'Anthony' and surname = 'Davidson'", "label": true, "error_types": [] }, { "id": 1224, "question": "What's Lewis Hamilton's reference name?", "db_id": "formula_1", "sql": "select driverref from drivers where forename = 'Lewis' and surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1225, "question": "Which circuit did the 2009 Spanish Grand Prix use?", "db_id": "formula_1", "sql": "select circuits.name from races inner join circuits on races.circuitid = circuits.circuitid where races.name = 'Spanish Grand Prix' and races.year = 2009", "label": true, "error_types": [] }, { "id": 1226, "question": "Please list all the years that Silverstone Circuit was used in a Formula_1 race.", "db_id": "formula_1", "sql": "SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'Silverstone Circuit'", "label": true, "error_types": [] }, { "id": 1227, "question": "What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit?", "db_id": "formula_1", "sql": "select races.time from races inner join circuits on races.circuitid = circuits.circuitid where races.year = 2010 and circuits.location = 'Abu Dhabi'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1228, "question": "What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit?", "db_id": "formula_1", "sql": "SELECT races.time FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.year = 2010 AND circuits.name = 'Abu Dhabi Grand Prix'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1229, "question": "How many Formula_1 races took place on the circuits in Italy?", "db_id": "formula_1", "sql": "SELECT COUNT(T2.circuitId) FROM races AS T1 INNER JOIN circuits AS T2 ON T1.circuitId = T2.circuitId WHERE T2.country = 'Italy'", "label": true, "error_types": [] }, { "id": 1230, "question": "Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit.", "db_id": "formula_1", "sql": "select races.date from races inner join circuits on races.circuitid = circuits.circuitid where circuits.name = 'Barcelona-Catalunya'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1231, "question": "Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit.", "db_id": "formula_1", "sql": "SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'", "label": true, "error_types": [] }, { "id": 1232, "question": "Please give the link of the website that shows more information about the circuits the Spanish Grand Prix used in 2009.", "db_id": "formula_1", "sql": "select circuits.url from races inner join circuits on races.circuitid = circuits.circuitid where races.year = 2009 and races.name = 'Spanish Grand Prix'", "label": true, "error_types": [] }, { "id": 1233, "question": "Please give the link of the website that shows more information about the circuits the Spanish Grand Prix used in 2009.", "db_id": "formula_1", "sql": "SELECT races.url FROM races INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.year = 2009 AND races.name = 'Spanish Grand Prix'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1234, "question": "What's the fastest lap time ever in a race for Lewis Hamilton?", "db_id": "formula_1", "sql": "SELECT min(results.fastestlaptime) FROM drivers INNER JOIN results ON drivers.driverid = results.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1235, "question": "Which driver created the fastest lap speed in a Formula_1 race? Please give both his forename and surname.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.driverid = laptimes.driverid inner join races on laptimes.raceid = races.raceid where races.name = 'Formula1' order by results.fastestlapspeed desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1236, "question": "Which driver created the fastest lap speed in a Formula_1 race? Please give both his forename and surname.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM results INNER JOIN drivers ON results.driverid = drivers.driverid ORDER BY results.fastestlapspeed DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1237, "question": "Which driver ranked the first in the Canadian Grand Prix in 2007? Please give his reference name.", "db_id": "formula_1", "sql": "select drivers.driverref from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and races.year = 2008 order by results.rank desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1238, "question": "Which driver ranked the first in the Canadian Grand Prix in 2007? Please give his reference name.", "db_id": "formula_1", "sql": "SELECT T2.driverRef FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T1.raceId = T3.raceId WHERE T3.name = 'Australian Grand Prix' AND T3.year = 2008 AND T1.positionOrder = 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1239, "question": "Please list the Formula_1 races that Lewis Hamilton participated.", "db_id": "formula_1", "sql": "SELECT T3.name FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T2.raceId = T3.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1240, "question": "What was the fastest lap speed among all drivers in the 2009 Spanish Grand Prix?", "db_id": "formula_1", "sql": "SELECT max(results.fastestlapspeed) FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.year = 2009 AND races.name = 'Spanish Grand Prix'", "label": true, "error_types": [] }, { "id": 1241, "question": "In which years did Lewis Hamilton participate in a Formula_1 race?", "db_id": "formula_1", "sql": "SELECT DISTINCT races.year FROM races INNER JOIN results ON races.raceid = results.raceid INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1242, "question": "What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix?", "db_id": "formula_1", "sql": "select distinct results.positionorder from results inner join driverstandings on results.driverid = driverstandings.driverid inner join races on driverstandings.raceid = races.raceid inner join drivers on driverstandings.driverid = drivers.driverid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis' and races.year = 2008 and races.name = 'Australian Grand Prix'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1243, "question": "What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix?", "db_id": "formula_1", "sql": "SELECT results.positionorder FROM races INNER JOIN results ON races.raceid = results.raceid INNER JOIN drivers ON results.driverid = drivers.driverid WHERE races.year = 2008 AND drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1244, "question": "What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix?", "db_id": "formula_1", "sql": "SELECT T2.positionOrder FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T2.raceId = T3.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T3.name = 'Australian Grand Prix' AND T3.year = 2008", "label": true, "error_types": [] }, { "id": 1245, "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.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where races.year = 2008 and results.grid = 4", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1246, "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.", "db_id": "formula_1", "sql": "SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId INNER JOIN drivers AS T3 ON T2.driverId = T3.driverId WHERE T1.year = 2008 AND T1.name = 'Australian Grand Prix' AND T2.grid = 4", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1247, "question": "How many drivers managed to finish the race in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "select count(results.driverid) from results inner join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and races.time is not null", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1248, "question": "How many drivers managed to finish the race in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT COUNT(T1.raceId) FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.year = 2008 AND T1.name = 'Australian Grand Prix' AND T2.time IS NOT NULL", "label": true, "error_types": [] }, { "id": 1249, "question": "Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "select results.fastestlap from results inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.driverid = laptimes.driverid inner join races on results.raceid = races.raceid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis' and races.name = 'Australian Grand Prix' and races.date = '2008' order by results.fastestlap desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1250, "question": "Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT results.fastestlap FROM drivers INNER JOIN results ON drivers.driverid = results.driverid INNER JOIN races ON results.raceid = races.raceid WHERE races.year = 2008 AND drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1251, "question": "Which was the fastest lap for Lewis Hamilton in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT T3.fastestLapTime FROM races AS T1 INNER JOIN results AS T3 ON T1.raceId = T3.raceId INNER JOIN drivers AS T2 ON T3.driverId = T2.driverId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.forename = 'Lewis' AND T2.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1252, "question": "What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix?", "db_id": "formula_1", "sql": "select results.time from results inner join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and results.rank = 2 order by results.time desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1253, "question": "What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix?", "db_id": "formula_1", "sql": "SELECT T2.time FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.positionOrder = 2", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1254, "question": "Who was the champion of 2008's Australian Grand Prix and where can I know more about him?", "db_id": "formula_1", "sql": "select drivers.driverref , drivers.url from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and races.year = 2008", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1255, "question": "Who was the champion of 2008's Australian Grand Prix and where can I know more about him?", "db_id": "formula_1", "sql": "SELECT results.time, races.url FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.year = 2008 AND races.name = 'Australian Grand Prix' ORDER BY results.points DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1256, "question": "Who was the champion of 2008's Australian Grand Prix and where can I know more about him?", "db_id": "formula_1", "sql": "SELECT T2.forename, T2.url FROM results AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T1.raceId = T3.raceId WHERE T3.year = 2008 AND T3.name = 'Australian Grand Prix' AND T1.time IS NOT NULL ORDER BY T1.time ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1257, "question": "How many drivers from the UN participated in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "select count(drivers.driverid) from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid inner join driverstandings on drivers.driverid = driverstandings.driverid where races.name = 'Australian Grand Prix' and drivers.nationality = 'American' and races.year = 2008", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1258, "question": "Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races?", "db_id": "formula_1", "sql": "select count(races.raceid) from races inner join laptimes on races.raceid = laptimes.raceid inner join results on laptimes.raceid = results.raceid where races.year = 2008 and races.name = 'Australian Grand Prix'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1259, "question": "Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races?", "db_id": "formula_1", "sql": "SELECT COUNT(T1.driverId) FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.year = 2008 AND T2.name = 'Australian Grand Prix' AND T1.time IS NOT NULL", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1260, "question": "How many points did Lewis Hamilton get in total in all the Formula_1 races he participated?", "db_id": "formula_1", "sql": "select sum(results.points) from results inner join driverstandings on results.driverid = driverstandings.driverid inner join drivers on driverstandings.driverid = drivers.driverid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1261, "question": "How many points did Lewis Hamilton get in total in all the Formula_1 races he participated?", "db_id": "formula_1", "sql": "SELECT sum(results.points) FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1262, "question": "What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?", "db_id": "formula_1", "sql": "select avg(results.fastestlaptime) from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1263, "question": "What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?", "db_id": "formula_1", "sql": "SELECT avg(cast(substr(fastestlaptime, 3, length(fastestlaptime) - 4) AS REAL)) FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1264, "question": "What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?", "db_id": "formula_1", "sql": "SELECT AVG(CAST(SUBSTR(T2.fastestLapTime, 4, 2) AS REAL) * 60 + CAST(SUBSTR(T2.fastestLapTime, 7) AS REAL)) AS average_fastest_lap_time_seconds FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1265, "question": "How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "select cast((races.time - results.time) as real) * 100 / results.driverid from results inner join races on results.raceid = races.raceid inner join driverstandings on results.driverid = driverstandings.driverid where races.year = 2008 and races.name = 'Australian Grand Prix' order by results.time desc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1266, "question": "How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT cast((sum(results.fastestlaptime) - sum(results.time)) AS REAL) * 100 / sum(results.time) FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.year = 2008 AND races.name = 'Australian Grand Prix'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1267, "question": "How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT ((julianday('2000-01-01 ' || MAX(CASE WHEN T2.positionOrder = 1 THEN T2.time ELSE NULL END)) - julianday('2000-01-01 ' || MIN(CASE WHEN T2.positionOrder = (SELECT MAX(positionOrder) FROM results WHERE raceId = T1.raceId) THEN T2.time ELSE NULL END))) / julianday('2000-01-01 ' || MIN(CASE WHEN T2.positionOrder = (SELECT MAX(positionOrder) FROM results WHERE raceId = T1.raceId) THEN T2.time ELSE NULL END))) * 100 AS percentage_faster FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.time IS NOT NULL", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1268, "question": "How many circuits are there in Adelaide, Australia?", "db_id": "formula_1", "sql": "select count(circuitid) from circuits where location = 'Melbourne' and country = 'Australia'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1269, "question": "Please list the location coordinates of the US circuits.", "db_id": "formula_1", "sql": "SELECT lat, lng FROM circuits WHERE country = 'USA'", "label": true, "error_types": [] }, { "id": 1270, "question": "How many British drivers were born after 1980?", "db_id": "formula_1", "sql": "select count(driverid) from drivers where dob > 1980 and nationality = 'British'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 1271, "question": "How many British drivers were born after 1980?", "db_id": "formula_1", "sql": "SELECT COUNT(*) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) > '1980'", "label": true, "error_types": [] }, { "id": 1272, "question": "What are the maximum points of British constructors?", "db_id": "formula_1", "sql": "select avg(constructorresults.points) from constructors inner join constructorresults on constructors.constructorid = constructorresults.constructorid where constructors.nationality = 'British'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1273, "question": "What are the maximum points of British constructors?", "db_id": "formula_1", "sql": "SELECT AVG(T2.points) FROM constructors AS T1 INNER JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = 'British'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1274, "question": "Which constructors have been ranked 1?", "db_id": "formula_1", "sql": "SELECT DISTINCT constructors.name FROM constructors INNER JOIN results ON constructors.constructorid = results.constructorid WHERE results.rank = 1", "label": true, "error_types": [] }, { "id": 1275, "question": "Which constructors have been ranked 1?", "db_id": "formula_1", "sql": "SELECT T2.name FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T1.constructorId = T2.constructorId WHERE T1.position = 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1276, "question": "How many French constructors have a lap number of over 50?", "db_id": "formula_1", "sql": "select count(constructors.name) from results inner join constructors on results.constructorid = constructors.constructorid inner join laptimes on results.raceid = laptimes.raceid where constructors.nationality = 'French' and laptimes.lap > 50", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1277, "question": "How many French constructors have a lap number of over 50?", "db_id": "formula_1", "sql": "SELECT count(constructors.constructorid) FROM constructors INNER JOIN results ON constructors.constructorid = results.constructorid WHERE constructors.nationality = 'French' AND results.laps > 50", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1278, "question": "How many French constructors have a lap number of over 50?", "db_id": "formula_1", "sql": "SELECT COUNT(DISTINCT T1.constructorId) FROM constructors AS T1 INNER JOIN results AS T2 ON T1.constructorId = T2.constructorId INNER JOIN lapTimes AS T3 ON T2.raceId = T3.raceId WHERE T1.nationality = 'French' AND T3.lap > 50", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1279, "question": "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.", "db_id": "formula_1", "sql": "select cast(sum(case when races.time is not null then 1 else 0 end) as real) * 100 / count(drivers.driverid) from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where races.year between 2007 and 2009", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1280, "question": "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.", "db_id": "formula_1", "sql": "SELECT cast(sum(CASE WHEN results.time IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / count(results.driverid) FROM results INNER JOIN races ON results.raceid = races.raceid INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.nationality = 'Japanese' AND races.year BETWEEN 2007 AND 2009", "label": true, "error_types": [] }, { "id": 1281, "question": "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.", "db_id": "formula_1", "sql": "SELECT (CAST(SUM(CASE WHEN T2.time IS NOT NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*)) * 100 AS completion_percentage FROM races T1 INNER JOIN results T2 ON T1.raceId = T2.raceId INNER JOIN drivers T3 ON T2.driverId = T3.driverId WHERE T3.nationality = 'Japanese' AND T1.year BETWEEN 2007 AND 2009", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1282, "question": "What is the average time in seconds of champion for each year, before year 1975?", "db_id": "formula_1", "sql": "select avg(results.time) from results inner join races on results.raceid = races.raceid inner join status on results.statusid = status.statusid where status.status = 'Finished' and races.year is not null", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1283, "question": "What is the average time in seconds of champion for each year, before year 1975?", "db_id": "formula_1", "sql": "SELECT avg(cast(substr(results.time, 3, length(results.time) - 6) AS REAL)) FROM races INNER JOIN results ON races.raceid = results.raceid GROUP BY races.year", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1284, "question": "What is the average time in seconds of champion for each year, before year 1975?", "db_id": "formula_1", "sql": "SELECT T1.year, AVG(SUBSTR(T2.time, 1, 2) * 3600 + SUBSTR(T2.time, 4, 2) * 60 + SUBSTR(T2.time, 7, 2) + SUBSTR(T2.time, 10, 3) * 0.001) AS average_seconds FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T2.time IS NOT NULL GROUP BY T1.year", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1285, "question": "Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from results inner join drivers on results.driverid = drivers.driverid where results.rank = 2 and strftime('%Y' , drivers.dob) > '1975'", "label": true, "error_types": [] }, { "id": 1286, "question": "Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM drivers INNER JOIN results ON drivers.driverid = results.driverid WHERE strftime('%Y', drivers.dob) > '1975' AND results.position = 2", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1287, "question": "Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames.", "db_id": "formula_1", "sql": "SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T1.driverId = T2.driverId WHERE T2.position = 2 AND STRFTIME('%Y', T1.dob) > '1975'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1288, "question": "How many Italian drivers haven't finished the race?", "db_id": "formula_1", "sql": "select count(drivers.driverid) from results inner join drivers on results.driverid = drivers.driverid inner join races on results.raceid = races.raceid where drivers.nationality = 'Italian' and races.time is null", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1289, "question": "How many Italian drivers haven't finished the race?", "db_id": "formula_1", "sql": "SELECT count(drivers.driverid) FROM drivers INNER JOIN results ON drivers.driverid = results.driverid WHERE drivers.nationality = 'Italian' AND results.time IS NULL", "label": true, "error_types": [] }, { "id": 1290, "question": "What is the fastest lap number of the champion in 2009?", "db_id": "formula_1", "sql": "SELECT results.fastestlap FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.year = 2009 ORDER BY results.fastestlaptime ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1291, "question": "What is the fastest lap number of the champion in 2009?", "db_id": "formula_1", "sql": "SELECT T4.fastestLap FROM seasons AS T1 INNER JOIN races AS T2 ON T1.year = T2.year INNER JOIN driverStandings AS T3 ON T2.raceId = T3.raceId INNER JOIN results AS T4 ON T2.raceId = T4.raceId AND T3.driverId = T4.driverId WHERE T1.year = 2009 AND T3.position = 1 AND T4.fastestLap IS NOT NULL ORDER BY T4.fastestLap LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1292, "question": "What is the average of fastest lap speed in the 2009 Spanish Grand Prix race?", "db_id": "formula_1", "sql": "SELECT avg(results.fastestlapspeed) FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.name = 'Spanish Grand Prix' AND races.year = 2009", "label": true, "error_types": [] }, { "id": 1293, "question": "Which race has the shortest actual finishing time? Please give the name and year.", "db_id": "formula_1", "sql": "select distinct races.name , races.year from results inner join races on results.raceid = races.raceid where results.milliseconds is null order by results.milliseconds asc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1294, "question": "Which race has the shortest actual finishing time? Please give the name and year.", "db_id": "formula_1", "sql": "SELECT races.name, races.year FROM races INNER JOIN results ON races.raceid = results.raceid WHERE results.milliseconds IS NOT NULL ORDER BY results.milliseconds ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1295, "question": "From 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50?", "db_id": "formula_1", "sql": "select cast(sum(case when drivers.dob < 1985 then 1 else 0 end) as real) * 100 / count(drivers.driverid) from drivers inner join laptimes on drivers.driverid = laptimes.driverid where strftime('%Y' , laptimes.lap) between 2000 and 2005 and laptimes.lap > 50", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1296, "question": "From 2000 to 2005, what percentage of drivers who were born before 1985 and the lap numbers were over 50?", "db_id": "formula_1", "sql": "SELECT CAST(SUM(CASE WHEN T3.laps > 50 AND STRFTIME('%Y', T1.dob) < '1985' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.driverId) AS percentage FROM drivers AS T1 INNER JOIN results AS T3 ON T1.driverId = T3.driverId INNER JOIN races AS T2 ON T3.raceId = T2.raceId WHERE T2.year BETWEEN 2000 AND 2005", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1297, "question": "How many French drivers who obtain the laptime less than 02:00.00?", "db_id": "formula_1", "sql": "select count(distinct drivers.driverid) from drivers inner join laptimes on drivers.driverid = laptimes.driverid where laptimes.milliseconds < 120 and drivers.nationality = 'French'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1298, "question": "How many French drivers who obtain the laptime less than 02:00.00?", "db_id": "formula_1", "sql": "SELECT COUNT(DISTINCT T1.driverId) FROM drivers AS T1 INNER JOIN lapTimes AS T2 ON T1.driverId = T2.driverId WHERE T1.nationality = 'French' AND T2.milliseconds < 120000", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 1299, "question": "List out the code for drivers who have nationality in America.", "db_id": "formula_1", "sql": "SELECT code FROM drivers WHERE nationality = 'America'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1300, "question": "List out the code for drivers who have nationality in America.", "db_id": "formula_1", "sql": "SELECT code FROM drivers WHERE nationality = 'American'", "label": true, "error_types": [] }, { "id": 1301, "question": "List out the Id number of races which were hold in 2009.", "db_id": "formula_1", "sql": "SELECT raceId FROM races WHERE year = 2009", "label": true, "error_types": [] }, { "id": 1302, "question": "State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them?", "db_id": "formula_1", "sql": "select code from drivers where nationality = 'Dutch' order by dob asc limit 3", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 1303, "question": "State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them?", "db_id": "formula_1", "sql": "SELECT count(drivers.driverid) FROM drivers INNER JOIN driverstandings ON drivers.driverid = driverstandings.driverid WHERE drivers.nationality = 'Dutch' ORDER BY strftime('%Y', drivers.dob) DESC LIMIT 3", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 1304, "question": "State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them?", "db_id": "formula_1", "sql": "WITH Top3Youngest AS (SELECT driverId, nationality FROM drivers ORDER BY dob DESC LIMIT 3) SELECT COUNT(*) FROM Top3Youngest WHERE nationality = 'Dutch';", "label": true, "error_types": [] }, { "id": 1305, "question": "What is reference name of Robert Kubica?", "db_id": "formula_1", "sql": "SELECT driverref FROM drivers WHERE forename = 'Robert' AND surname = 'Kubica'", "label": true, "error_types": [] }, { "id": 1306, "question": "How many British drivers who were born in 1980?", "db_id": "formula_1", "sql": "select count(driverid) from drivers where nationality = 'Australian' and strftime('%Y' , dob) = '1980'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1307, "question": "Please state the reference name of the oldest German driver.", "db_id": "formula_1", "sql": "select driverref from drivers where nationality = 'German' order by dob asc limit 1", "label": true, "error_types": [] }, { "id": 1308, "question": "Which drivers who were born in 1971 and has the fastest lap time on the race? Give id and code of these drivers.", "db_id": "formula_1", "sql": "select distinct drivers.driverid , drivers.code from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.raceid = laptimes.raceid where drivers.dob = ( select max(dob) from drivers where dob = 1971 )", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1309, "question": "Which drivers who were born in 1971 and has the fastest lap time on the race? Give id and code of these drivers.", "db_id": "formula_1", "sql": "SELECT DISTINCT drivers.driverid, drivers.code FROM drivers INNER JOIN results ON drivers.driverid = results.driverid WHERE substr(drivers.dob, 1, 4) = '1971' AND results.fastestlaptime IS NOT NULL", "label": true, "error_types": [] }, { "id": 1310, "question": "State the racing year which has the fastest lap time?", "db_id": "formula_1", "sql": "select distinct races.year from races inner join laptimes on races.raceid = laptimes.raceid where laptimes.lap = ( select fastestlaptime from results order by fastestlaptime desc limit 1 )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1311, "question": "State the racing year which has the fastest lap time?", "db_id": "formula_1", "sql": "SELECT DISTINCT races.year FROM races INNER JOIN results ON races.raceid = results.raceid WHERE results.fastestlaptime IS NOT NULL", "label": true, "error_types": [] }, { "id": 1312, "question": "State the racing year which has the fastest lap time?", "db_id": "formula_1", "sql": "SELECT T1.year FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1313, "question": "Which year has the lowest speed of lap time?", "db_id": "formula_1", "sql": "SELECT races.year FROM races INNER JOIN results ON races.raceid = results.raceid ORDER BY results.fastestlapspeed DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1314, "question": "Which year has the lowest speed of lap time?", "db_id": "formula_1", "sql": "SELECT T2.year FROM lapTimes AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId ORDER BY T1.time DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1315, "question": "List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race.", "db_id": "formula_1", "sql": "select distinct drivers.driverid from results inner join drivers on results.driverid = drivers.driverid where results.fastestlaptime = ( select min(time) from laptimes ) limit 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1316, "question": "List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race.", "db_id": "formula_1", "sql": "SELECT driverid FROM laptimes ORDER BY `time` ASC LIMIT 5", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1317, "question": "List the driver's ID of the top five driver, by descending order, the fastest time during the first lap of the race.", "db_id": "formula_1", "sql": "SELECT driverId FROM lapTimes WHERE lap = 1 AND milliseconds IS NOT NULL ORDER BY milliseconds ASC LIMIT 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1318, "question": "From race no. 50 to 100, how many finishers have been disqualified?", "db_id": "formula_1", "sql": "select count(results.statusid) from results inner join status on results.statusid = status.statusid where results.raceid between 50 and 100 and status.status = 2", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1319, "question": "From race no. 50 to 100, how many finishers have been disqualified?", "db_id": "formula_1", "sql": "SELECT count(results.driverid) FROM results INNER JOIN status ON results.statusid = status.statusid WHERE status.statusid = 2 AND results.raceid BETWEEN 50 AND 100", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1320, "question": "From race no. 50 to 100, how many finishers have been disqualified?", "db_id": "formula_1", "sql": "SELECT COUNT(T1.raceId) FROM races AS T1 INNER JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.raceId BETWEEN 50 AND 100 AND T2.statusId = 2 AND T2.time IS NOT NULL", "label": true, "error_types": [] }, { "id": 1321, "question": "List the reference name of the drivers who passed the second qualifying lap during race no. 23. Indicate their nationality and birthday.", "db_id": "formula_1", "sql": "SELECT T2.driverRef, T2.nationality, T2.dob FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId WHERE T1.raceId = 23 AND T1.q2 IS NOT NULL", "label": true, "error_types": [] }, { "id": 1322, "question": "On what year did the youngest driver had his first qualifying race? Also state the name, date and time of the race.", "db_id": "formula_1", "sql": "select distinct races.year , races.date , races.time from qualifying inner join races on qualifying.raceid = races.raceid inner join drivers on drivers.driverid = qualifying.driverid order by drivers.dob desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1323, "question": "On what year did the youngest driver had his first qualifying race? Also state the name, date and time of the race.", "db_id": "formula_1", "sql": "SELECT races.year, races.name, races.date, races.time FROM drivers INNER JOIN qualifying ON drivers.driverid = qualifying.driverid INNER JOIN races ON qualifying.raceid = races.raceid ORDER BY drivers.dob DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1324, "question": "How many American drivers have puncture status.", "db_id": "formula_1", "sql": "select count(drivers.driverid) from results inner join drivers on results.driverid = drivers.driverid inner join status on results.statusid = status.statusid where status.status = 2 and drivers.nationality = 'American'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1325, "question": "How many American drivers have puncture status.", "db_id": "formula_1", "sql": "SELECT COUNT(DISTINCT T1.driverId) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.nationality = 'American' AND T2.statusId = 2", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1326, "question": "Which of the Italian constructor got the highest point to date? Give its introduction website?", "db_id": "formula_1", "sql": "select constructors.name , constructors.url from constructors inner join constructorresults on constructors.constructorid = constructorresults.constructorid where constructors.nationality = 'Italian' order by constructorresults.points desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1327, "question": "Which of the Italian constructor got the highest point to date? Give its introduction website?", "db_id": "formula_1", "sql": "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", "label": true, "error_types": [] }, { "id": 1328, "question": "What is the average fastest lap time of the top 10 drivers in the 2006 United States Grand Prix?", "db_id": "formula_1", "sql": "select avg(results.fastestlaptime) from results inner join races on results.raceid = races.raceid inner join drivers on results.driverid = drivers.driverid inner join laptimes on results.raceid = laptimes.raceid where races.year = 2006 and results.rank < 10 group by results.driverid", "label": true, "error_types": [] }, { "id": 1329, "question": "List down top 3 German drivers who has the shortest average pit stop duration and were born between 1980-1985.", "db_id": "formula_1", "sql": "select distinct drivers.forename , drivers.surname from drivers inner join pitstops on drivers.driverid = pitstops.driverid where drivers.nationality = 'German' and drivers.dob between 1980 and 1985 order by pitstops.duration desc limit 5", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1330, "question": "List down top 3 German drivers who has the shortest average pit stop duration and were born between 1980-1985.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM drivers INNER JOIN pitstops ON drivers.driverid = pitstops.driverid WHERE drivers.nationality = 'German' AND strftime('%Y', drivers.dob) BETWEEN '1980' AND '1985' GROUP BY drivers.driverid ORDER BY sum(pitstops.duration) / count(pitstops.duration) ASC LIMIT 5", "label": true, "error_types": [] }, { "id": 1331, "question": "List down top 3 German drivers who has the shortest average pit stop duration and were born between 1980-1985.", "db_id": "formula_1", "sql": "SELECT T1.driverId FROM drivers AS T1 INNER JOIN pitStops AS T2 ON T1.driverId = T2.driverId WHERE T1.nationality = 'German' AND T1.dob BETWEEN '1980-01-01' AND '1985-12-31' GROUP BY T1.driverId ORDER BY SUM(T2.duration) / COUNT(T2.duration) LIMIT 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1332, "question": "Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname , results.time from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid where races.name = 'Canadian Grand Prix' and races.year = 2008 order by results.time desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1333, "question": "Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time.", "db_id": "formula_1", "sql": "SELECT results.time FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.name = 'Canadian Grand Prix' AND races.year = 2008 ORDER BY results.points DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1334, "question": "What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website.", "db_id": "formula_1", "sql": "select results.constructorid , races.url from results inner join races on results.raceid = races.raceid inner join driverstandings on races.raceid = driverstandings.raceid where races.name = 'Singapore Grand Prix' and driverstandings.driverid = 0 order by results.time desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1335, "question": "What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website.", "db_id": "formula_1", "sql": "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.year = 2009 AND T2.name = 'Singapore Grand Prix' ORDER BY T1.positionOrder LIMIT 1", "label": true, "error_types": [] }, { "id": 1336, "question": "What is the full name and date of birth of Austrian drivers born between 1981 and 1991?", "db_id": "formula_1", "sql": "select forename , surname , dob from drivers where nationality = 'Austria' and strftime('%Y' , dob) between '1981' and '1991'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1337, "question": "What is the full name and date of birth of Austrian drivers born between 1981 and 1991?", "db_id": "formula_1", "sql": "SELECT forename, surname, dob FROM drivers WHERE nationality = 'Austrian' AND STRFTIME('%Y', dob) BETWEEN '1981' AND '1991'", "label": true, "error_types": [] }, { "id": 1338, "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.", "db_id": "formula_1", "sql": "SELECT surname, forename, dob, url FROM drivers WHERE nationality = 'German' AND strftime('%Y', dob) BETWEEN '1971' AND '1985' ORDER BY dob DESC", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1339, "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.", "db_id": "formula_1", "sql": "SELECT forename, surname, url, dob FROM drivers WHERE nationality = 'German' AND dob BETWEEN '1971-01-01' AND '1985-12-31' ORDER BY dob DESC", "label": true, "error_types": [] }, { "id": 1340, "question": "What is the average score of Lewis Hamilton among all the Turkish Grand Prix?", "db_id": "formula_1", "sql": "select avg(results.points) from results inner join drivers on results.driverid = drivers.driverid inner join driverstandings on drivers.driverid = driverstandings.driverstandingsid inner join races on driverstandings.raceid = races.raceid where races.name = 'Turkish Grand Prix' and drivers.surname = 'Hamilton' and drivers.forename = 'Lewis'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1341, "question": "What is the average score of Lewis Hamilton among all the Turkish Grand Prix?", "db_id": "formula_1", "sql": "SELECT AVG(T3.points) FROM races AS T1 INNER JOIN results AS T3 ON T1.raceId = T3.raceId INNER JOIN drivers AS T2 ON T3.driverId = T2.driverId WHERE T1.name = 'Turkish Grand Prix' AND T2.forename = 'Lewis' AND T2.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1342, "question": "Which citizenship do the vast majority of the drivers hold?", "db_id": "formula_1", "sql": "select nationality from drivers group by nationality order by count(driverid) desc limit 1", "label": true, "error_types": [] }, { "id": 1343, "question": "Which citizenship do the vast majority of the drivers hold?", "db_id": "formula_1", "sql": "SELECT nationality FROM drivers GROUP BY nationality ORDER BY count(nationality) DESC", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1344, "question": "In terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer?", "db_id": "formula_1", "sql": "select distinct races.name from races inner join results on races.raceid = results.raceid inner join laptimes on results.raceid = laptimes.raceid where results.fastestlapspeed = ( select min(fastestlaptime) from results )", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1345, "question": "In terms of the fastest lap time, what is the name of the race which recorded the fastest lap speed by a racer?", "db_id": "formula_1", "sql": "SELECT T2.name FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId ORDER BY T1.fastestLapTime ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1346, "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?", "db_id": "formula_1", "sql": "select drivers.forename , drivers.surname from drivers inner join qualifying on drivers.driverid = qualifying.driverid inner join races on qualifying.raceid = races.raceid inner join circuits on races.circuitid = circuits.circuitid where races.year = 2008 and circuits.name = 'Marina Bay Street Circuit' order by qualifying.q3 asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1347, "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?", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM drivers INNER JOIN qualifying ON drivers.driverid = qualifying.driverid INNER JOIN races ON qualifying.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE races.year = 2008 AND circuits.name = 'Marina Bay Street Circuit' AND qualifying.position = 3 ORDER BY qualifying.q3 LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1348, "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.", "db_id": "formula_1", "sql": "select drivers.forename , drivers.nationality , races.name from drivers inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid order by drivers.dob desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1349, "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.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname, drivers.nationality, races.name FROM races INNER JOIN results ON races.raceid = results.raceid INNER JOIN drivers ON results.driverid = drivers.driverid ORDER BY drivers.dob DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1350, "question": "How many accidents did the driver who had the highest number accidents in the Canadian Grand Prix have?", "db_id": "formula_1", "sql": "SELECT count(results.statusid) FROM races INNER JOIN results ON races.raceid = results.raceid WHERE races.name = 'Canadian Grand Prix' AND results.statusid = 3 GROUP BY results.driverid ORDER BY count(results.statusid) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1351, "question": "What was the longest time a driver had ever spent at a pit stop?", "db_id": "formula_1", "sql": "select max(pitstops.duration) from drivers inner join pitstops on drivers.driverid = pitstops.driverid", "label": true, "error_types": [] }, { "id": 1352, "question": "What was the longest time that Lewis Hamilton had spent at a pit stop?", "db_id": "formula_1", "sql": "select max(pitstops.duration) from drivers inner join pitstops on drivers.driverid = pitstops.driverid where drivers.driverref = 'Lewis'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1353, "question": "What was the longest time that Lewis Hamilton had spent at a pit stop?", "db_id": "formula_1", "sql": "SELECT max(pitstops.duration) FROM drivers INNER JOIN pitstops ON drivers.driverid = pitstops.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1354, "question": "During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?", "db_id": "formula_1", "sql": "select pitstops.lap from drivers inner join pitstops on drivers.driverid = pitstops.driverid inner join results on drivers.driverid = results.driverid inner join races on results.raceid = races.raceid where races.name = 'Australian Grand Prix' and drivers.surname = 'Hamilton' and drivers.forename = 'Lewis'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1355, "question": "During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT pitstops.lap FROM drivers INNER JOIN pitstops ON drivers.driverid = pitstops.driverid INNER JOIN races ON pitstops.raceid = races.raceid WHERE races.year = 2011 AND drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1356, "question": "During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?", "db_id": "formula_1", "sql": "SELECT T3.lap FROM drivers AS T1 INNER JOIN pitStops AS T3 ON T1.driverId = T3.driverId INNER JOIN races AS T2 ON T3.raceId = T2.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T2.year = 2011 AND T2.name = 'Australian Grand Prix'", "label": true, "error_types": [] }, { "id": 1357, "question": "Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix.", "db_id": "formula_1", "sql": "SELECT pitstops.duration FROM races INNER JOIN pitstops ON races.raceid = pitstops.raceid WHERE races.year = 2011 AND races.name = 'Australian Grand Prix'", "label": true, "error_types": [] }, { "id": 1358, "question": "What is the lap record set by Lewis Hamilton in a Formula_1 race?", "db_id": "formula_1", "sql": "select results.fastestlaptime from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.driverid = laptimes.driverid where drivers.surname = 'Hamilton' and drivers.forename = 'Lewis'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1359, "question": "What is the lap record set by Lewis Hamilton in a Formula_1 race?", "db_id": "formula_1", "sql": "SELECT laptimes.time FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1360, "question": "What is the lap record set by Lewis Hamilton in a Formula_1 race?", "db_id": "formula_1", "sql": "SELECT MIN(T2.milliseconds) FROM drivers AS T1 INNER JOIN lapTimes AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1361, "question": "Which top 20 driver created the shortest lap time ever record in a Formula_1 race? Please give them full names.", "db_id": "formula_1", "sql": "select drivers.surname , drivers.forename from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.driverid = laptimes.driverid where results.fastestlaptime is not null order by laptimes.time asc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1362, "question": "Which top 20 driver created the shortest lap time ever record in a Formula_1 race? Please give them full names.", "db_id": "formula_1", "sql": "SELECT drivers.forename, drivers.surname FROM laptimes INNER JOIN drivers ON laptimes.driverid = drivers.driverid ORDER BY laptimes.time ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1363, "question": "Which top 20 driver created the shortest lap time ever record in a Formula_1 race? Please give them full names.", "db_id": "formula_1", "sql": "SELECT T2.forename, T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T1.driverId = T2.driverId ORDER BY T1.milliseconds ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1364, "question": "What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race?", "db_id": "formula_1", "sql": "select races.circuitid from drivers inner join results on drivers.driverid = results.driverid inner join laptimes on results.driverid = laptimes.driverid inner join races on laptimes.raceid = races.raceid where drivers.driverref = 'Lewis' and results.fastestlaptime = 0.0 order by results.time asc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1365, "question": "What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race?", "db_id": "formula_1", "sql": "SELECT results.position FROM results INNER JOIN drivers ON results.driverid = drivers.driverid WHERE drivers.forename = 'Lewis' AND drivers.surname = 'Hamilton' ORDER BY results.time desc LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 1366, "question": "What was the position of the circuits during Lewis Hamilton's fastest lap in a Formula_1 race?", "db_id": "formula_1", "sql": "SELECT T3.position FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN lapTimes AS T3 ON T2.raceId = T3.raceId AND T2.fastestLap = T3.lap WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' ORDER BY T3.time LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1367, "question": "Please list the lap records for the circuits in Italy.", "db_id": "formula_1", "sql": "select laptimes.time from circuits inner join races on circuits.circuitid = races.circuitid inner join laptimes on races.raceid = laptimes.raceid where circuits.country = 'Italy' order by laptimes.lap desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1368, "question": "Please list the lap records for the circuits in Italy.", "db_id": "formula_1", "sql": "SELECT DISTINCT laptimes.time FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE circuits.country = 'Italy'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" } ] }, { "id": 1369, "question": "Please list the lap records for the circuits in Italy.", "db_id": "formula_1", "sql": "SELECT T3.circuitId, MIN(T1.time) AS fastest_lap_time 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' GROUP BY T3.circuitId", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 1370, "question": "In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set?", "db_id": "formula_1", "sql": "select races.name from races inner join circuits on races.circuitid = circuits.circuitid inner join laptimes on races.raceid = laptimes.raceid where circuits.name = 'Austrian Grand Prix' order by laptimes.time desc limit 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1371, "question": "In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set?", "db_id": "formula_1", "sql": "SELECT T3.name FROM races AS T1 INNER JOIN lapTimes AS T2 ON T1.raceId = T2.raceId INNER JOIN circuits AS T3 ON T1.circuitId = T3.circuitId WHERE T1.name = 'Austrian Grand Prix' ORDER BY T2.milliseconds LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 1372, "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?", "db_id": "formula_1", "sql": "select pitstops.duration from pitstops inner join races on pitstops.raceid = races.raceid inner join laptimes on laptimes.raceid = races.raceid where races.name = 'Austrian Grand Prix' order by laptimes.time desc limit 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1373, "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?", "db_id": "formula_1", "sql": "SELECT pitstops.duration FROM races INNER JOIN pitstops ON races.raceid = pitstops.raceid WHERE races.name = 'Austrian Grand Prix' AND pitstops.driverid = ( SELECT driverid FROM results WHERE raceid = races.raceid ORDER BY fastestlaptime ASC LIMIT 1 )", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" } ] }, { "id": 1374, "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?", "db_id": "formula_1", "sql": "SELECT T3.duration FROM races AS T1 INNER JOIN lapTimes AS T2 ON T1.raceId = T2.raceId INNER JOIN pitStops AS T3 ON T1.raceId = T3.raceId WHERE T1.name = 'Austrian Grand Prix' ORDER BY T2.milliseconds LIMIT 1", "label": true, "error_types": [] }, { "id": 1375, "question": "Please list the location coordinates of the circuits whose lap record is 1:29.488.", "db_id": "formula_1", "sql": "SELECT circuits.lat, circuits.lng FROM laptimes INNER JOIN races ON laptimes.raceid = races.raceid INNER JOIN circuits ON races.circuitid = circuits.circuitid WHERE laptimes.time = '1:29.488'", "label": true, "error_types": [] }, { "id": 1376, "question": "Please list the location coordinates of the circuits whose lap record is 1:29.488.", "db_id": "formula_1", "sql": "SELECT T3.lat, T3.lng FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId INNER JOIN circuits AS T3 ON T2.circuitId = T3.circuitId WHERE T1.fastestLapTime = '1:29.488'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1377, "question": "What was the average time in milliseconds Lewis Hamilton spent at a pit stop during Formula_1 races?", "db_id": "formula_1", "sql": "SELECT AVG(T2.milliseconds) FROM drivers AS T1 INNER JOIN pitStops AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'", "label": true, "error_types": [] }, { "id": 1378, "question": "What is the average lap time in milliseconds of all the lap records set on the various circuits in Italy?", "db_id": "formula_1", "sql": "select avg(laptimes.milliseconds) from results inner join circuits on results.raceid = circuits.circuitid inner join races on circuits.circuitid = races.circuitid inner join laptimes on races.raceid = laptimes.raceid where circuits.country = 'Italy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1379, "question": "What is the average lap time in milliseconds of all the lap records set on the various circuits in Italy?", "db_id": "formula_1", "sql": "SELECT AVG(T3.milliseconds) FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId INNER JOIN lapTimes AS T3 ON T2.raceId = T3.raceId WHERE T1.country = 'Italy'", "label": true, "error_types": [] }, { "id": 1380, "question": "Which player has the highest overall rating? Indicate the player's api id.", "db_id": "european_football_2", "sql": "SELECT player_api_id FROM Player_Attributes WHERE overall_rating IS NOT NULL ORDER BY overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1381, "question": "What is the height of the tallest player? Indicate his name.", "db_id": "european_football_2", "sql": "select height , player_name from player order by height desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1382, "question": "What is the height of the tallest player? Indicate his name.", "db_id": "european_football_2", "sql": "SELECT player_name FROM Player ORDER BY height DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1383, "question": "What is the preferred foot when attacking of the player with the lowest potential?", "db_id": "european_football_2", "sql": "select preferred_foot from player_attributes order by potential asc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" } ] }, { "id": 1384, "question": "What is the preferred foot when attacking of the player with the lowest potential?", "db_id": "european_football_2", "sql": "SELECT preferred_foot FROM Player_Attributes WHERE potential IS NOT NULL ORDER BY potential ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1385, "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?", "db_id": "european_football_2", "sql": "select count(id) from player_attributes where overall_rating between 60 and 65 and defensive_work_rate like 'low'", "label": true, "error_types": [] }, { "id": 1386, "question": "Who are the top 5 players who perform better in crossing actions? Indicate their player id.", "db_id": "european_football_2", "sql": "select player.player_name from player inner join player_attributes on player.player_api_id = player_attributes.player_fifa_api_id order by player_attributes.crossing desc limit 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1387, "question": "Who are the top 5 players who perform better in crossing actions? Indicate their player id.", "db_id": "european_football_2", "sql": "SELECT T1.player_api_id FROM Player_Attributes AS T1 WHERE T1.crossing IS NOT NULL ORDER BY T1.crossing DESC LIMIT 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1388, "question": "Give the name of the league had the most goals in the 2016 season?", "db_id": "european_football_2", "sql": "select league.name from match inner join league on match.league_id = league.id where match.season = '2015/2016' group by league.name order by sum(match.home_team_goal + match.away_team_goal) desc limit 1", "label": true, "error_types": [] }, { "id": 1389, "question": "In Scotland Premier League, which away team won the most during the 2010 season?", "db_id": "european_football_2", "sql": "select team.team_long_name from team inner join match on team.team_api_id = match.away_team_api_id inner join league on match.league_id = league.id where league.name = 'Scotland Premier League' and match.season = '2009/2010' order by match.away_team_goal - match.home_team_goal desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1390, "question": "In Scotland Premier League, which away team won the most during the 2010 season?", "db_id": "european_football_2", "sql": "SELECT T2.away_team_api_id FROM League AS T1 INNER JOIN Match AS T2 ON T1.id = T2.league_id WHERE T1.name = 'Scotland Premier League' AND T2.season = '2009/2010' AND T2.away_team_goal > T2.home_team_goal GROUP BY T2.away_team_api_id ORDER BY COUNT(*) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1391, "question": "Give the name of the league had the most matches end as draw in the 2016 season?", "db_id": "european_football_2", "sql": "select league.name from match inner join league on match.league_id = league.id where match.season = '2015/2016' group by league.name order by sum(match.home_team_goal - match.away_team_goal) desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1392, "question": "Give the name of the league had the most matches end as draw in the 2016 season?", "db_id": "european_football_2", "sql": "SELECT league.name FROM league INNER JOIN MATCH ON league.id = MATCH.league_id WHERE MATCH.season = '2015/2016' GROUP BY league.name ORDER BY sum(CASE WHEN MATCH.home_team_goal = MATCH.away_team_goal THEN 1 ELSE 0 END) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1393, "question": "At present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015.", "db_id": "european_football_2", "sql": "select player.birthday - strftime('%Y' , player_attributes.date) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.sprint_speed >= 97 and player_attributes.date between '2013-01-01 00:00:00' and '2015-12-31 00:00:00'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1394, "question": "At present, calculate for the player's age who have a sprint speed of no less than 97 between 2013 to 2015.", "db_id": "european_football_2", "sql": "SELECT (strftime('%Y', 'now') - strftime('%Y', T2.birthday)) AS age FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.sprint_speed >= 97 AND T1.date BETWEEN '2013-01-01 00:00:00' AND '2015-12-31 00:00:00'", "label": true, "error_types": [] }, { "id": 1395, "question": "What is the average height of players born between 1990 and 1995?", "db_id": "european_football_2", "sql": "select avg(height) from player where birthday between '1990-01-01 00:00:00' and '1996-01-01 00:00:00'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1396, "question": "What is the average height of players born between 1990 and 1995?", "db_id": "european_football_2", "sql": "SELECT AVG(height) FROM Player WHERE birthday BETWEEN '1990-01-01 00:00:00' AND '1995-12-31 23:59:59'", "label": true, "error_types": [] }, { "id": 1397, "question": "List the players' api id who had the highest above average overall ratings in 2010.", "db_id": "european_football_2", "sql": "SELECT player_api_id FROM player_attributes WHERE substr(date, 1, 4) = '2010' ORDER BY overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1398, "question": "List the players' api id who had the highest above average overall ratings in 2010.", "db_id": "european_football_2", "sql": "SELECT player_api_id FROM Player_Attributes WHERE date LIKE '2010%' AND overall_rating > ( SELECT AVG(overall_rating) FROM Player_Attributes WHERE date LIKE '2010%' )", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1399, "question": "Give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed.", "db_id": "european_football_2", "sql": "select distinct team_attributes.team_fifa_api_id from team inner join team_attributes on team.team_fifa_api_id = team_attributes.team_api_id where team_attributes.buildupplayspeed between 51 and 59", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1400, "question": "Give the team_fifa_api_id of teams with more than 50 but less than 60 build-up play speed.", "db_id": "european_football_2", "sql": "SELECT team_fifa_api_id FROM Team_Attributes WHERE buildUpPlaySpeed BETWEEN 51 AND 59", "label": true, "error_types": [] }, { "id": 1401, "question": "List the long name of teams with above-average build-up play passing in 2012.", "db_id": "european_football_2", "sql": "select team.team_long_name from team inner join team_attributes on team.team_api_id = team_attributes.team_api_id where team_attributes.buildupplaypassing > 0.5 and team_attributes.date like '2012%' group by team.team_long_name having sum(team_attributes.buildupplaypassing) > 0", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1402, "question": "List the long name of teams with above-average build-up play passing in 2012.", "db_id": "european_football_2", "sql": "SELECT team.team_long_name FROM team_attributes INNER JOIN team ON team_attributes.team_api_id = team.team_api_id WHERE team_attributes.date LIKE '2012%' AND team_attributes.buildupplaypassing IS NOT NULL GROUP BY team.team_long_name HAVING sum(team_attributes.buildupplaypassing) / count(team.team_long_name) < team_attributes.buildupplaypassing", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1403, "question": "List the long name of teams with above-average build-up play passing in 2012.", "db_id": "european_football_2", "sql": "SELECT T1.team_long_name FROM Team AS T1 INNER JOIN Team_Attributes AS T2 ON T1.team_fifa_api_id = T2.team_fifa_api_id WHERE T2.date LIKE '2012%' AND T2.buildUpPlayPassing > (SELECT AVG(buildUpPlayPassing) FROM Team_Attributes WHERE date LIKE '2012%' AND buildUpPlayPassing IS NOT NULL)", "label": true, "error_types": [] }, { "id": 1404, "question": "Find the average number of long-shot done by Ahmed Samir Farag.", "db_id": "european_football_2", "sql": "SELECT AVG(T2.long_shots) 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 = 'Ahmed Samir Farag'", "label": true, "error_types": [] }, { "id": 1405, "question": "List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy.", "db_id": "european_football_2", "sql": "select player.player_name from player inner join player_attributes on player.player_api_id = player_attributes.player_fifa_api_id where player.height > 180 group by player.player_name order by cast(sum(player_attributes.heading_accuracy) as real) / count(player_attributes.player_api_id) desc limit 10", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1406, "question": "List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy.", "db_id": "european_football_2", "sql": "SELECT T1.player_name FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.height > 180 GROUP BY T1.player_name ORDER BY SUM(T2.heading_accuracy) / COUNT(T2.player_fifa_api_id) DESC LIMIT 10", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" } ] }, { "id": 1407, "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.", "db_id": "european_football_2", "sql": "select distinct team.team_long_name from team inner join team_attributes on team.id = team_attributes.team_api_id where team_attributes.chancecreationpassingclass = 'Normal' and team_attributes.date between '2014-01-01 00:00:00' and '2014-01-31 00:00:00' order by team_attributes.chancecreationpassing desc", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 1408, "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.", "db_id": "european_football_2", "sql": "SELECT team.team_long_name FROM team_attributes INNER JOIN team ON team_attributes.team_api_id = team.team_api_id WHERE team_attributes.date LIKE '2014%' AND team_attributes.buildupplaydribblingclass = 'Normal' ORDER BY team_attributes.chancecreationpassing DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1409, "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.", "db_id": "european_football_2", "sql": "SELECT T2.team_long_name FROM Team_Attributes AS T1 INNER JOIN Team AS T2 ON T1.team_api_id = T2.team_api_id WHERE T1.buildUpPlayDribblingClass = 'Normal' AND T1.date LIKE '2014%' GROUP BY T2.team_long_name HAVING SUM(T1.chanceCreationPassing) / COUNT(T1.id) < ( SELECT CAST(SUM(chanceCreationPassing) AS REAL) / COUNT(id) FROM Team_Attributes WHERE date LIKE '2014%' ) ORDER BY SUM(T1.chanceCreationPassing) DESC", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1410, "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.", "db_id": "european_football_2", "sql": "SELECT league.name FROM league INNER JOIN MATCH ON league.id = MATCH.league_id WHERE MATCH.season = '2009/2010' AND MATCH.home_team_goal > MATCH.away_team_goal", "label": true, "error_types": [] }, { "id": 1411, "question": "What is the short name of the football team Queens Park Rangers?", "db_id": "european_football_2", "sql": "select team_short_name from team where team_long_name = 'Queens Park Rangers'", "label": true, "error_types": [] }, { "id": 1412, "question": "List the football players with a birthyear of 1970 and a birthmonth of October.", "db_id": "european_football_2", "sql": "SELECT player_name FROM player WHERE substr(birthday, 1, 4) = '1970' AND substr(birthday, 6, 2) = '10'", "label": true, "error_types": [] }, { "id": 1413, "question": "What is the attacking work rate of the football playerr Franco Zennaro?", "db_id": "european_football_2", "sql": "select player_attributes.attacking_work_rate from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Franco Zennaro'", "label": true, "error_types": [] }, { "id": 1414, "question": "What is the ADO Den Haag team freedom of movement in the 1st two thirds of the pitch?", "db_id": "european_football_2", "sql": "SELECT team_attributes.buildupplaypositioningclass FROM team INNER JOIN team_attributes ON team.team_api_id = team_attributes.team_api_id WHERE team.team_long_name = 'ADO Den Haag'", "label": true, "error_types": [] }, { "id": 1415, "question": "What is the football player Francois Affolter header's finishing rate on 18/09/2014?", "db_id": "european_football_2", "sql": "SELECT player_attributes.heading_accuracy FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Francois Affolter' AND player_attributes.date = '2014-09-18 00:00:00'", "label": true, "error_types": [] }, { "id": 1416, "question": "What is the overall rating of the football player Gabriel Tamas in year 2011?", "db_id": "european_football_2", "sql": "select player_attributes.overall_rating from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Gabriel' and strftime('%Y' , player_attributes.date) = '2011'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1417, "question": "What is the overall rating of the football player Gabriel Tamas in year 2011?", "db_id": "european_football_2", "sql": "SELECT player_attributes.overall_rating FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Gabriel Tamas' AND strftime('%Y', player_attributes.date) = '2011'", "label": true, "error_types": [] }, { "id": 1418, "question": "How many matches in the 2015/2016 season were held in Scotland Premier League\n?", "db_id": "european_football_2", "sql": "select sum(case when league.name = 'Scotland Premier League' then 1 else 0 end) from match inner join league on match.league_id = league.id where match.season = '2015/2016'", "label": true, "error_types": [] }, { "id": 1419, "question": "What is the preferred foot when attacking of the youngest football player?", "db_id": "european_football_2", "sql": "SELECT player_attributes.preferred_foot FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id ORDER BY player.birthday DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1420, "question": "List all the football player with the highest potential score.", "db_id": "european_football_2", "sql": "SELECT player.player_name FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id ORDER BY player_attributes.potential DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1421, "question": "List the football teams that has a chance creation passing class of Risky. Inidcate its short name only.", "db_id": "european_football_2", "sql": "select team.team_short_name from team inner join team_attributes on team.team_api_id = team_attributes.team_fifa_api_id where team_attributes.chancecreationpassingclass = 'Risky'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1422, "question": "List the football teams that has a chance creation passing class of Risky. Inidcate its short name only.", "db_id": "european_football_2", "sql": "SELECT T2.team_short_name FROM Team_Attributes AS T1 INNER JOIN Team AS T2 ON T1.team_api_id = T2.team_api_id WHERE T1.chanceCreationPassingClass = 'Risky'", "label": true, "error_types": [] }, { "id": 1423, "question": "What is the defensive work rate of the football player David Wilson\n?", "db_id": "european_football_2", "sql": "SELECT player_attributes.defensive_work_rate FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'David Wilson'", "label": true, "error_types": [] }, { "id": 1424, "question": "When is the birthday of the football player who has the highest overall rating?", "db_id": "european_football_2", "sql": "SELECT player.birthday FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id ORDER BY player_attributes.overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1425, "question": "What is the name of the football league in the country of Netherlands?", "db_id": "european_football_2", "sql": "SELECT league.name FROM league INNER JOIN country ON league.country_id = country.id WHERE country.name = 'Netherlands'", "label": true, "error_types": [] }, { "id": 1426, "question": "Calculate the average home team goal in the 2010/2011 season in the country of Poland.", "db_id": "european_football_2", "sql": "SELECT avg(MATCH.home_team_goal) FROM MATCH INNER JOIN league ON MATCH.league_id = league.id INNER JOIN country ON league.country_id = country.id WHERE country.name = 'Poland' AND MATCH.season = '2010/2011'", "label": true, "error_types": [] }, { "id": 1427, "question": "Who has the highest average finishing rate between the highest and shortest football player?", "db_id": "european_football_2", "sql": "select player.player_name from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.height between 1 and 10 group by player.player_name order by avg(player_attributes.finishing) desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1428, "question": "Who has the highest average finishing rate between the highest and shortest football player?", "db_id": "european_football_2", "sql": "SELECT player.player_name FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id ORDER BY player_attributes.finishing DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1429, "question": "Who has the highest average finishing rate between the highest and shortest football player?", "db_id": "european_football_2", "sql": "SELECT T1.player_api_id FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.height IN (SELECT MAX(height) FROM Player UNION SELECT MIN(height) FROM Player) AND T2.finishing IS NOT NULL GROUP BY T1.player_api_id ORDER BY AVG(T2.finishing) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1430, "question": "Please list player names which are higher than 180.", "db_id": "european_football_2", "sql": "select player_name from player where height > 180", "label": true, "error_types": [] }, { "id": 1431, "question": "How many players were born after 1990?", "db_id": "european_football_2", "sql": "select count(id) from player where strftime('%Y' , birthday) = '1990'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1432, "question": "How many players were born after 1990?", "db_id": "european_football_2", "sql": "SELECT COUNT(id) FROM Player WHERE strftime('%Y', birthday) > '1990'", "label": true, "error_types": [] }, { "id": 1433, "question": "How many players whose first names are Adam and weigh more than 170?", "db_id": "european_football_2", "sql": "select count(player.player_name) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id inner join team on team_attributes.team_fifa_api_id = team.team_fifa_api_id inner join team_attributes on team.team_api_id = team_attributes.team_fifa_api_id where team.team_long_name = 'Adam' and player.weight > 170", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1434, "question": "How many players whose first names are Adam and weigh more than 170?", "db_id": "european_football_2", "sql": "SELECT count(player.player_name) FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.weight > 170 AND player.player_name LIKE 'Adam%'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1435, "question": "How many players whose first names are Adam and weigh more than 170?", "db_id": "european_football_2", "sql": "SELECT COUNT(*) FROM Player WHERE player_name LIKE 'Adam%' AND weight > 170", "label": true, "error_types": [] }, { "id": 1436, "question": "Which players had an overall rating of over 80 from 2008 to 2010? Please list player names.", "db_id": "european_football_2", "sql": "SELECT player.player_name FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player_attributes.overall_rating > 80 AND strftime('%Y', player_attributes.date) BETWEEN '2008' AND '2010'", "label": true, "error_types": [] }, { "id": 1437, "question": "What is Aaron Doran's potential score?", "db_id": "european_football_2", "sql": "select player_attributes.potential from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Aaron Doran'", "label": true, "error_types": [] }, { "id": 1438, "question": "Please list all team names which the speed class is fast.", "db_id": "european_football_2", "sql": "SELECT 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'", "label": true, "error_types": [] }, { "id": 1439, "question": "What is the passing class of CLB team?", "db_id": "european_football_2", "sql": "select team_attributes.buildupplaypassingclass from team inner join team_attributes on team.id = team_attributes.team_api_id where team.team_short_name = 'CLB'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1440, "question": "What is the passing class of CLB team?", "db_id": "european_football_2", "sql": "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_short_name = 'CLB'", "label": true, "error_types": [] }, { "id": 1441, "question": "Which teams have build up play passing more than 70? Please list their short names.", "db_id": "european_football_2", "sql": "SELECT team.team_short_name FROM team INNER JOIN team_attributes ON team.team_api_id = team_attributes.team_api_id WHERE team_attributes.buildupplaypassing > 70", "label": true, "error_types": [] }, { "id": 1442, "question": "From 2010 to 2015, what was the average overall rating of players who are higher than 170?", "db_id": "european_football_2", "sql": "select avg(player_attributes.overall_rating) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.height > 170 and strftime('%Y' , player_attributes.date) between '2010' and '2015'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1443, "question": "Which football player has the shortest height?", "db_id": "european_football_2", "sql": "select player_name from player order by height asc limit 1", "label": true, "error_types": [] }, { "id": 1444, "question": "Which country is the league Italy Serie A from?", "db_id": "european_football_2", "sql": "SELECT T1.name FROM Country AS T1 INNER JOIN League AS T2 ON T1.id = T2.country_id WHERE T2.name = 'Italy Serie A'", "label": true, "error_types": [] }, { "id": 1445, "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.", "db_id": "european_football_2", "sql": "select team.team_short_name from team inner join team_attributes on team.id = team_attributes.team_api_id where team_attributes.buildupplayspeed = 31 and team_attributes.buildupplaydribbling = 53 and team_attributes.buildupplaypassing = 32", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1446, "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.", "db_id": "european_football_2", "sql": "SELECT team.team_short_name FROM team_attributes INNER JOIN team ON team_attributes.team_api_id = team.team_api_id WHERE team_attributes.buildupplayspeed = 31 AND team_attributes.buildupplaydribbling = 53 AND team_attributes.buildupplaypassing = 32", "label": true, "error_types": [] }, { "id": 1447, "question": "What is the average overall rating of the football player Aaron Doran?", "db_id": "european_football_2", "sql": "select avg(player_attributes.overall_rating) from player inner join player_attributes on player.id = player_attributes.player_api_id where player.player_name = 'Aaron Doran'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1448, "question": "What is the average overall rating of the football player Aaron Doran?", "db_id": "european_football_2", "sql": "SELECT avg(player_attributes.overall_rating) FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Aaron Doran'", "label": true, "error_types": [] }, { "id": 1449, "question": "How many matches were held in the league Germany 1. Bundesliga\nfrom August to October 2008?", "db_id": "european_football_2", "sql": "select sum(case when match.date between '2008-08' and '2008-10' then 1 else 0 end) from match inner join league on match.league_id = league.id where league.name = 'Germany 1. Bundesliga'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1450, "question": "How many matches were held in the league Germany 1. Bundesliga\nfrom August to October 2008?", "db_id": "european_football_2", "sql": "SELECT count(MATCH.id) FROM league INNER JOIN MATCH ON league.id = MATCH.league_id WHERE league.name = 'Germany 1. Bundesliga' AND strftime('%Y-%m', MATCH.date) BETWEEN '2008-08' AND '2008-10'", "label": true, "error_types": [] }, { "id": 1451, "question": "List all the short name of the football team that had a home team goal of 10?", "db_id": "european_football_2", "sql": "select team.team_short_name from team inner join match on team.id = match.home_team_api_id where match.home_team_goal = 10 group by team.team_short_name", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1452, "question": "List all the short name of the football team that had a home team goal of 10?", "db_id": "european_football_2", "sql": "SELECT T2.team_short_name FROM Match AS T1 INNER JOIN Team AS T2 ON T1.home_team_api_id = T2.team_api_id WHERE T1.home_team_goal = 10", "label": true, "error_types": [] }, { "id": 1453, "question": "List all the football player with the highest balance score and potential score of 61.", "db_id": "european_football_2", "sql": "select player.player_name from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.balance = 10 and player_attributes.potential = 61 order by player_attributes.balance desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1454, "question": "List all the football player with the highest balance score and potential score of 61.", "db_id": "european_football_2", "sql": "SELECT T2.player_name FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.balance = (SELECT MAX(balance) FROM Player_Attributes WHERE potential = 61) AND T1.potential = 61", "label": true, "error_types": [] }, { "id": 1455, "question": "What's the long name for the team GEN?", "db_id": "european_football_2", "sql": "select team_long_name from team where team_short_name = 'GEN'", "label": true, "error_types": [] }, { "id": 1456, "question": "Which player is older, Aaron Lennon or Abdelaziz Barrada?", "db_id": "european_football_2", "sql": "SELECT player_name FROM player WHERE birthday = ( SELECT max(birthday) FROM player WHERE player_name = 'Aaron Lennon' OR player_name = 'Abdelaziz Barrada' )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 1457, "question": "Which player is older, Aaron Lennon or Abdelaziz Barrada?", "db_id": "european_football_2", "sql": "SELECT player_name FROM Player WHERE player_name = 'Aaron Lennon' OR player_name = 'Abdelaziz Barrada' ORDER BY birthday ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1458, "question": "Which player is the tallest?", "db_id": "european_football_2", "sql": "SELECT player_name FROM player ORDER BY height DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1459, "question": "Which player is the tallest?", "db_id": "european_football_2", "sql": "SELECT id FROM Player ORDER BY height DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1460, "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?", "db_id": "european_football_2", "sql": "select sum(case when player_attributes.attacking_work_rate = 'low' then 1 else 0 end) from player_attributes inner join player on player_attributes.player_api_id = player.player_api_id inner join match on player.player_api_id = match.away_player_11 or match.away_player_10 = player.player_api_id where player_attributes.preferred_foot = 'left'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1461, "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?", "db_id": "european_football_2", "sql": "SELECT COUNT(id) FROM Player_Attributes WHERE preferred_foot = 'left' AND attacking_work_rate = 'low'", "label": true, "error_types": [] }, { "id": 1462, "question": "Which country is the Belgium Jupiler League from?", "db_id": "european_football_2", "sql": "select country.name from match inner join league on match.league_id = league.country_id inner join country on country.id = league.country_id where league.name = 'Belgium Jupiler League'", "label": true, "error_types": [] }, { "id": 1463, "question": "Please list the leagues from Germany.", "db_id": "european_football_2", "sql": "select league.name from league inner join match on league.id = match.league_id inner join country on country.id = match.country_id where country.name = 'Germany'", "label": true, "error_types": [] }, { "id": 1464, "question": "Please list the leagues from Germany.", "db_id": "european_football_2", "sql": "SELECT T2.id FROM Country AS T1 INNER JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = 'Germany'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1465, "question": "Which player has the strongest overall strength?", "db_id": "european_football_2", "sql": "SELECT player.player_name FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id ORDER BY player_attributes.overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1466, "question": "Among the players born before the year 1986, how many of them would remain in his position and defense while the team attacked?", "db_id": "european_football_2", "sql": "select count(player.player_fifa_api_id) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.defensive_work_rate = 'high' and strftime('%Y' , player.birthday) < 1986", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 1467, "question": "Among the players born before the year 1986, how many of them would remain in his position and defense while the team attacked?", "db_id": "european_football_2", "sql": "SELECT COUNT(T1.player_api_id) FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE strftime('%Y', T1.birthday) < '1986' AND T2.defensive_work_rate = 'high'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1468, "question": "What's the heading accuracy of Ariel Borysiuk?", "db_id": "european_football_2", "sql": "SELECT player_attributes.heading_accuracy FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Ariel Borysiuk'", "label": true, "error_types": [] }, { "id": 1469, "question": "Please list the names of the players whose volley score and dribbling score are over 70.", "db_id": "european_football_2", "sql": "SELECT DISTINCT T2.player_name FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.volleys > 70 AND T1.dribbling > 70", "label": true, "error_types": [] }, { "id": 1470, "question": "How many matches in the 2008/2009 season were held in Belgium?", "db_id": "european_football_2", "sql": "select sum(case when country.name = 'Belgium' then 1 else 0 end) from match inner join country on country.id = match.country_id where match.season = '2008/2009'", "label": true, "error_types": [] }, { "id": 1471, "question": "What is the long passing score of the oldest player?", "db_id": "european_football_2", "sql": "SELECT T2.long_passing FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id ORDER BY T1.birthday LIMIT 1", "label": true, "error_types": [] }, { "id": 1472, "question": "How many matches were held in the Belgium Jupiler League in April, 2009?", "db_id": "european_football_2", "sql": "select sum(case when match.date like '2009-04%' then 1 else 0 end) from match inner join league on match.league_id = league.id where league.name = 'Belgium Jupiler League'", "label": true, "error_types": [] }, { "id": 1473, "question": "Give the name of the league had the most matches in the 2008/2009 season?", "db_id": "european_football_2", "sql": "select league.name from match inner join league on match.league_id = league.id where match.season = '2008/2009' group by league.name order by count(match.id) desc limit 1", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1474, "question": "What is the average overall rating of the players born before the year 1986?", "db_id": "european_football_2", "sql": "select avg(player_attributes.overall_rating) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where strftime('%Y' , player.birthday) < '1986'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1475, "question": "What is the average overall rating of the players born before the year 1986?", "db_id": "european_football_2", "sql": "SELECT AVG(T2.overall_rating) FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE strftime('%Y', T1.birthday) < '1986'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1476, "question": "How much higher in percentage is Ariel Borysiuk's overall rating than that of Paulin Puel?", "db_id": "european_football_2", "sql": "select cast((sum(case when player.player_name = 'Ariel Borysiuk' then player_attributes.overall_rating else 0 end) - sum(case when player.player_name = 'Paulin Puel' then player_attributes.overall_rating else 0 end)) as real) * 100 / sum(case when player.player_name = 'Paulin Puel' then player_attributes.overall_rating else 0 end) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id", "label": true, "error_types": [] }, { "id": 1477, "question": "How much higher in percentage is Ariel Borysiuk's overall rating than that of Paulin Puel?", "db_id": "european_football_2", "sql": "SELECT cast((player_attributes.overall_rating - ( SELECT overall_rating FROM player_attributes WHERE player_name = 'Paulin Puel' )) AS REAL) * 100 / ( SELECT overall_rating FROM player_attributes WHERE player_name = 'Paulin Puel' ) FROM player_attributes INNER JOIN player ON player_attributes.player_api_id = player.player_api_id WHERE player.player_name = 'Ariel Borysiuk'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1478, "question": "How much is the average build up play speed of the Heart of Midlothian team?", "db_id": "european_football_2", "sql": "SELECT AVG(T2.buildUpPlaySpeed) 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 = 'Heart of Midlothian'", "label": true, "error_types": [] }, { "id": 1479, "question": "Calculate the average overall rating of Pietro Marino.", "db_id": "european_football_2", "sql": "SELECT AVG(T1.overall_rating) FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T2.player_name = 'Pietro Marino'", "label": true, "error_types": [] }, { "id": 1480, "question": "What is Aaron Lennox's total crossing score?", "db_id": "european_football_2", "sql": "select sum(player_attributes.crossing) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Aaron Lennox'", "label": true, "error_types": [] }, { "id": 1481, "question": "What is Ajax's highest chance creation passing score and what is it classified as?", "db_id": "european_football_2", "sql": "SELECT team_attributes.chancecreationpassing, team_attributes.chancecreationpassingclass FROM team INNER JOIN team_attributes ON team.team_api_id = team_attributes.team_api_id WHERE team.team_long_name = 'Ajax' ORDER BY team_attributes.chancecreationpassing DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1482, "question": "Which foot is preferred by Abdou Diallo?", "db_id": "european_football_2", "sql": "SELECT player_attributes.preferred_foot FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Abdou Diallo'", "label": true, "error_types": [] }, { "id": 1483, "question": "What is the highest overall rating received by Dorlan Pabon?", "db_id": "european_football_2", "sql": "SELECT player_attributes.overall_rating FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id WHERE player.player_name = 'Dorlan Pabon' ORDER BY player_attributes.overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1484, "question": "What is the average number of goals made by Parma as the away team while playing in Italy?", "db_id": "european_football_2", "sql": "select avg(match.away_team_goal) from team inner join match on team.team_api_id = match.away_team_api_id inner join country on match.country_id = country.id where team.team_long_name = 'Parma' and country.name = 'Italy'", "label": true, "error_types": [] }, { "id": 1485, "question": "What is the average number of goals made by Parma as the away team while playing in Italy?", "db_id": "european_football_2", "sql": "SELECT avg(match.away_team_goal) FROM team INNER JOIN MATCH ON team.team_api_id = MATCH.away_team_api_id INNER JOIN league ON team.team_api_id = league.id INNER JOIN country ON league.country_id = country.id WHERE team.team_long_name = 'Parma' AND country.name = 'Italy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1486, "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.", "db_id": "european_football_2", "sql": "select player.player_name from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player_attributes.overall_rating = 77 and player_attributes.date = '2016-06-23%' order by player.birthday asc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1487, "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.", "db_id": "european_football_2", "sql": "SELECT T2.player_name FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.overall_rating = 77 AND T1.date = '2016-06-23 00:00:00' ORDER BY T2.birthday LIMIT 1", "label": true, "error_types": [] }, { "id": 1488, "question": "What was the overall rating for Aaron Mooy on 2016/2/4?", "db_id": "european_football_2", "sql": "select player_attributes.overall_rating from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Aaron Mooy' and player_attributes.date = '2016-02-04 00:00:00'", "label": true, "error_types": [] }, { "id": 1489, "question": "What was the potiential for Francesco Parravicini on 2010/8/30?", "db_id": "european_football_2", "sql": "SELECT T2.potential 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 = 'Francesco Parravicini' AND T2.date = '2010-08-30 00:00:00'", "label": true, "error_types": [] }, { "id": 1490, "question": "How was Francesco Migliore's attacking work rate on 2015/5/1?", "db_id": "european_football_2", "sql": "select player_attributes.attacking_work_rate from player inner join player_attributes on player.id = player_attributes.player_api_id where player.player_name = 'Francesco Migliore' and player_attributes.date = '2015-05-01 00:00:00'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1491, "question": "How was Francesco Migliore's attacking work rate on 2015/5/1?", "db_id": "european_football_2", "sql": "SELECT player_attributes.attacking_work_rate FROM player_attributes INNER JOIN player ON player_attributes.player_api_id = player.player_api_id WHERE player_attributes.date = '2015-05-01 00:00:00' AND player.player_name = 'Francesco Migliore'", "label": true, "error_types": [] }, { "id": 1492, "question": "Tell the defensive work rate for Kevin Berigaud on 2013/2/22.", "db_id": "european_football_2", "sql": "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 T1.player_name = 'Kevin Berigaud' AND T2.date = '2013-02-22 00:00:00'", "label": true, "error_types": [] }, { "id": 1493, "question": "What was the build up play speed class for \"Willem II\" on 2011/2/22?", "db_id": "european_football_2", "sql": "select team_attributes.buildupplayspeedclass from team inner join team_attributes on team.team_api_id = team_attributes.team_api_id where team.team_long_name = 'Willem II' and team_attributes.date = '2012-02-22 00:00:00'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1494, "question": "How was the build up play dribbling class for \"LEI\" on 2015/9/10?", "db_id": "european_football_2", "sql": "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 T2.date = '2015-09-10 00:00:00'", "label": true, "error_types": [] }, { "id": 1495, "question": "Tell the build Up play passing class for \"FC Lorient\" on 2010/2/22.", "db_id": "european_football_2", "sql": "select team_attributes.buildupplaypassingclass from team inner join team_attributes on team.team_api_id = team_attributes.team_api_id where team.team_long_name = 'FC Lorient' and team_attributes.date = '2010-02-22'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1496, "question": "Tell the build Up play passing class for \"FC Lorient\" on 2010/2/22.", "db_id": "european_football_2", "sql": "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 = '2010-02-22 00:00:00'", "label": true, "error_types": [] }, { "id": 1497, "question": "State the chance creation passing class for \"PEC Zwolle\" on 2013/9/20.", "db_id": "european_football_2", "sql": "SELECT team_attributes.chancecreationpassingclass FROM team_attributes INNER JOIN team ON team_attributes.team_api_id = team.team_api_id WHERE team_attributes.date = '2013-09-20 00:00:00' AND team.team_long_name = 'PEC Zwolle'", "label": true, "error_types": [] }, { "id": 1498, "question": "What was the chance creation crossing class for \"Hull City\" on 2010/2/22?", "db_id": "european_football_2", "sql": "SELECT team_attributes.chancecreationcrossingclass FROM team_attributes INNER JOIN team ON team_attributes.team_api_id = team.team_api_id WHERE team_attributes.date = '2010-02-22 00:00:00' AND team.team_long_name = 'Hull City'", "label": true, "error_types": [] }, { "id": 1499, "question": "For the team \"Hannover 96\", what was its defence aggression class on 2015/9/10?", "db_id": "european_football_2", "sql": "select team_attributes.defenceaggressionclass from team inner join team_attributes on team.team_api_id = team_attributes.team_api_id where team.team_long_name = 'Hannover 96' and team_attributes.date = '2015-09-10 00:00:00'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1500, "question": "What was the average overall rating for Marko Arnautovic from 2007/2/22 to 2016/4/21?", "db_id": "european_football_2", "sql": "select avg(player_attributes.overall_rating) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id where player.player_name = 'Marko Arnautovic' and player_attributes.date between '2007-02-22 00:00:00' and '2016-04-21 00:00:00'", "label": true, "error_types": [] }, { "id": 1501, "question": "What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?", "db_id": "european_football_2", "sql": "select cast((sum(case when player.player_name = 'Landon Donovan' then player_attributes.overall_rating else 0 end) - sum(case when player.player_name = 'Jordan Bowery' then player_attributes.overall_rating else 0 end)) as real) * 100 / sum(case when player.player_name = 'Landon Donovan' then player_attributes.overall_rating else 0 end) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1502, "question": "What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?", "db_id": "european_football_2", "sql": "SELECT cast((sum(CASE WHEN player.player_name = 'Landon Donovan' THEN player_attributes.overall_rating ELSE 0 END) - sum(CASE WHEN player.player_name = 'Jordan Bowery' THEN player_attributes.overall_rating ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN player.player_name = 'Landon Donovan' THEN player_attributes.overall_rating ELSE 0 END) FROM player_attributes INNER JOIN player ON player_attributes.player_api_id = player.player_api_id WHERE player_attributes.date = '2013-07-12'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 1503, "question": "What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?", "db_id": "european_football_2", "sql": "SELECT CAST((SUM(CASE WHEN T1.player_name = 'Landon Donovan' THEN T2.overall_rating ELSE 0 END) - SUM(CASE WHEN T1.player_name = 'Jordan Bowery' THEN T2.overall_rating ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.player_name = 'Landon Donovan' THEN T2.overall_rating ELSE 0 END) AS percentage_difference FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T2.date = '2013-07-12 00:00:00'", "label": true, "error_types": [] }, { "id": 1504, "question": "List down most tallest players' name.", "db_id": "european_football_2", "sql": "select player_name from player order by height desc limit 5", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Window Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1505, "question": "What are the player api id of 10 heaviest players?", "db_id": "european_football_2", "sql": "SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 10", "label": true, "error_types": [] }, { "id": 1506, "question": "State the name of the most strongest player.", "db_id": "european_football_2", "sql": "SELECT T2.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.overall_rating DESC LIMIT 10", "label": true, "error_types": [] }, { "id": 1507, "question": "What is the name of players with the highest potential?", "db_id": "european_football_2", "sql": "SELECT T2.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", "label": true, "error_types": [] }, { "id": 1508, "question": "Who are the players that tend to be attacking when their mates were doing attack moves? List down their name.", "db_id": "european_football_2", "sql": "SELECT T2.player_name FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.attacking_work_rate = 'high'", "label": true, "error_types": [] }, { "id": 1509, "question": "Among the players with finishing rate of 1, pick the eldest player and state the player's name.", "db_id": "european_football_2", "sql": "SELECT T2.player_name FROM Player_Attributes AS T1 INNER JOIN Player AS T2 ON T1.player_api_id = T2.player_api_id WHERE T1.finishing = 1 ORDER BY T2.birthday ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1510, "question": "State the name of players who came from Belgium.", "db_id": "european_football_2", "sql": "select player.player_name from match inner join league on player.player_api_id = match.away_player_10 inner join player on match.home_player_1 = player.player_api_id inner join country on country.id = match.country_id where country.name = 'Belgium'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1511, "question": "State the name of players who came from Belgium.", "db_id": "european_football_2", "sql": "SELECT player.player_name FROM player INNER JOIN MATCH ON player.player_api_id = MATCH.home_player_1 INNER JOIN league ON MATCH.league_id = league.id INNER JOIN country ON league.country_id = country.id WHERE country.name = 'Belgium'", "label": true, "error_types": [] }, { "id": 1512, "question": "State the name of players who came from Belgium.", "db_id": "european_football_2", "sql": "SELECT DISTINCT T2.player_name FROM Player AS T2 JOIN Match AS T1 ON T2.player_api_id IN (T1.home_player_1, T1.home_player_2, T1.home_player_3, T1.home_player_4, T1.home_player_5, T1.home_player_6, T1.home_player_7, T1.home_player_8, T1.home_player_9, T1.home_player_10, T1.home_player_11, T1.away_player_1, T1.away_player_2, T1.away_player_3, T1.away_player_4, T1.away_player_5, T1.away_player_6, T1.away_player_7, T1.away_player_8, T1.away_player_9, T1.away_player_10, T1.away_player_11) JOIN Country AS T3 ON T1.country_id = T3.id WHERE T3.name = 'Belgium'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1513, "question": "Locate players with vision scores of 90 and above, state the country of these players.", "db_id": "european_football_2", "sql": "SELECT DISTINCT country.name FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id INNER JOIN league ON league.country_id = player.id INNER JOIN country ON country.id = league.country_id WHERE player_attributes.vision > 89", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1514, "question": "Locate players with vision scores of 90 and above, state the country of these players.", "db_id": "european_football_2", "sql": "SELECT T1.player_name, T2.vision FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.vision > 89", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1515, "question": "Which country's players have the heaviest average weights?", "db_id": "european_football_2", "sql": "select country.name from player inner join match on player.player_api_id = match.home_player_1 inner join country on match.country_id = country.id group by country.name order by avg(player.weight) desc limit 1", "label": true, "error_types": [] }, { "id": 1516, "question": "Which country's players have the heaviest average weights?", "db_id": "european_football_2", "sql": "SELECT country.name FROM player INNER JOIN country ON player.id = country.id GROUP BY country.name ORDER BY avg(player.weight) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1517, "question": "List down the long name for slow speed class team.", "db_id": "european_football_2", "sql": "SELECT T2.team_long_name FROM Team_Attributes AS T1 INNER JOIN Team AS T2 ON T1.team_api_id = T2.team_api_id WHERE T1.buildUpPlaySpeedClass = 'Slow'", "label": true, "error_types": [] }, { "id": 1518, "question": "What are the short name of team who played safe while creating chance of passing?", "db_id": "european_football_2", "sql": "SELECT 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'", "label": true, "error_types": [] }, { "id": 1519, "question": "What is the average heights of Italy players?", "db_id": "european_football_2", "sql": "select avg(player.height) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id inner join league on player_attributes.id = league.id inner join country on league.country_id = country.id where country.name = 'Italy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1520, "question": "What is the average heights of Italy players?", "db_id": "european_football_2", "sql": "SELECT avg(player.height) FROM country INNER JOIN league ON country.id = league.country_id INNER JOIN MATCH ON league.id = MATCH.country_id INNER JOIN player ON MATCH.home_player_1 = player.player_api_id WHERE country.name = 'Italy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1521, "question": "What is the average heights of Italy players?", "db_id": "european_football_2", "sql": "SELECT AVG(T1.height) AS average_height FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id JOIN Country AS T3 ON T1.player_fifa_api_id = T3.id WHERE T3.name = 'Italy'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1522, "question": "Please provide the names of top three football players who are over 180 cm tall in alphabetical order.", "db_id": "european_football_2", "sql": "select player_name from player where height > 180 order by height limit 3", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1523, "question": "Please provide the names of top three football players who are over 180 cm tall in alphabetical order.", "db_id": "european_football_2", "sql": "SELECT player_name FROM player WHERE height > 180 ORDER BY player_name LIMIT 3", "label": true, "error_types": [] }, { "id": 1524, "question": "What is the difference between players 6 and 23's jumping scores?", "db_id": "european_football_2", "sql": "select sum(case when player_attributes.jumping = 6 then 1 else 0 end) - sum(case when player_attributes.jumping = 23 then 1 else 0 end) from player inner join player_attributes on player.player_api_id = player_attributes.player_api_id", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1525, "question": "What is the difference between players 6 and 23's jumping scores?", "db_id": "european_football_2", "sql": "SELECT jumping FROM player_attributes WHERE id = 6 OR id = 23", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1526, "question": "What is the difference between players 6 and 23's jumping scores?", "db_id": "european_football_2", "sql": "SELECT (SELECT jumping FROM Player_Attributes WHERE id = 6 AND jumping IS NOT NULL) - (SELECT jumping FROM Player_Attributes WHERE id = 23 AND jumping IS NOT NULL) AS diff", "label": true, "error_types": [] }, { "id": 1527, "question": "Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.", "db_id": "european_football_2", "sql": "select id from player_attributes order by potential asc limit 3", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1528, "question": "Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.", "db_id": "european_football_2", "sql": "SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = 'right' ORDER BY potential ASC LIMIT 3", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1529, "question": "How many players had the highest potential score for crossing that preferred to use their left foots while attacking?", "db_id": "european_football_2", "sql": "SELECT count(player_api_id) FROM player_attributes WHERE preferred_foot = 'left' AND crossing = ( SELECT max(crossing) FROM player_attributes )", "label": true, "error_types": [] }, { "id": 1530, "question": "What percentage of players have a strength and stamina score of more than 80?", "db_id": "european_football_2", "sql": "select cast(sum(case when player_attributes.stamina > 80 then 1 else 0 end) as real) * 100 / count(player.player_name) from player_attributes inner join player on player_attributes.player_api_id = player.player_api_id", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1531, "question": "What percentage of players have a strength and stamina score of more than 80?", "db_id": "european_football_2", "sql": "SELECT cast(count(CASE WHEN strength > 80 AND stamina > 80 THEN player_api_id ELSE NULL END) AS REAL) * 100 / count(player_api_id) FROM player_attributes", "label": true, "error_types": [] }, { "id": 1532, "question": "What percentage of players have a strength and stamina score of more than 80?", "db_id": "european_football_2", "sql": "SELECT CAST(SUM(CASE WHEN strength > 80 AND stamina > 80 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM Player_Attributes WHERE strength IS NOT NULL AND stamina IS NOT NULL", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1533, "question": "In what country did the Poland Ekstraklasa take place?", "db_id": "european_football_2", "sql": "SELECT country.name FROM league INNER JOIN country ON league.country_id = country.id WHERE league.name = 'Poland Ekstraklasa'", "label": true, "error_types": [] }, { "id": 1534, "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?", "db_id": "european_football_2", "sql": "select home_team_goal , away_team_goal from match where date like '2008-09-24%'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1535, "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?", "db_id": "european_football_2", "sql": "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%'", "label": true, "error_types": [] }, { "id": 1536, "question": "What are Alexis Blin's sprint speed, agility, and acceleration scores?", "db_id": "european_football_2", "sql": "SELECT T2.sprint_speed, T2.agility, T2.acceleration 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 = 'Alexis Blin'", "label": true, "error_types": [] }, { "id": 1537, "question": "Does the KSV Cercle Brugge team have a slow, balanced or fast speed class?", "db_id": "european_football_2", "sql": "SELECT team_attributes.buildupplayspeedclass FROM team INNER JOIN team_attributes ON team.team_api_id = team_attributes.team_api_id WHERE team.team_long_name = 'KSV Cercle Brugge'", "label": true, "error_types": [] }, { "id": 1538, "question": "In the 2015–2016 season, how many games were played in the Italian Serie A league?", "db_id": "european_football_2", "sql": "select sum(case when match.season = '2015/2016' then 1 else 0 end) from match inner join league on match.league_id = league.id where league.country_id = 'I' and league.name = 'Serie A'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1539, "question": "In the 2015–2016 season, how many games were played in the Italian Serie A league?", "db_id": "european_football_2", "sql": "SELECT count(match_api_id) FROM `match` WHERE season = '2015/2016'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1540, "question": "In the 2015–2016 season, how many games were played in the Italian Serie A league?", "db_id": "european_football_2", "sql": "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'", "label": true, "error_types": [] }, { "id": 1541, "question": "What was the highest score of the home team in the Netherlands Eredivisie league?", "db_id": "european_football_2", "sql": "select max(match.home_team_goal) from match inner join league on match.league_id = league.id inner join country on league.country_id = country.id where league.name = 'Netherlands Eredivisie'", "label": true, "error_types": [] }, { "id": 1542, "question": "Which top 4 leagues had the most games in the 2015-2016 season?", "db_id": "european_football_2", "sql": "select team.team_long_name from team inner join match on team.team_api_id = match.home_team_api_id or team.team_api_id = match.away_team_api_id where match.season = '2015/2016' group by team.team_long_name order by count(team.id) desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1543, "question": "Which top 4 leagues had the most games in the 2015-2016 season?", "db_id": "european_football_2", "sql": "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(T1.id) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1544, "question": "Please provide the full name of the away team that scored the most goals.", "db_id": "european_football_2", "sql": "select team.team_long_name from team inner join match on team.team_api_id = match.away_team_api_id group by team.team_long_name order by sum(match.away_team_goal) desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1545, "question": "Please provide the full name of the away team that scored the most goals.", "db_id": "european_football_2", "sql": "SELECT team.team_long_name FROM team INNER JOIN MATCH ON team.team_api_id = MATCH.away_team_api_id ORDER BY MATCH.away_team_goal DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1546, "question": "Please name one player whose overall strength is the greatest.", "db_id": "european_football_2", "sql": "SELECT T2.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.overall_rating DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1547, "question": "What is the percentage of players that are under 180 cm who have an overall strength of more than 70?", "db_id": "european_football_2", "sql": "select cast(sum(case when player_attributes.overall_rating > 70 then 1 else 0 end) as real) * 100 / count(player.id) from player_attributes inner join player on player_attributes.player_api_id = player.player_api_id where player.height < 180", "label": true, "error_types": [] }, { "id": 1548, "question": "What is the percentage of players that are under 180 cm who have an overall strength of more than 70?", "db_id": "european_football_2", "sql": "SELECT cast(count(CASE WHEN player.height < 180 AND player_attributes.overall_rating > 70 THEN player.id ELSE NULL END) AS REAL) * 100 / count(player.id) FROM player INNER JOIN player_attributes ON player.player_api_id = player_attributes.player_api_id", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1549, "question": "What is the percentage of players that are under 180 cm who have an overall strength of more than 70?", "db_id": "european_football_2", "sql": "SELECT CAST(SUM(CASE WHEN T1.height < 180 AND T2.strength > 70 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) AS percentage FROM Player AS T1 INNER JOIN Player_Attributes AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.height IS NOT NULL AND T2.strength IS NOT NULL", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1550, "question": "Are there more in-patient or outpatient who were male? What is the deviation in percentage?", "db_id": "thrombosis_prediction", "sql": "select case when sum(case when admission = '+' then 1 else 0 end) > sum(case when admission = '-' then 1 else 0 end) then 'in-patient' else 'outpatient' end from patient", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1551, "question": "Are there more in-patient or outpatient who were male? What is the deviation in percentage?", "db_id": "thrombosis_prediction", "sql": "SELECT cast((sum(iif(admission = '+', 1, 0)) - sum(iif(admission = '-', 1, 0))) AS REAL) * 100 / sum(iif(sex = 'M', 1, 0)) FROM patient", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1552, "question": "Are there more in-patient or outpatient who were male? What is the deviation in percentage?", "db_id": "thrombosis_prediction", "sql": "SELECT SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) - SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) AS DIFF, CAST(SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) - SUM(CASE WHEN Admission = '-' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN Admission = '+' THEN 1 ELSE 0 END) AS PERCENTAGE FROM Patient WHERE SEX = 'M'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1553, "question": "What is the percentage of female patient were born after 1930?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when sex = 'F' and strftime('%Y' , birthday) > '1930' then 1 else 0 end) as real) * 100 / count(id) from patient", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1554, "question": "What is the percentage of female patient were born after 1930?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(iif(sex = 'F', 1, 0)) AS REAL) * 100 / count(id) FROM patient WHERE strftime('%Y', birthday) > '1930'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1555, "question": "What is the percentage of female patient were born after 1930?", "db_id": "thrombosis_prediction", "sql": "SELECT CAST(SUM(CASE WHEN strftime('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE SEX = 'F'", "label": true, "error_types": [] }, { "id": 1556, "question": "For patient born between Year 1930 to 1940, how many percent of them were inpatient?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(CASE WHEN admission = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / count(id) FROM patient WHERE strftime('%Y', birthday) BETWEEN '1930' AND '1940'", "label": true, "error_types": [] }, { "id": 1557, "question": "What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when admission = '+' then 1 else 0 end) as real) / sum(case when admission = '-' then 1 else 0 end) from patient where diagnosis = 'SLE'", "label": true, "error_types": [] }, { "id": 1558, "question": "What is the ratio of outpatient to inpatient followed up treatment among all the 'SLE' diagnosed patient?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(CASE WHEN patient.admission = '-' THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN patient.admission = '+' THEN 1 ELSE 0 END) FROM patient INNER JOIN examination ON patient.id = examination.id WHERE examination.diagnosis = 'SLE'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1559, "question": "What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.", "db_id": "thrombosis_prediction", "sql": "select distinct examination.diagnosis , laboratory.date from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where patient.id = 30609", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1560, "question": "What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.diagnosis, laboratory.`date` FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.id = 30609", "label": true, "error_types": [] }, { "id": 1561, "question": "State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1562, "question": "List the patient ID, sex and birthday of patient with LDH beyond normal range.", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1563, "question": "State the ID and age of patient with positive degree of coagulation.", "db_id": "thrombosis_prediction", "sql": "select patient.id , patient.birthday - strftime('%Y' , examination.kct) from patient inner join examination on patient.id = examination.id where examination.rvvt = '+'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1564, "question": "State the ID and age of patient with positive degree of coagulation.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', T1.Birthday) AS age FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.RVVT = '+'", "label": true, "error_types": [] }, { "id": 1565, "question": "For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.sex, patient.diagnosis FROM patient INNER JOIN examination ON patient.id = examination.id WHERE examination.thrombosis = 2", "label": true, "error_types": [] }, { "id": 1566, "question": "List all patients who were born in 1937 whose total cholesterol was beyond the normal range.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE strftime('%Y', patient.birthday) = '1937' AND laboratory.`t-cho` > 250", "label": true, "error_types": [] }, { "id": 1567, "question": "For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.", "db_id": "thrombosis_prediction", "sql": "select patient.id , patient.sex , patient.diagnosis from patient inner join laboratory on patient.id = laboratory.id where laboratory.alb < 3.5", "label": true, "error_types": [] }, { "id": 1568, "question": "What is the percentage of female patient had total protein not within the normal range?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when patient.sex = 'F' then 1 else 0 end) as real) * 100 / count(patient.id) from patient inner join laboratory on patient.id = laboratory.id where laboratory.tp < '6.0' or laboratory.tp > '8.5'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1569, "question": "What is the percentage of female patient had total protein not within the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(iif(laboratory.tp < 6.0 OR laboratory.tp > 8.5, 1, 0)) AS REAL) * 100 / count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'F'", "label": true, "error_types": [] }, { "id": 1570, "question": "For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration?", "db_id": "thrombosis_prediction", "sql": "SELECT avg(examination.`acl igg`) FROM patient INNER JOIN examination ON patient.id = examination.id WHERE patient.admission = '+' AND strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) > 50", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1571, "question": "For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration?", "db_id": "thrombosis_prediction", "sql": "SELECT AVG(T2.`aCL IgG`) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', T1.Birthday) >= 50", "label": true, "error_types": [] }, { "id": 1572, "question": "How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?", "db_id": "thrombosis_prediction", "sql": "select count(*) from patient where strftime('%Y' , admission) = '1997' and sex = 'F' and description = 'Inpatient'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1573, "question": "How many female patients who came at the hospital in 1997 was immediately followed at the outpatient clinic?", "db_id": "thrombosis_prediction", "sql": "SELECT count(id) FROM patient WHERE sex = 'F' AND strftime('%Y', `description`) = '1997' AND admission = '-'", "label": true, "error_types": [] }, { "id": 1574, "question": "What was the age of the youngest patient when they initially arrived at the hospital?", "db_id": "thrombosis_prediction", "sql": "SELECT max(strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', birthday)) FROM patient", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1575, "question": "What was the age of the youngest patient when they initially arrived at the hospital?", "db_id": "thrombosis_prediction", "sql": "SELECT MIN(strftime('%Y', `First Date`) - strftime('%Y', Birthday)) AS Age FROM Patient WHERE Birthday IS NOT NULL AND `First Date` IS NOT NULL", "label": true, "error_types": [] }, { "id": 1576, "question": "How many of the patients with the most serious thrombosis cases examined in 1997 are women?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`Examination Date` LIKE '1997%' AND T2.Thrombosis = 1 AND T1.SEX = 'F'", "label": true, "error_types": [] }, { "id": 1577, "question": "What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.", "db_id": "thrombosis_prediction", "sql": "select examination.symptoms , patient.diagnosis from patient inner join examination on patient.id = examination.id order by patient.birthday asc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1578, "question": "What is the ratio of male to female patients among all those with abnormal uric acid counts?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when patient.sex = 'M' then 1 else 0 end) as real) / sum(case when patient.sex = 'F' then 1 else 0 end) from patient inner join laboratory on patient.id = laboratory.id where laboratory.ua < '8.0'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1579, "question": "What is the ratio of male to female patients among all those with abnormal uric acid counts?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(CASE WHEN patient.sex = 'M' THEN 1 ELSE 0 END) AS REAL) / sum(CASE WHEN patient.sex = 'F' THEN 1 ELSE 0 END) FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.ua BETWEEN 8 AND 6.5", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1580, "question": "What is the ratio of male to female patients among all those with abnormal uric acid counts?", "db_id": "thrombosis_prediction", "sql": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'M' AND T2.UA <= 8.0 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.SEX = 'F' AND T2.UA <= 6.5 THEN 1 ELSE 0 END) AS ratio FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T1.SEX = 'M' AND T2.UA <= 8.0) OR (T1.SEX = 'F' AND T2.UA <= 6.5)", "label": true, "error_types": [] }, { "id": 1581, "question": "How many underage patients were examined during the course of the three-year period from 1990 to 1993?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`Examination Date` BETWEEN '1990-01-01' AND '1993-12-31' AND strftime('%Y', T1.Birthday) <= strftime('%Y', T2.`Examination Date`) - 18", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 1582, "question": "How many male patients have elevated total bilirubin count?", "db_id": "thrombosis_prediction", "sql": "SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'M' AND laboratory.`t-bil` > 2.0", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1583, "question": "How many male patients have elevated total bilirubin count?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.`T-BIL` > 2.0", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1584, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT Diagnosis FROM Examination WHERE `Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY Diagnosis ORDER BY COUNT(Diagnosis) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1585, "question": "What was the anti-nucleus antibody concentration level for the patient id 3605340 on 1996/12/2?", "db_id": "thrombosis_prediction", "sql": "SELECT ANA FROM Examination WHERE ID = 3605340 AND `Examination Date` = '1996-12-02'", "label": true, "error_types": [] }, { "id": 1586, "question": "Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?", "db_id": "thrombosis_prediction", "sql": "SELECT `t-cho` < 250 FROM laboratory WHERE id = 2927464 AND `date` = '1995-09-04'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1587, "question": "Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?", "db_id": "thrombosis_prediction", "sql": "SELECT CASE WHEN T1.`T-CHO` < 250 THEN 'YES' ELSE 'NO' END FROM Laboratory AS T1 WHERE T1.ID = 2927464 AND T1.Date = '1995-09-04'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1588, "question": "Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?", "db_id": "thrombosis_prediction", "sql": "select distinct patient.sex from patient inner join laboratory on patient.id = laboratory.id where laboratory.date = '1992-06-12' and laboratory.gpt = 9 and patient.sex = 'M'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Data Format Mismatch" } ] }, { "id": 1589, "question": "Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?", "db_id": "thrombosis_prediction", "sql": "SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.Date = '1992-06-12' AND T2.GPT = 9", "label": true, "error_types": [] }, { "id": 1590, "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?", "db_id": "thrombosis_prediction", "sql": "select strftime('%Y' , patient.birthday) - strftime('%Y' , laboratory.date) as age from patient inner join laboratory on patient.id = laboratory.id where laboratory.date = '1991-10-21' and laboratory.ua = 8.4", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1591, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.date = '1991-10-21' AND laboratory.ua = '8.4'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1592, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT strftime('%Y', '1991-10-21') - strftime('%Y', T1.Birthday) AS age FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.Date = '1991-10-21' AND T2.UA = 8.4", "label": true, "error_types": [] }, { "id": 1593, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT count(laboratory.id) FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.`first date` = '1991-06-13' AND patient.diagnosis = 'SJS' AND strftime('%Y', laboratory.`date`) = '1995'", "label": true, "error_types": [] }, { "id": 1594, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`Examination Date` = '1997-01-27' AND T2.Diagnosis = 'SLE'", "label": true, "error_types": [] }, { "id": 1595, "question": "For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?", "db_id": "thrombosis_prediction", "sql": "SELECT examination.symptoms FROM examination INNER JOIN patient ON examination.id = patient.id WHERE patient.birthday = '1959-03-01' AND examination.`examination date` = '1993-09-27'", "label": true, "error_types": [] }, { "id": 1596, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT SUM(CASE WHEN strftime('%Y-%m', T2.Date) = '1981-11' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN strftime('%Y-%m', T2.Date) = '1981-12' THEN T2.`T-CHO` ELSE 0 END) AS Cholesterol_Decrease FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02-18'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1597, "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.", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on patient.id = laboratory.id where laboratory.date between '1987-07-06' and '1996-01-31' and laboratory.gpt > 30 and laboratory.alb < 4", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1598, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT patient.id FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.date BETWEEN '1987-07-06' AND '1996-01-31' AND laboratory.gpt > 30 AND laboratory.alb < 4", "label": true, "error_types": [] }, { "id": 1599, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1987-07-06' AND '1996-01-31' AND T2.GPT > 30 AND T2.ALB < 4", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1600, "question": "How many female patients born in 1964 were admitted to the hospital? List them by ID.", "db_id": "thrombosis_prediction", "sql": "select count(id) from patient where sex = 'F' and strftime('%Y' , admission) = '1964' and birthday = '1964'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1601, "question": "How many female patients born in 1964 were admitted to the hospital? List them by ID.", "db_id": "thrombosis_prediction", "sql": "SELECT count(id) FROM patient WHERE sex = 'F' AND strftime('%Y', birthday) = '1964' AND admission = '+'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1602, "question": "How many female patients born in 1964 were admitted to the hospital? List them by ID.", "db_id": "thrombosis_prediction", "sql": "SELECT ID FROM Patient WHERE SEX = 'F' AND Admission = '+' AND Birthday LIKE '1964%'", "label": true, "error_types": [] }, { "id": 1603, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT count(patient.id) FROM patient INNER JOIN examination ON patient.id = examination.id WHERE examination.thrombosis = 2 AND examination.`ana pattern` = 'S' AND examination.`acl igm` * 1.2 > ( SELECT avg(examination.`acl igm`) FROM patient INNER JOIN examination ON patient.id = examination.id )", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1604, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE `aCL IgM` IS NOT NULL)", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1605, "question": "What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(CASE WHEN laboratory.ua <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / count(laboratory.id) FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.`u-pro` BETWEEN 0 AND 30", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1606, "question": "What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) AS Percentage FROM Laboratory WHERE `U-PRO` > 0 AND `U-PRO` < 30", "label": true, "error_types": [] }, { "id": 1607, "question": "What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(count(CASE WHEN patient.diagnosis = 'BEHCET' THEN 1 ELSE NULL END) AS REAL) * 100 / count(patient.id) FROM patient INNER JOIN examination ON patient.id = examination.id WHERE strftime('%Y', patient.`first date`) = '1981' AND patient.sex = 'M'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1608, "question": "What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?", "db_id": "thrombosis_prediction", "sql": "SELECT (CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) / COUNT(*)) * 100 AS percentage FROM Patient WHERE SEX = 'M' AND strftime('%Y', `First Date`) = '1981'", "label": true, "error_types": [] }, { "id": 1609, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.Date LIKE '1991-10%' AND T2.`T-BIL` < 2.0", "label": true, "error_types": [] }, { "id": 1610, "question": "Excluding all P only ANA Pattern patients, how many of the remainder are women born between 1980 and 1989?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.`ANA Pattern` != 'p' AND T1.SEX = 'F' AND strftime('%Y', T1.Birthday) BETWEEN '1980' AND '1989'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1611, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT patient.sex FROM patient INNER JOIN examination ON patient.id = examination.id INNER JOIN laboratory ON patient.id = laboratory.id WHERE examination.diagnosis = 'PSS' AND laboratory.crp > 2 AND laboratory.cre = 1 AND laboratory.ldh = 123", "label": true, "error_types": [] }, { "id": 1612, "question": "What is the average blood albumin level for female patients with a PLT greater than 400 who have been diagnosed with SLE?", "db_id": "thrombosis_prediction", "sql": "SELECT AVG(T2.ALB) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND T1.Diagnosis = 'SLE' AND T2.PLT > 400", "label": true, "error_types": [] }, { "id": 1613, "question": "What is the most common sign of patients with SLE disease?", "db_id": "thrombosis_prediction", "sql": "SELECT symptoms FROM examination WHERE diagnosis = 'SLE' GROUP BY symptoms ORDER BY count(symptoms) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1614, "question": "How many female patients were given an APS diagnosis?", "db_id": "thrombosis_prediction", "sql": "select count(diagnosis) from patient where diagnosis = 'APS' and sex = 'F'", "label": true, "error_types": [] }, { "id": 1615, "question": "What percentage of patients who were born in 1980 and were diagnosed with RA are women?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when sex = 'F' then 1 else 0 end) as real) * 100 / count(id) from patient where strftime('%Y' , birthday) = '1980' and diagnosis = 'RA'", "label": true, "error_types": [] }, { "id": 1616, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T1.Admission = '-' AND T1.Diagnosis = 'BEHCET' AND strftime('%Y', T2.`Examination Date`) BETWEEN '1995' AND '1997'", "label": true, "error_types": [] }, { "id": 1617, "question": "Was the patient with the number 57266's uric acid within a normal range?", "db_id": "thrombosis_prediction", "sql": "select laboratory.ua from patient inner join laboratory on patient.id = laboratory.id where patient.id = 57266 and patient.sex = 'M' or patient.sex = 'F' and laboratory.ua > 8.0", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 1618, "question": "Was the patient with the number 57266's uric acid within a normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT IIF(T1.SEX = 'M', IIF(T2.UA > 8.0, 'YES', 'NO'), IIF(T2.UA > 6.5, 'YES', 'NO')) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 57266", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1619, "question": "When is the laboratory examination of patient '48473' where his/her AST glutamic oxaloacetic transaminase (GOT) index is above the normal range.", "db_id": "thrombosis_prediction", "sql": "select laboratory.date from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where patient.id = 48473 and laboratory.got >= 60", "label": true, "error_types": [] }, { "id": 1620, "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.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.sex , patient.birthday from patient inner join laboratory on patient.id = laboratory.id where strftime('%Y' , laboratory.date) = '1994' and laboratory.got < 60", "label": true, "error_types": [] }, { "id": 1621, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.sex = 'M' AND laboratory.gpt >= 60", "label": true, "error_types": [] }, { "id": 1622, "question": "Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.diagnosis from patient inner join laboratory on patient.id = laboratory.id where laboratory.gpt > 60 order by patient.birthday desc", "label": true, "error_types": [] }, { "id": 1623, "question": "What is the average index of the lactate dehydrogenase (LDH) for all patients with lactate dehydrogenase (LDH) within the normal range.", "db_id": "thrombosis_prediction", "sql": "SELECT avg(ldh) FROM laboratory WHERE ldh < 500", "label": true, "error_types": [] }, { "id": 1624, "question": "For patients with alkaliphophatase (ALP) within normal range, were they treated as inpatient or outpatient?", "db_id": "thrombosis_prediction", "sql": "select distinct patient.admission from patient inner join laboratory on patient.id = laboratory.id where laboratory.alp < 300", "label": true, "error_types": [] }, { "id": 1625, "question": "List ID, sex and date of birth of patient whose total protein (TP) below the lower range of the normal index.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.sex, patient.birthday FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.tp < 6.0", "label": true, "error_types": [] }, { "id": 1626, "question": "For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP idex from the normal.", "db_id": "thrombosis_prediction", "sql": "select laboratory.tp - laboratory.tp from patient inner join laboratory on patient.id = laboratory.id where patient.sex = 'F' and laboratory.tp > 8.5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1627, "question": "For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP idex from the normal.", "db_id": "thrombosis_prediction", "sql": "SELECT tp - 8.5 FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.sex = 'F' AND laboratory.tp > 8.5", "label": true, "error_types": [] }, { "id": 1628, "question": "Sort in descending order all patients by birthday for male patient with albumin not within range.", "db_id": "thrombosis_prediction", "sql": "select patient.birthday from patient inner join laboratory on patient.id = laboratory.id where patient.sex = 'M' and laboratory.alb < 3.5 or laboratory.alb >= 5.5 order by patient.birthday asc", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1629, "question": "Sort in descending order all patients by birthday for male patient with albumin not within range.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'M' AND (laboratory.alb < 3.5 OR laboratory.alb > 5.5) ORDER BY patient.birthday DESC", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1630, "question": "Sort in descending order all patients by birthday for male patient with albumin not within range.", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1631, "question": "What is the percentage of the female patient whose uric acid (UA) beyond the normal range?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(case when patient.sex = 'F' then 1 else 0 end) as real) * 100 / count(patient.id) from patient inner join laboratory on patient.id = laboratory.id where laboratory.ua > 6.5 and patient.sex = 'M'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1632, "question": "What is the percentage of the female patient whose uric acid (UA) beyond the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT cast(sum(CASE WHEN patient.sex = 'F' AND laboratory.ua > 8.0 THEN 1 ELSE 0 END) AS REAL) * 100 / count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1633, "question": "What is the percentage of the female patient whose uric acid (UA) beyond the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT CAST(SUM(CASE WHEN T1.SEX = 'F' AND T2.UA > 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS Percentage FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'", "label": true, "error_types": [] }, { "id": 1634, "question": "Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?", "db_id": "thrombosis_prediction", "sql": "select patient.id , patient.sex , patient.birthday from patient inner join laboratory on patient.id = laboratory.id where laboratory.un > 29", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1635, "question": "Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.sex, patient.birthday FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.un = 29", "label": true, "error_types": [] }, { "id": 1636, "question": "Provide the ID, sex, birthday of all patients diagnosed with 'RA' that are within the UN normal index.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'RA' AND T2.UN < 30", "label": true, "error_types": [] }, { "id": 1637, "question": "What is the highest total bilirubin level recorded? List out the patient details with ID, sex and birthday with that index.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` = (SELECT MAX(`T-BIL`) FROM Laboratory WHERE `T-BIL` IS NOT NULL)", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1638, "question": "Who is the oldest patient with the highest total cholesterol (T-CHO). State the patient ID and T-CHO index.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID, T2.`T-CHO` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T1.Birthday ASC, T2.`T-CHO` DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1639, "question": "What is the average age of the male patient with high cholesterol?", "db_id": "thrombosis_prediction", "sql": "SELECT AVG(strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', T1.Birthday)) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.`T-CHO` >= 250", "label": true, "error_types": [] }, { "id": 1640, "question": "Provide list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range?", "db_id": "thrombosis_prediction", "sql": "select patient.diagnosis from patient inner join laboratory on patient.id = laboratory.id where laboratory.tg > 100", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1641, "question": "Provide list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.diagnosis FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.tg > 100", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1642, "question": "Provide list of patients and their diagnosis with triglyceride (TG) index greater than 100 of the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG > 300", "label": true, "error_types": [] }, { "id": 1643, "question": "For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join laboratory on patient.id = laboratory.id where strftime('%Y' , laboratory.date) - strftime('%Y' , patient.birthday) > 50", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1644, "question": "For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years?", "db_id": "thrombosis_prediction", "sql": "SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) > 50 AND laboratory.tg > 200", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1645, "question": "For all patients with triglyceride (TG) level beyond the normal range, how many are age more than 50 years?", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1646, "question": "List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.id from patient inner join laboratory on patient.id = laboratory.id where laboratory.cpk < 250 and patient.admission = '-'", "label": true, "error_types": [] }, { "id": 1647, "question": "For patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join laboratory on patient.id = laboratory.id where patient.sex = 'M' and strftime('%Y' , patient.birthday) between '1936' and '1956' and laboratory.cpk > 250", "label": true, "error_types": [] }, { "id": 1648, "question": "For patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'M' AND strftime('%Y', patient.birthday) BETWEEN '1936' AND '1956' AND laboratory.cpk > 250", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1649, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.sex, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', birthday) AS age FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.`t-cho` < 250 AND laboratory.glu >= 180", "label": true, "error_types": [] }, { "id": 1650, "question": "What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.diagnosis , strftime('%Y' , current_timestamp) - strftime('%Y' , patient.birthday) as age from patient inner join laboratory on patient.id = laboratory.id where laboratory.rbc < 3.5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1651, "question": "What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.Diagnosis, T1.ID, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', T1.Birthday) AS age FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RBC < 3.5", "label": true, "error_types": [] }, { "id": 1652, "question": "For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital.", "db_id": "thrombosis_prediction", "sql": "select case when sum(case when patient.admission = '+' then 1 else 0 end) - sum(case when patient.admission = '-' then 1 else 0 end) > 50 then 'Yes' else 'No' end from patient inner join laboratory on patient.id = laboratory.id where laboratory.rbc < 3.5 or laboratory.rbc >= 6.0 and patient.sex = 'F'", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1653, "question": "For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.admission FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.sex = 'F' AND strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) > 50 AND (laboratory.rbc < 3.5 OR laboratory.rbc > 6)", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1654, "question": "For all the female patient age 50 and above, who has abnormal red blood cell count. State if they were admitted to hospital.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT 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', 'now') - strftime('%Y', T1.Birthday)) >= 50", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1655, "question": "Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.HGB < 10", "label": true, "error_types": [] }, { "id": 1656, "question": "Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex.", "db_id": "thrombosis_prediction", "sql": "select patient.id , patient.sex from patient inner join laboratory on patient.id = laboratory.id where patient.diagnosis = 'SLE' and laboratory.hgb >= 10 and patient.birthday < 17 order by patient.birthday asc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1657, "question": "Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, patient.sex FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE patient.diagnosis = 'SLE' AND laboratory.hgb BETWEEN 10 AND 17 ORDER BY patient.birthday LIMIT 1", "label": true, "error_types": [] }, { "id": 1658, "question": "Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.", "db_id": "thrombosis_prediction", "sql": "select patient.id , patient.birthday from patient inner join laboratory on patient.id = laboratory.id where laboratory.hct > 52 group by patient.id having count(laboratory.id) > 2", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1659, "question": "Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', birthday) AS age FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.hct > 52 GROUP BY patient.id HAVING count(patient.id) > 2", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" } ] }, { "id": 1660, "question": "Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID, strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', T1.Birthday) AS age FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.HCT > 52 GROUP BY T1.ID HAVING COUNT(T2.ID) >= 2", "label": true, "error_types": [] }, { "id": 1661, "question": "From laboratory examinations in 1991, what is the average hematoclit level that is lower than the normal range.", "db_id": "thrombosis_prediction", "sql": "select avg(hct) from laboratory where strftime('%Y' , date) = '1991' and hct < 29", "label": true, "error_types": [] }, { "id": 1662, "question": "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.id from patient inner join laboratory on patient.id = laboratory.id where strftime('%Y' , laboratory.date) - strftime('%Y' , patient.birthday) < 50 and laboratory.plt > 100 and laboratory.plt <= 400", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1663, "question": "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE strftime('%Y', laboratory.date) = '1984' AND laboratory.plt BETWEEN 100 AND 400 AND strftime('%Y', patient.birthday) + 50 > strftime('%Y', laboratory.date)", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1664, "question": "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE strftime('%Y', T2.Date) = '1984' AND T2.PLT BETWEEN 100 AND 400 AND (strftime('%Y', 'now') - strftime('%Y', T1.Birthday)) < 50", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1665, "question": "List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE strftime('%Y', laboratory.`date`) > '1992' AND laboratory.pt < 14", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1666, "question": "List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT 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", "label": true, "error_types": [] }, { "id": 1667, "question": "For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` > '1997-01-01' AND T2.APTT < 45", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1668, "question": "For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on patient.id = laboratory.id where examination.thrombosis = 3 and laboratory.aptt > 45", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1669, "question": "Please list the disease names of the patients that have a proteinuria level higher than normal.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT patient.diagnosis FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.`u-pro` > 30", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1670, "question": "Please list the disease names of the patients that have a proteinuria level higher than normal.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`U-PRO` >= 30", "label": true, "error_types": [] }, { "id": 1671, "question": "Which patient has a normal proteinuria level and is diagnosed with SLE? Please give his or her patient ID.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.diagnosis = 'SLE' AND laboratory.`u-pro` BETWEEN 0 AND 30", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1672, "question": "Which patient has a normal proteinuria level and is diagnosed with SLE? Please give his or her patient ID.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.`U-PRO` > 0 AND T2.`U-PRO` < 30", "label": true, "error_types": [] }, { "id": 1673, "question": "How many patients with an Ig G higher than normal?", "db_id": "thrombosis_prediction", "sql": "select count(distinct examination.id) from examination inner join laboratory on examination.id = laboratory.id where examination.symptoms = 'abortion' and laboratory.igg < 900", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" } ] }, { "id": 1674, "question": "Among the patients with a normal Ig G level, how many of them have symptoms?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on patient.id = laboratory.id where examination.symptoms is not null and laboratory.igg >= 900 and laboratory.igg <= 2000", "label": true, "error_types": [] }, { "id": 1675, "question": "Among the patients with a normal Ig G level, how many of them have symptoms?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.IGG BETWEEN 900 AND 2000 AND T2.Symptoms IS NOT NULL", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1676, "question": "For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with?", "db_id": "thrombosis_prediction", "sql": "select patient.diagnosis from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where laboratory.igm < 40 and laboratory.igm < 400 group by patient.diagnosis order by count(patient.diagnosis) desc limit 1", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1677, "question": "For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with?", "db_id": "thrombosis_prediction", "sql": "SELECT T2.Diagnosis FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.IGM < 40 OR T1.IGM > 400 GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1678, "question": "Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join laboratory on patient.id = laboratory.id where laboratory.crp >= 1.0 and strftime('%Y' , laboratory.date) - strftime('%Y' , patient.birthday) < 18", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1679, "question": "Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet?", "db_id": "thrombosis_prediction", "sql": "SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.crp NOT IN ('+', '-') AND strftime('%Y', CURRENT_TIMESTAMP) - strftime('%Y', patient.birthday) < 18", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1680, "question": "Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRP NOT IN ('+-', '-') AND T2.CRP >= 1.0 AND T1.Birthday IS NOT NULL AND T1.Birthday != '0000-00-00' AND T1.Birthday != '' AND T1.Birthday <= DATE('now', '-18 years')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1681, "question": "How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where laboratory.ra in ('-' , '+-') and examination.kct = '+'", "label": true, "error_types": [] }, { "id": 1682, "question": "How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?", "db_id": "thrombosis_prediction", "sql": "SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON patient.id = examination.id WHERE laboratory.ra = '+' AND examination.kct = '+'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1683, "question": "Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.diagnosis from patient inner join laboratory on patient.id = laboratory.id where strftime('%Y' , patient.birthday) >= '1995' and laboratory.ra in ('-' , '+-')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1684, "question": "Please list the ID of the patient whose RF is normal and who is older than 60.", "db_id": "thrombosis_prediction", "sql": "select patient.id from patient inner join laboratory on patient.id = laboratory.id where laboratory.rf < 20 and strftime('%Y' , patient.birthday) - strftime('%Y' , laboratory.rf) > 60", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1685, "question": "Please list the ID of the patient whose RF is normal and who is older than 60.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Birthday <= DATE('now', '-60 years')", "label": true, "error_types": [] }, { "id": 1686, "question": "How many patients with a normal RF don't have thrombosis?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join examination on patient.id = examination.id where examination.diagnosis = 'Normal' and examination.thrombosis = 0", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1687, "question": "How many patients with a normal RF don't have thrombosis?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0", "label": false, "error_types": [ { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1688, "question": "How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination?", "db_id": "thrombosis_prediction", "sql": "SELECT count(DISTINCT patient.id) FROM examination INNER JOIN patient ON examination.id = patient.id INNER JOIN laboratory ON patient.id = laboratory.id WHERE examination.`ana pattern` = 'P' AND laboratory.c3 > 35", "label": true, "error_types": [] }, { "id": 1689, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.HCT < 29 OR T1.HCT > 52 ORDER BY T2.`aCL IgA` DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1690, "question": "Among the patients have blood clots in veins, how many of them have a normal level of complement 4?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where patient.diagnosis = 'APS' and laboratory.c4 > 10", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1691, "question": "Among the patients have blood clots in veins, how many of them have a normal level of complement 4?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'APS' AND T2.C4 > 10", "label": true, "error_types": [] }, { "id": 1692, "question": "Which is the youngest patient with an abnormal anti-ribonuclear protein level? Please list his or her date of birth.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.birthday FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rnp NOT IN ('-', '+-') ORDER BY patient.birthday DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1693, "question": "Among the patients with normal anti-SM, how many of them does not have thrombosis?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where examination.thrombosis = 1 and laboratory.sm in ('-' , '+-')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1694, "question": "For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones.", "db_id": "thrombosis_prediction", "sql": "select patient.id from patient inner join laboratory on patient.id = laboratory.id where laboratory.sm in ('-' , '+-') order by patient.birthday desc limit 3", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1695, "question": "For the patients with an abnormal anti-SM, please list the IDs of the three youngest ones.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.SM NOT IN ('-', '+-') AND T1.SM IS NOT NULL ORDER BY T2.Birthday DESC LIMIT 3", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1696, "question": "Among the patients who has a normal anti-scl70, how many of them are female and does not have any symptom?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where patient.sex = 'M' and laboratory.sc170 in ('-' , '+-') and examination.symptoms = 'vertigo'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1697, "question": "How many patients with a normal anti-SSA came to the hospital before 2000?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSA IN ('-', '+-') AND STRFTIME('%Y', T1.`First Date`) < '1990'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1698, "question": "Which patient is the first patient with an abnormal anti-SSA to come to the hospital? Please give his or her ID.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSA NOT IN ('-', '+-') ORDER BY T1.`First Date` LIMIT 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Implicit Condition Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" } ] }, { "id": 1699, "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?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join laboratory on patient.id = laboratory.id where patient.sex = 'M' and laboratory.centromea in ('-' , '+-') and laboratory.ssb in ('-' , '+-')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1700, "question": "For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.", "db_id": "thrombosis_prediction", "sql": "select distinct patient.diagnosis from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where laboratory.dna >= 8", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1701, "question": "For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.diagnosis FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.dna >= 8", "label": true, "error_types": [] }, { "id": 1702, "question": "How many patients have a normal anti-DNA level, yet their data are not recorded.", "db_id": "thrombosis_prediction", "sql": "SELECT count(DISTINCT patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.dna < 8 AND patient.description IS NULL", "label": true, "error_types": [] }, { "id": 1703, "question": "Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?", "db_id": "thrombosis_prediction", "sql": "select patient.birthday from patient inner join laboratory on patient.id = laboratory.id where laboratory.got >= 60 order by patient.birthday desc limit 1", "label": true, "error_types": [] }, { "id": 1704, "question": "Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?", "db_id": "thrombosis_prediction", "sql": "SELECT MIN(T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1705, "question": "When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase.", "db_id": "thrombosis_prediction", "sql": "SELECT laboratory.`date` FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.ldh >= 500 ORDER BY patient.`first date` DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1706, "question": "When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase.", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1707, "question": "Please list the diagnosis of the patients whose total protein is lower than normal.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.diagnosis FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE laboratory.tp < 6.0", "label": true, "error_types": [] }, { "id": 1708, "question": "What is the examination date of the patient whose albumin is the highest in the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT examination.`examination date` FROM laboratory INNER JOIN examination ON laboratory.id = examination.id WHERE laboratory.alb > 3.5 AND laboratory.alb < 5.5 ORDER BY laboratory.alb DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1709, "question": "What is the examination date of the patient whose albumin is the highest in the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT Date FROM Laboratory WHERE ALB BETWEEN 3.5 AND 5.5 ORDER BY ALB DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1710, "question": "What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT examination.`acl igg` FROM laboratory INNER JOIN examination ON laboratory.id = examination.id INNER JOIN patient ON examination.id = patient.id WHERE patient.sex = 'F' AND laboratory.ua > 6.50 ORDER BY examination.`acl igg` DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1711, "question": "What is the anti Cardiolipin antibody concentration of the female patient with the highest uric acid level in the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT T2.`aCL IgG`, T2.`aCL IgM`, T2.`aCL IgA` 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 T1.SEX = 'F' AND T3.UA > 6.50 ORDER BY T3.UA DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1712, "question": "What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?", "db_id": "thrombosis_prediction", "sql": "select max(examination.ana) from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where laboratory.cre < 1.5 and patient.diagnosis = 'Normal'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1713, "question": "What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?", "db_id": "thrombosis_prediction", "sql": "SELECT MAX(T1.ANA) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE < 1.5", "label": true, "error_types": [] }, { "id": 1714, "question": "Please list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest.", "db_id": "thrombosis_prediction", "sql": "SELECT T1.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", "label": true, "error_types": [] }, { "id": 1715, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT count(patient.id) FROM patient INNER JOIN laboratory ON patient.id = laboratory.id INNER JOIN examination ON patient.id = examination.id WHERE laboratory.`t-bil` > 2 AND examination.`ana pattern` LIKE '%P%'", "label": true, "error_types": [] }, { "id": 1716, "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?", "db_id": "thrombosis_prediction", "sql": "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 T1.ID = T3.ID WHERE T2.`T-BIL` >= 2.0 AND T3.`ANA Pattern` LIKE '%P%'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1717, "question": "What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?", "db_id": "thrombosis_prediction", "sql": "SELECT examination.ana FROM laboratory INNER JOIN examination ON laboratory.id = examination.id WHERE laboratory.`t-bil` < 2.0 ORDER BY examination.ana DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1718, "question": "For the patients whose total cholesterol is higher than normal, how many of them have a negative measure of degree of coagulation?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(T1.ID) FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.`T-CHO` >= 250 AND T2.KCT = '-'", "label": true, "error_types": [] }, { "id": 1719, "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?", "db_id": "thrombosis_prediction", "sql": "SELECT count(examination.id) FROM examination INNER JOIN laboratory ON examination.id = laboratory.id WHERE examination.`ana pattern` = 'P' AND laboratory.`t-cho` < 250", "label": true, "error_types": [] }, { "id": 1720, "question": "Among the patients with the normal level of triglyceride, how many of them have other symptoms observed?", "db_id": "thrombosis_prediction", "sql": "select count(patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on patient.id = laboratory.id where laboratory.tg < 200 and examination.symptoms is not null", "label": true, "error_types": [] }, { "id": 1721, "question": "Among the patients with the normal level of triglyceride, how many of them have other symptoms observed?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(DISTINCT T1.ID) FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.TG < 200 AND T2.Symptoms IS NOT NULL", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1722, "question": "When is the birthday of the oldest patient whose blood glucose is abnormal?", "db_id": "thrombosis_prediction", "sql": "select min(patient.birthday) from patient inner join laboratory on patient.id = laboratory.id where laboratory.glu > 180", "label": true, "error_types": [] }, { "id": 1723, "question": "Among the patients with a normal blood glucose, how many of them don't have thrombosis?", "db_id": "thrombosis_prediction", "sql": "SELECT COUNT(T1.ID) FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.GLU < 180 AND T2.Thrombosis = 0", "label": true, "error_types": [] }, { "id": 1724, "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.", "db_id": "thrombosis_prediction", "sql": "select patient.id from patient inner join laboratory on patient.id = laboratory.id where laboratory.rbc < 3.5 and laboratory.rbc >= 6.0 and patient.admission = '-'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1725, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT patient.id FROM patient INNER JOIN laboratory ON patient.id = laboratory.id WHERE laboratory.rbc < 3.5 OR laboratory.rbc > 6.0 AND patient.admission = '-'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" } ] }, { "id": 1726, "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.", "db_id": "thrombosis_prediction", "sql": "SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND (T2.RBC <= 3.5 OR T2.RBC >= 6.0)", "label": true, "error_types": [] }, { "id": 1727, "question": "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.", "db_id": "thrombosis_prediction", "sql": "select distinct laboratory.plt from patient inner join examination on patient.id = examination.id inner join laboratory on examination.id = laboratory.id where patient.diagnosis = 'MCTD' and laboratory.plt > 100 and laboratory.plt < 400", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Other Errors", "sub_error_type": "DISTINCT" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 1728, "question": "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.", "db_id": "thrombosis_prediction", "sql": "SELECT laboratory.plt, patient.diagnosis FROM laboratory INNER JOIN patient ON laboratory.id = patient.id WHERE patient.diagnosis = 'MCTD' AND (laboratory.plt > 100 AND laboratory.plt < 400)", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1729, "question": "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.", "db_id": "thrombosis_prediction", "sql": "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", "label": true, "error_types": [] }, { "id": 1730, "question": "For the male patients that have a normal prothrombin time, what is their average prothrombin time?", "db_id": "thrombosis_prediction", "sql": "select cast(sum(laboratory.pt) as real) / count(laboratory.id) from patient inner join laboratory on patient.id = laboratory.id where patient.sex = 'M' and laboratory.pt < 14", "label": true, "error_types": [] }, { "id": 1731, "question": "How many patients with severe thrombosis have a normal prothrombin time?", "db_id": "thrombosis_prediction", "sql": "select count(distinct patient.id) from patient inner join examination on patient.id = examination.id inner join laboratory on patient.id = laboratory.id where examination.thrombosis = 2 or examination.thrombosis = 1 and laboratory.pt < 14", "label": true, "error_types": [] }, { "id": 1732, "question": "What's Angela Sanders's major?", "db_id": "student_club", "sql": "SELECT major.major_name FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE member.first_name = 'Angela' AND member.last_name = 'Sanders'", "label": true, "error_types": [] }, { "id": 1733, "question": "How many students in the Student_Club are from the College of Engineering?", "db_id": "student_club", "sql": "SELECT count(*) FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.college = 'College of Engineering'", "label": true, "error_types": [] }, { "id": 1734, "question": "Please list the full names of the students in the Student_Club that come from the Art and Design Department.", "db_id": "student_club", "sql": "select member.first_name , member.last_name from major inner join member on major.major_id = member.link_to_major where major.department = 'Art and Design Department'", "label": true, "error_types": [] }, { "id": 1735, "question": "Please list the full names of the students in the Student_Club that come from the Art and Design Department.", "db_id": "student_club", "sql": "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'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1736, "question": "How many students of the Student_Club have attended the event \"Women's Soccer\"?", "db_id": "student_club", "sql": "select count(member.first_name) from event inner join attendance on event.event_id = attendance.link_to_event inner join member on member.member_id = attendance.link_to_member where event.event_name = 'Women''s Soccer'", "label": true, "error_types": [] }, { "id": 1737, "question": "Please list the phone numbers of the students from the Student_Club that has attended the event \"Women's Soccer\".", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1738, "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?", "db_id": "student_club", "sql": "select count(member.member_id) from event inner join attendance on event.event_id = attendance.link_to_event inner join member on attendance.link_to_member = member.member_id where event.event_name = 'Women''s Soccer' and member.t_shirt_size = 'Medium'", "label": true, "error_types": [] }, { "id": 1739, "question": "Which college is the vice president of the Student_Club from?", "db_id": "student_club", "sql": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'Vice President'", "label": true, "error_types": [] }, { "id": 1740, "question": "Please list the event names of all the events attended by Maya Mclean.", "db_id": "student_club", "sql": "SELECT event.event_name FROM attendance INNER JOIN event ON attendance.link_to_event = event.event_id INNER JOIN member ON attendance.link_to_member = member.member_id WHERE member.first_name = 'Maya' AND member.last_name = 'Mclean'", "label": true, "error_types": [] }, { "id": 1741, "question": "Please list the event names of all the events attended by Maya Mclean.", "db_id": "student_club", "sql": "SELECT T3.event_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 INNER JOIN zip_code AS T4 ON T1.zip = T4.zip_code WHERE T1.first_name = 'Maya' AND T4.city = 'Mclean'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1742, "question": "How many events of the Student_Club did Sacha Harrison attend in 2019?", "db_id": "student_club", "sql": "SELECT count(*) FROM attendance INNER JOIN member ON attendance.link_to_member = member.member_id INNER JOIN event ON attendance.link_to_event = event.event_id WHERE member.first_name = 'Sacha' AND member.last_name = 'Harrison' AND strftime('%Y', event.event_date) = '2019'", "label": true, "error_types": [] }, { "id": 1743, "question": "List all the names of events that had an attendance of over 20 students but were not fundraisers.", "db_id": "student_club", "sql": "select event_name from event where event_id > 20", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1744, "question": "List all the names of events that had an attendance of over 20 students but were not fundraisers.", "db_id": "student_club", "sql": "SELECT event.event_name FROM attendance INNER JOIN event ON attendance.link_to_event = event.event_id GROUP BY event.event_name HAVING count(event.event_id) > 20", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1745, "question": "List all the names of events that had an attendance of over 20 students but were not fundraisers.", "db_id": "student_club", "sql": "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(T1.event_id) > 20", "label": true, "error_types": [] }, { "id": 1746, "question": "What is the average attendance of meetings in 2020?", "db_id": "student_club", "sql": "SELECT CAST(COUNT(T1.event_id) AS REAL) / COUNT(DISTINCT T1.event_name) AS average_attendance FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.type = 'Meeting' AND STRFTIME('%Y', T1.event_date) = '2020'", "label": true, "error_types": [] }, { "id": 1747, "question": "What is the most expensive item that was spent in support of club events?", "db_id": "student_club", "sql": "SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1748, "question": "How many members of the Student_Club have majored Environmental Engineering?\n", "db_id": "student_club", "sql": "SELECT count(member.member_id) FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.major_name = 'Environmental Engineering'", "label": true, "error_types": [] }, { "id": 1749, "question": "List the full name of all the members of the Student_Club who attended the \"Laugh Out Loud\" event.", "db_id": "student_club", "sql": "select member.first_name , member.last_name from event inner join attendance on event.event_id = attendance.link_to_event inner join member on attendance.link_to_member = member.member_id where event.event_name = 'Laugh Out Loud'", "label": true, "error_types": [] }, { "id": 1750, "question": "List the last name of all the students who majored Law and Constitutional Studies. \n", "db_id": "student_club", "sql": "SELECT T2.last_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Law and Constitutional Studies'", "label": true, "error_types": [] }, { "id": 1751, "question": "What county did Sherri Ramsey grew up?", "db_id": "student_club", "sql": "SELECT zip_code.county FROM member INNER JOIN zip_code ON member.zip = zip_code.zip_code WHERE member.first_name = 'Sherri' AND member.last_name = 'Ramsey'", "label": true, "error_types": [] }, { "id": 1752, "question": "What college offers the major that Tyler Hewitt took?", "db_id": "student_club", "sql": "select major.college from member inner join major on member.link_to_major = major.major_id where member.first_name = 'Tyler' and member.last_name = 'Hewitt'", "label": true, "error_types": [] }, { "id": 1753, "question": "What is the amount of the funds that the Vice President received?", "db_id": "student_club", "sql": "SELECT income.amount FROM income INNER JOIN member ON income.link_to_member = member.member_id WHERE member.position = 'Vice President'", "label": true, "error_types": [] }, { "id": 1754, "question": "How much did the Student_Club members spend on food in September Meeting?", "db_id": "student_club", "sql": "SELECT sum(budget.spent) FROM budget INNER JOIN event ON budget.link_to_event = event.event_id INNER JOIN attendance ON event.event_id = attendance.link_to_event INNER JOIN member ON attendance.link_to_member = member.member_id WHERE event.event_name = 'September Meeting' AND budget.category = 'Food' AND member.position = 'Member'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1755, "question": "How much did the Student_Club members spend on food in September Meeting?", "db_id": "student_club", "sql": "SELECT SUM(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'", "label": true, "error_types": [] }, { "id": 1756, "question": "What city and state did the President of the Student_Club grow up?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1757, "question": "List the full name of the Student_Club members that grew up in Illinois state.", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1758, "question": "How much did the Student_Club members spend on advertisement in September Meeting?", "db_id": "student_club", "sql": "select budget.spent from event inner join budget on event.event_id = budget.link_to_event where event.event_name like 'September Meeting%' and budget.category = 'Advertisement'", "label": true, "error_types": [] }, { "id": 1759, "question": "How much did the Student_Club members spend on advertisement in September Meeting?", "db_id": "student_club", "sql": "SELECT sum(CASE WHEN budget.category = 'Advertisement' THEN budget.spent ELSE 0 END) FROM budget INNER JOIN event ON budget.link_to_event = event.event_id INNER JOIN attendance ON event.event_id = attendance.link_to_event INNER JOIN member ON attendance.link_to_member = member.member_id WHERE event.event_name = 'September Meeting' AND member.position = 'Member'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1760, "question": "What department offers the major that Pierce and Guidi took?", "db_id": "student_club", "sql": "select major.department from major inner join member on major.major_id = member.link_to_major where member.first_name = 'Pierce' and member.last_name = 'Guidi'", "label": false, "error_types": [ { "error_type": "Operator-Related Errors", "sub_error_type": "Logical Operator Mismatch" } ] }, { "id": 1761, "question": "What department offers the major that Pierce and Guidi took?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1762, "question": "What is the total budgeted amount for all category in \"October Speaker\" event?", "db_id": "student_club", "sql": "select sum(budget.amount) from event inner join budget on event.event_id = budget.link_to_event where event.event_name = 'October Speaker'", "label": true, "error_types": [] }, { "id": 1763, "question": "Calculate the total average cost that Elijah Allen spent in the events on September and October.", "db_id": "student_club", "sql": "select sum(expense.cost) / count(expense.expense_id) from member inner join expense on member.member_id = expense.link_to_member where member.first_name = 'Elijah' and member.last_name = 'Allen' and strftime('%Y' , expense.expense_date) = '9' and strftime('%m' , expense.expense_date) = '10'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1764, "question": "Calculate the total average cost that Elijah Allen spent in the events on September and October.", "db_id": "student_club", "sql": "SELECT avg(expense.cost) FROM expense INNER JOIN member ON expense.link_to_member = member.member_id WHERE member.first_name = 'Elijah' AND member.last_name = 'Allen' AND strftime('%m', expense.expense_date) IN ('9', '10')", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1765, "question": "Calculate the total average cost that Elijah Allen spent in the events on September and October.", "db_id": "student_club", "sql": "SELECT AVG(T2.cost) FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Elijah' AND T1.last_name = 'Allen' AND (STRFTIME('%m', T2.expense_date) = '09' OR STRFTIME('%m', T2.expense_date) = '10')", "label": true, "error_types": [] }, { "id": 1766, "question": "Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020.", "db_id": "student_club", "sql": "select sum(case when strftime('%Y' , event.event_date) = '2019' then budget.amount else 0 end) - sum(case when strftime('%Y' , event.event_date) = '2020' then budget.amount else 0 end) from budget inner join event on budget.link_to_event = event.event_id", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 1767, "question": "Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020.", "db_id": "student_club", "sql": "SELECT SUM(CASE WHEN STRFTIME('%Y', T1.event_date) = '2019' THEN T2.spent ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.event_date) = '2020' THEN T2.spent ELSE 0 END) AS difference FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event", "label": true, "error_types": [] }, { "id": 1768, "question": "Give the location for \"Spring Budget Review\".", "db_id": "student_club", "sql": "select location from event where event_name = 'Spring Budget Review'", "label": true, "error_types": [] }, { "id": 1769, "question": "What was the cost for the \"Posters\" on 2019/9/4?", "db_id": "student_club", "sql": "select cost from expense where expense_description = 'Posters' and expense_date = '2019-09-04'", "label": true, "error_types": [] }, { "id": 1770, "question": "With the biggest budget for the \"Food\", what was the remaining of it?", "db_id": "student_club", "sql": "select remaining from budget where category = 'Food' and amount = ( select max(amount) from budget where category = 'Food' )", "label": true, "error_types": [] }, { "id": 1771, "question": "What was the notes of the fundraising on 2019/9/14?", "db_id": "student_club", "sql": "select notes from income where source = 'Fundraising' and date_received = '2019-09-14'", "label": true, "error_types": [] }, { "id": 1772, "question": "How many majors are there in \"College of Humanities and Social Sciences\"?", "db_id": "student_club", "sql": "SELECT COUNT(major_id) FROM major WHERE college = 'College of Humanities and Social Sciences'", "label": true, "error_types": [] }, { "id": 1773, "question": "Tell the phone number of \"Carlo Jacobs\".", "db_id": "student_club", "sql": "SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'", "label": true, "error_types": [] }, { "id": 1774, "question": "Tell the hometown county for \"Adela O'Gallagher\".", "db_id": "student_club", "sql": "select distinct zip_code.county from member inner join zip_code on member.zip = zip_code.zip_code where member.first_name = 'Adela' and member.last_name = 'O''Gallagher'", "label": true, "error_types": [] }, { "id": 1775, "question": "For all the budgets for \"November Meeting\", how many of them had exceeded the budget?", "db_id": "student_club", "sql": "select count(event.event_id) from event inner join budget on event.event_id = budget.link_to_event inner join expense on expense.link_to_budget = budget.budget_id where event.event_name = 'November Meeting' and budget.remaining < 0", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" } ] }, { "id": 1776, "question": "For all the budgets for \"November Meeting\", how many of them had exceeded the budget?", "db_id": "student_club", "sql": "SELECT COUNT(*) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'November Meeting' AND T2.remaining < 0", "label": true, "error_types": [] }, { "id": 1777, "question": "Provide the total number of the budget amount for \"September Speaker\" event.", "db_id": "student_club", "sql": "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 = 'September Speaker'", "label": true, "error_types": [] }, { "id": 1778, "question": "What is the status of the event which bought \"Post Cards, Posters\" on 2019/8/20?", "db_id": "student_club", "sql": "select distinct event.status from expense inner join budget on expense.link_to_budget = budget.link_to_event inner join event on event.event_id = budget.link_to_event where expense.expense_description = 'Post Cards , Posters' and expense.expense_date = '2019-8-20'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1779, "question": "What is the status of the event which bought \"Post Cards, Posters\" on 2019/8/20?", "db_id": "student_club", "sql": "SELECT T2.event_status FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Post Cards, Posters' AND T1.expense_date = '2019-08-20'", "label": true, "error_types": [] }, { "id": 1780, "question": "What was Brent Thomason's major?", "db_id": "student_club", "sql": "select major.major_name from member inner join major on member.link_to_major = major.major_id where member.first_name = 'Brent' and member.last_name = 'Thomason'", "label": true, "error_types": [] }, { "id": 1781, "question": "For all the club members from \"Business\" major, how many of them wear medium size t-shirt?", "db_id": "student_club", "sql": "select count(*) from major inner join member on major.major_id = member.link_to_major where major.major_name = 'Human Development and Family Studies' and member.t_shirt_size = 'Large'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" } ] }, { "id": 1782, "question": "What's Christof Nielson's zip code type?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1783, "question": "State the major name for the Vice President of the club.", "db_id": "student_club", "sql": "select major.major_name from member inner join major on member.link_to_major = major.major_id where member.position = 'Vice President'", "label": true, "error_types": [] }, { "id": 1784, "question": "Where is the hometown state for \"Sacha Harrison\"?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1785, "question": "Which department was the President of the club in?", "db_id": "student_club", "sql": "SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'", "label": true, "error_types": [] }, { "id": 1786, "question": "State the date Connor Hilton paid his/her dues.", "db_id": "student_club", "sql": "select income.date_received from member inner join income on member.member_id = income.link_to_member where member.first_name = 'Connor' and member.last_name = 'Hilton'", "label": true, "error_types": [] }, { "id": 1787, "question": "Who was the first one paid his/her dues? Tell the full name.", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM income INNER JOIN member ON income.link_to_member = member.member_id WHERE income.source = 'Dues' ORDER BY income.date_received LIMIT 1", "label": true, "error_types": [] }, { "id": 1788, "question": "What percentage was the budget for Parking to the total budget for the \"November Speaker\"?", "db_id": "student_club", "sql": "select cast(sum(case when budget.category = 'Parking' then budget.amount else 0 end) as real) * 100 / sum(budget.amount) from budget inner join event on budget.link_to_event = event.event_id", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1789, "question": "What percentage was the budget for Parking to the total budget for the \"November Speaker\"?", "db_id": "student_club", "sql": "SELECT CAST(SUM(CASE WHEN T2.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.link_to_event WHERE T1.event_name = 'November Speaker'", "label": true, "error_types": [] }, { "id": 1790, "question": "What is the total cost of the pizzas for all the events?", "db_id": "student_club", "sql": "SELECT sum(expense.cost) FROM expense INNER JOIN member ON expense.link_to_member = member.member_id WHERE expense.expense_description = 'Pizza'", "label": true, "error_types": [] }, { "id": 1791, "question": "How many cities are there in Orange County, Virginia?", "db_id": "student_club", "sql": "SELECT count(city) FROM zip_code WHERE state = 'Virginia' AND county = 'Orange County'", "label": true, "error_types": [] }, { "id": 1792, "question": "List all of the College of Humanities and Social Sciences' departments.", "db_id": "student_club", "sql": "select department from major where college = 'College of Humanities and Social Sciences'", "label": true, "error_types": [] }, { "id": 1793, "question": "Where is Amy Firth's hometown?", "db_id": "student_club", "sql": "select zip_code.city , zip_code.county , zip_code.state from member inner join zip_code on member.zip = zip_code.zip_code where member.first_name = 'Amy' and member.last_name = 'Firth'", "label": true, "error_types": [] }, { "id": 1794, "question": "Which college do most of the members go to?", "db_id": "student_club", "sql": "SELECT major.college FROM member INNER JOIN major ON member.link_to_major = major.major_id GROUP BY major.college ORDER BY count(major.college) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1795, "question": "What does the person with the phone number \"809-555-3360\" major in?", "db_id": "student_club", "sql": "SELECT major.major_name FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE member.phone = '809-555-3360'", "label": true, "error_types": [] }, { "id": 1796, "question": "Which event has the highest budget amount?", "db_id": "student_club", "sql": "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", "label": true, "error_types": [] }, { "id": 1797, "question": "How many members attended the \"Women's Soccer\" event?", "db_id": "student_club", "sql": "select count(member.member_id) from event inner join attendance on event.event_id = attendance.link_to_event inner join member on attendance.link_to_member = member.member_id where event.event_name = 'Women''s Soccer'", "label": true, "error_types": [] }, { "id": 1798, "question": "When did the member, Casey Mason, received the income?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1799, "question": "How many of the members' hometowns are from Maryland state?", "db_id": "student_club", "sql": "select count(zip_code.zip_code) from member inner join zip_code on member.zip = zip_code.zip_code where zip_code.state = 'Maryland'", "label": true, "error_types": [] }, { "id": 1800, "question": "How many events did the member with the phone number \"954-555-6240\" attend?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1801, "question": "List all the members of the \"School of Applied Sciences, Technology and Education\" department.", "db_id": "student_club", "sql": "select member.first_name , member.last_name from major inner join member on major.major_id = member.link_to_major where major.department = 'School of Applied Sciences , Technology and Education'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1802, "question": "List all the members of the \"School of Applied Sciences, Technology and Education\" department.", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.department = 'School of Applied Sciences, Technology and Education'", "label": true, "error_types": [] }, { "id": 1803, "question": "Among all the closed events, which event has the highest spend-to-budget ratio?", "db_id": "student_club", "sql": "select event.event_name from budget inner join event on budget.link_to_event = event.event_id where event.status = 'Closed' order by cast(budget.spent as real) / budget.amount desc limit 1", "label": true, "error_types": [] }, { "id": 1804, "question": "How many student have the position of president?", "db_id": "student_club", "sql": "SELECT count(*) FROM member WHERE POSITION = 'President'", "label": true, "error_types": [] }, { "id": 1805, "question": "What is the highest amount of budget spend for an event?", "db_id": "student_club", "sql": "SELECT MAX(T2.spent) FROM budget AS T2", "label": true, "error_types": [] }, { "id": 1806, "question": "How many meeting events were held in 2020?", "db_id": "student_club", "sql": "select count(event_id) from event where strftime('%Y' , event_date) = '2020' and type = 'Meeting'", "label": true, "error_types": [] }, { "id": 1807, "question": "What is the total amount of money spent for food?", "db_id": "student_club", "sql": "select sum(spent) from budget where category = 'Food'", "label": true, "error_types": [] }, { "id": 1808, "question": "List the name of students that have attended more than 7 events.", "db_id": "student_club", "sql": "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 T1.first_name, T1.last_name HAVING COUNT(T2.link_to_event) > 7", "label": true, "error_types": [] }, { "id": 1809, "question": "Among the students majored in interior design, who have attended the Community Theater event?", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM attendance INNER JOIN event ON attendance.link_to_event = event.event_id INNER JOIN member ON attendance.link_to_member = member.member_id INNER JOIN major ON member.link_to_major = major.major_id WHERE event.event_name = 'Community Theater' AND major.major_name = 'Interior Design'", "label": true, "error_types": [] }, { "id": 1810, "question": "Among the students majored in interior design, who have attended the Community Theater event?", "db_id": "student_club", "sql": "SELECT T2.member_id FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T4 ON T2.member_id = T4.link_to_member INNER JOIN event AS T3 ON T3.event_id = T4.link_to_event WHERE T1.major_name = 'Interior Design' AND T3.event_name = 'Community Theater'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1811, "question": "State the name of students from Georgetown, South Carolina.", "db_id": "student_club", "sql": "SELECT T2.first_name, T2.last_name FROM zip_code AS T1 INNER JOIN member AS T2 ON T1.zip_code = T2.zip WHERE T1.city = 'Georgetown' AND T1.state = 'South Carolina'", "label": true, "error_types": [] }, { "id": 1812, "question": "How many income generated by Grant Gilmour?", "db_id": "student_club", "sql": "select count(income.income_id) from member inner join income on member.member_id = income.link_to_member where member.first_name = 'Grant' and member.last_name = 'Gilmour'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1813, "question": "How many income generated by Grant Gilmour?", "db_id": "student_club", "sql": "SELECT SUM(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'", "label": true, "error_types": [] }, { "id": 1814, "question": "Which student was able to generate income more than $40?", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM income INNER JOIN member ON income.link_to_member = member.member_id WHERE income.amount > 40", "label": true, "error_types": [] }, { "id": 1815, "question": "What is the total expense for the Yearly Kickoff?", "db_id": "student_club", "sql": "select sum(expense.cost) from event inner join expense on event.event_id = expense.expense_id where event.event_name = 'Yearly Kickoff'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1816, "question": "What is the total expense for the Yearly Kickoff?", "db_id": "student_club", "sql": "SELECT sum(expense.cost) FROM expense INNER JOIN attendance ON expense.link_to_member = attendance.link_to_member INNER JOIN event ON attendance.link_to_event = event.event_id WHERE event.event_name = 'Yearly Kickoff'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1817, "question": "What is the total expense for the Yearly Kickoff?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1818, "question": "Which student has been entrusted to manage the budget for the Yearly Kickoff?", "db_id": "student_club", "sql": "select member.first_name , member.last_name from member inner join budget on member.member_id = budget.link_to_event inner join event on event.event_id = budget.link_to_event where event.event_name = 'Yearly Kickoff'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1819, "question": "Which student has been entrusted to manage the budget for the Yearly Kickoff?", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM event INNER JOIN attendance ON event.event_id = attendance.link_to_event INNER JOIN member ON attendance.link_to_member = member.member_id WHERE event.event_name = 'Yearly Kickoff'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1820, "question": "Which student has been entrusted to manage the budget for the Yearly Kickoff?", "db_id": "student_club", "sql": "SELECT T5.member_id 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 T5 ON T3.link_to_member = T5.member_id WHERE T1.event_name = 'Yearly Kickoff'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1821, "question": "Which event has the lowest cost?", "db_id": "student_club", "sql": "select event.event_name from expense inner join event on expense.expense_id = event.event_id order by expense.cost asc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1822, "question": "Which event has the lowest cost?", "db_id": "student_club", "sql": "SELECT T3.event_name FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget INNER JOIN event AS T3 ON T1.link_to_event = T3.event_id ORDER BY T2.cost ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1823, "question": "Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event?", "db_id": "student_club", "sql": "SELECT cast(sum(CASE WHEN event.event_name = 'Yearly Kickoff' THEN expense.cost ELSE 0 END) AS REAL) * 100 / sum(expense.cost) FROM expense INNER JOIN budget ON expense.link_to_budget = budget.budget_id INNER JOIN event ON budget.link_to_event = event.event_id", "label": true, "error_types": [] }, { "id": 1824, "question": "Indicate the top source of funds received in September 2019 based on their amount.", "db_id": "student_club", "sql": "select source from income where date_received >= '2019-09-01' and date_received < '2019-09-30' order by amount desc limit 1", "label": true, "error_types": [] }, { "id": 1825, "question": "Provide the full name and email address of the Student_Club's Secretary.", "db_id": "student_club", "sql": "SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'", "label": true, "error_types": [] }, { "id": 1826, "question": "How many members of the Student_Club have major in 'Physics Teaching'?", "db_id": "student_club", "sql": "SELECT COUNT(*) FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Physics Teaching'", "label": true, "error_types": [] }, { "id": 1827, "question": "How many members did attend the event 'Community Theater' in 2019?", "db_id": "student_club", "sql": "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 STRFTIME('%Y', T1.event_date) = '2019'", "label": true, "error_types": [] }, { "id": 1828, "question": "Provide the number of events attended by Luisa Guidi. What is her major?", "db_id": "student_club", "sql": "SELECT COUNT(T1.link_to_event), T3.major_name FROM attendance AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN major AS T3 ON T2.link_to_major = T3.major_id WHERE T2.first_name = 'Luisa' AND T2.last_name = 'Guidi'", "label": true, "error_types": [] }, { "id": 1829, "question": "On average, how much did the Student_Club spend on food for the typical event in the past?", "db_id": "student_club", "sql": "SELECT sum(budget.spent) / count(event.event_id) FROM budget INNER JOIN event ON budget.link_to_event = event.event_id WHERE budget.event_status = 'Closed' AND budget.category = 'Food'", "label": true, "error_types": [] }, { "id": 1830, "question": "Name the event with the highest amount spent on advertisement.", "db_id": "student_club", "sql": "SELECT event.event_name FROM budget INNER JOIN event ON budget.link_to_event = event.event_id WHERE budget.category = 'Advertisement' ORDER BY budget.spent DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1831, "question": "Among all events hold by the Student_Club in 2019, find the percentage share of events related to 'Community Service'", "db_id": "student_club", "sql": "SELECT CAST(SUM(CASE WHEN type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(event_id) AS percentage FROM event WHERE event_date LIKE '2019%'", "label": true, "error_types": [] }, { "id": 1832, "question": "Indicate the cost of posters for 'September Speaker' event.", "db_id": "student_club", "sql": "select expense.cost from expense inner join event on expense.expense_id = event.event_id where event.event_name = 'September Speaker' and expense.expense_description = 'Posters'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1833, "question": "Indicate the cost of posters for 'September Speaker' event.", "db_id": "student_club", "sql": "SELECT expense.cost FROM expense INNER JOIN attendance ON expense.link_to_member = attendance.link_to_member INNER JOIN event ON attendance.link_to_event = event.event_id WHERE event.event_name = 'September Speaker' AND expense.expense_description = 'Posters'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1834, "question": "Indicate the cost of posters for 'September Speaker' event.", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1835, "question": "What is the most popular size of t-shirt ordered by the club members?", "db_id": "student_club", "sql": "SELECT t_shirt_size FROM member GROUP BY t_shirt_size ORDER BY COUNT(t_shirt_size) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1836, "question": "Indicate the name of the closed event whose cost has exceeded the budget the most.", "db_id": "student_club", "sql": "SELECT event.event_name FROM budget INNER JOIN event ON budget.link_to_event = event.event_id WHERE event.status = 'Closed' ORDER BY budget.remaining LIMIT 1", "label": true, "error_types": [] }, { "id": 1837, "question": "Identify the type of expenses and their total value approved for 'October Meeting' event.", "db_id": "student_club", "sql": "SELECT expense.expense_description, sum(expense.cost) FROM expense INNER JOIN attendance ON expense.link_to_member = attendance.link_to_member INNER JOIN event ON attendance.link_to_event = event.event_id WHERE event.event_name = 'October Meeting' AND expense.approved = 'true' GROUP BY expense.expense_description", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" } ] }, { "id": 1838, "question": "Identify the type of expenses and their total value approved for 'October Meeting' event.", "db_id": "student_club", "sql": "SELECT T3.event_name, SUM(T2.cost) FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget INNER JOIN event AS T3 ON T1.link_to_event = T3.event_id WHERE T3.event_name = 'October Meeting' AND T2.approved = 'true'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1839, "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.", "db_id": "student_club", "sql": "select budget.amount , budget.category from event inner join budget on event.event_id = budget.link_to_event where event.event_name = 'April Speaker' order by budget.amount asc", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1840, "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.", "db_id": "student_club", "sql": "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 = 'April Speaker' ORDER BY T2.amount ASC", "label": true, "error_types": [] }, { "id": 1841, "question": "Among the budgets for Food, which one has the highest budgeted amount?", "db_id": "student_club", "sql": "SELECT budget_id FROM budget WHERE category = 'Food' ORDER BY amount DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1842, "question": "Among the budgets for Advertising, list out top three which have the most budgeted amount?", "db_id": "student_club", "sql": "SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3", "label": true, "error_types": [] }, { "id": 1843, "question": "Calculate the total cost spent for Parking in the list.", "db_id": "student_club", "sql": "select sum(cost) from expense where expense_description = 'Parking'", "label": true, "error_types": [] }, { "id": 1844, "question": "Mention the total expense used on 8/20/2019.", "db_id": "student_club", "sql": "SELECT sum(cost) FROM expense WHERE expense_date = '2019-08-20'", "label": true, "error_types": [] }, { "id": 1845, "question": "List out the full name and total cost that member id \"rec4BLdZHS2Blfp4v\" incurred?", "db_id": "student_club", "sql": "select member.first_name , member.last_name , expense.cost from member inner join expense on member.member_id = expense.link_to_member where member.member_id = 'rec4BLdZHS2Blfp4v'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1846, "question": "List out the full name and total cost that member id \"rec4BLdZHS2Blfp4v\" incurred?", "db_id": "student_club", "sql": "SELECT T2.first_name, T2.last_name, SUM(T1.cost) AS total_cost FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.link_to_member = 'rec4BLdZHS2Blfp4v' GROUP BY T2.first_name, T2.last_name", "label": true, "error_types": [] }, { "id": 1847, "question": "State what kind of expenses that Sacha Harrison incurred?", "db_id": "student_club", "sql": "select expense.expense_description from member inner join expense on member.member_id = expense.link_to_member where member.first_name = 'Sacha' and member.last_name = 'Harrison'", "label": true, "error_types": [] }, { "id": 1848, "question": "What kind of expenses incurred by members who have X-Large in size of tee shirt?", "db_id": "student_club", "sql": "select expense.expense_description from member inner join expense on member.member_id = expense.link_to_member where member.t_shirt_size = 'X-Large'", "label": true, "error_types": [] }, { "id": 1849, "question": "Mention the zip code of member who incurred less than 50USD.", "db_id": "student_club", "sql": "SELECT T2.zip FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.cost < 50", "label": true, "error_types": [] }, { "id": 1850, "question": "State the name of major that Phillip Cullen has joined.", "db_id": "student_club", "sql": "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 = 'Phillip'", "label": true, "error_types": [] }, { "id": 1851, "question": "List out the position of members who joined major of Business.", "db_id": "student_club", "sql": "select member.position from major inner join member on major.major_id = member.link_to_major where major.major_name = 'Business'", "label": true, "error_types": [] }, { "id": 1852, "question": "How many members of Business have the Medium size of tee shirt?", "db_id": "student_club", "sql": "SELECT COUNT(*) 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'", "label": true, "error_types": [] }, { "id": 1853, "question": "List out the type of events which have remaining budget more than 30 USD.", "db_id": "student_club", "sql": "select distinct event.type from event inner join budget on event.type = budget.link_to_event where budget.remaining > 30", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1854, "question": "List out the type of events which have remaining budget more than 30 USD.", "db_id": "student_club", "sql": "SELECT DISTINCT event.type FROM budget INNER JOIN event ON budget.link_to_event = event.event_id WHERE budget.remaining > 30", "label": true, "error_types": [] }, { "id": 1855, "question": "Mention the category of events which were held at MU 215.", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1856, "question": "What is the category of event which was taken place in 2020-03-24T12:00:00?", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1857, "question": "State the name of major that Vice President has joined.", "db_id": "student_club", "sql": "SELECT DISTINCT major.major_name FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE member.position = 'Vice President'", "label": true, "error_types": [] }, { "id": 1858, "question": "Calculate the percentage of members who are major Business in the list?", "db_id": "student_club", "sql": "select cast(sum(case when major.major_name = 'Mathematics' then 1 else 0 end) as real) * 100 / count(major.major_id) from major inner join member on major.major_id = member.link_to_major", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1859, "question": "Calculate the percentage of members who are major Business in the list?", "db_id": "student_club", "sql": "SELECT cast(count(CASE WHEN member.position = 'Member' THEN 1 ELSE NULL END) AS REAL) * 100 / count(member.member_id) FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.major_name = 'Mathematics'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1860, "question": "State the category of events were held at MU 215.", "db_id": "student_club", "sql": "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'", "label": true, "error_types": [] }, { "id": 1861, "question": "How many income are received with an amount of 50?", "db_id": "student_club", "sql": "SELECT COUNT(*) FROM income WHERE amount = 50", "label": true, "error_types": [] }, { "id": 1862, "question": "Among the members, how many of them have an extra large t-shirt size?", "db_id": "student_club", "sql": "SELECT count(member_id) FROM member WHERE t_shirt_size = 'X-Large' AND POSITION = 'Member'", "label": true, "error_types": [] }, { "id": 1863, "question": "In the College of Agriculture and Applied Sciences, how many majors are under the department of School of Applied Sciences, Technology and Education?", "db_id": "student_club", "sql": "select count(major_id) from major where college = 'College of Agriculture and Applied Sciences' and department = 'School of Applied Sciences , Technology and Education'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1864, "question": "In the College of Agriculture and Applied Sciences, how many majors are under the department of School of Applied Sciences, Technology and Education?", "db_id": "student_club", "sql": "SELECT COUNT(*) FROM major WHERE college = 'College of Agriculture and Applied Sciences' AND department = 'School of Applied Sciences, Technology and Education'", "label": true, "error_types": [] }, { "id": 1865, "question": "List the last name of members with a major in environmental engineering and include its department and college name.", "db_id": "student_club", "sql": "SELECT member.last_name, major.department, major.college FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.major_name = 'Environmental Engineering'", "label": true, "error_types": [] }, { "id": 1866, "question": "List the city and state of members enrolled under electrical and computer engineering department.", "db_id": "student_club", "sql": "select zip_code.city , zip_code.state from major inner join member on major.major_id = member.link_to_major inner join zip_code on member.zip = zip_code.zip_code where major.department = 'Electrical and Computer Engineering Department' and member.position = 'Member'", "label": true, "error_types": [] }, { "id": 1867, "question": "List the city and state of members enrolled under electrical and computer engineering department.", "db_id": "student_club", "sql": "SELECT zip_code.city, zip_code.state FROM member INNER JOIN zip_code ON member.zip = zip_code.zip_code INNER JOIN major ON member.link_to_major = major.major_id WHERE major.department = 'Electrical and Computer Engineering' AND member.position = 'Member'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1868, "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.?", "db_id": "student_club", "sql": "select event.event_name from event inner join attendance on event.event_id = attendance.link_to_event inner join member on attendance.link_to_member = member.member_id where member.position = 'Vice President' and event.location = '900 E. Washington St.' and event.type = 'Social'", "label": true, "error_types": [] }, { "id": 1869, "question": "What is the last name and position of the student that bought pizza on 09/10/2019?", "db_id": "student_club", "sql": "SELECT T2.last_name, T2.position FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.expense_description = 'Pizza' AND T1.expense_date = '2019-09-10'", "label": true, "error_types": [] }, { "id": 1870, "question": "List the last name of the members of the club that attended the women's soccer event.", "db_id": "student_club", "sql": "SELECT member.last_name FROM event INNER JOIN attendance ON event.event_id = attendance.link_to_event INNER JOIN member ON attendance.link_to_member = member.member_id WHERE event.event_name = 'Women''s Soccer' AND member.position = 'Member'", "label": true, "error_types": [] }, { "id": 1871, "question": "Among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the Student_Club?", "db_id": "student_club", "sql": "SELECT CAST(SUM(CASE WHEN T2.amount = 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.member_id) AS percentage 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'", "label": true, "error_types": [] }, { "id": 1872, "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?", "db_id": "student_club", "sql": "SELECT zip_code FROM zip_code WHERE TYPE = 'PO Box' AND county = 'San Juan Municipio' AND state = 'Puerto Rico'", "label": true, "error_types": [] }, { "id": 1873, "question": "List the names of closed event as \"game\" that was closed from 3/15/2019 to 3/20/2020.", "db_id": "student_club", "sql": "SELECT event_name FROM event WHERE status = 'Closed' AND TYPE = 'Game' AND event_date BETWEEN '2019-03-15' AND '2020-03-20'", "label": true, "error_types": [] }, { "id": 1874, "question": "Please provide links to events for members who have paid more than 50 dollar.", "db_id": "student_club", "sql": "select attendance.link_to_event from expense inner join attendance on expense.link_to_member = attendance.link_to_member inner join event on attendance.link_to_event = event.event_id where expense.cost > 50", "label": true, "error_types": [] }, { "id": 1875, "question": "Please provide links to events for members who have paid more than 50 dollar.", "db_id": "student_club", "sql": "SELECT DISTINCT T1.link_to_event FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget WHERE T2.cost > 50", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1876, "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.", "db_id": "student_club", "sql": "select member.first_name , member.last_name , attendance.link_to_event from expense inner join attendance on expense.link_to_member = attendance.link_to_member inner join member on attendance.link_to_member = member.member_id where expense.approved = 'true' and expense.expense_date between '2019-01-10' and '2019-11-19'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1877, "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.", "db_id": "student_club", "sql": "SELECT expense.link_to_member, attendance.link_to_event FROM attendance INNER JOIN expense ON attendance.link_to_member = expense.link_to_member WHERE expense.approved = 'true' AND expense.expense_date BETWEEN '2019-01-10' AND '2019-11-19'", "label": true, "error_types": [] }, { "id": 1878, "question": "Please indicate the college of the person whose first name is Katy with the link to the major \"rec1N0upiVLy5esTO\".", "db_id": "student_club", "sql": "SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Katy' AND T1.link_to_major = 'rec1N0upiVLy5esTO'", "label": true, "error_types": [] }, { "id": 1879, "question": "Please list the phone numbers of the members who majored in business at the College of Agriculture and Applied Sciences.", "db_id": "student_club", "sql": "SELECT member.phone FROM member INNER JOIN major ON member.link_to_major = major.major_id WHERE major.college = 'College of Agriculture and Applied Sciences' AND major.major_name = 'Business'", "label": true, "error_types": [] }, { "id": 1880, "question": "List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019.", "db_id": "student_club", "sql": "SELECT member.email FROM expense INNER JOIN member ON expense.link_to_member = member.member_id WHERE expense.expense_date BETWEEN '2019-09-10' AND '2019-11-19' AND expense.cost > 20", "label": true, "error_types": [] }, { "id": 1881, "question": "How many members have education major in the College of Education & Human Services?", "db_id": "student_club", "sql": "select count(*) from member inner join major on member.link_to_major = major.major_id where major.college = 'College of Education & Human Services' and major.major_name = 'Education' and member.position = 'Member'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1882, "question": "What is the percentage of the events that went over budget?", "db_id": "student_club", "sql": "select cast(sum(case when budget.remaining < 0 then 1 else 0 end) as real) * 100 / count(event.event_id) from event inner join budget on event.event_id = budget.link_to_event", "label": true, "error_types": [] }, { "id": 1883, "question": "Give the event ID, location, and status of events conducted from November 2019 to March 2020.", "db_id": "student_club", "sql": "select event_id , location , status from event where event_date between '2019-11-01' and '2020-03-31'", "label": true, "error_types": [] }, { "id": 1884, "question": "List the expenses that spend more than fifty dollars on average.", "db_id": "student_club", "sql": "SELECT expense_description FROM expense GROUP BY expense_description HAVING SUM(cost) / COUNT(expense_id) > 50", "label": true, "error_types": [] }, { "id": 1885, "question": "Find the full name of members whose t-shirt size is extra large.", "db_id": "student_club", "sql": "SELECT first_name, last_name FROM member WHERE t_shirt_size = 'X-Large'", "label": true, "error_types": [] }, { "id": 1886, "question": "Calculate the percentage of zip codes that are PO boxes.", "db_id": "student_club", "sql": "SELECT CAST(SUM(CASE WHEN type = 'PO Box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code", "label": true, "error_types": [] }, { "id": 1887, "question": "List the name and location of events that underspend its budget.", "db_id": "student_club", "sql": "SELECT event.event_name, event.location FROM budget INNER JOIN event ON budget.link_to_event = event.event_id WHERE budget.remaining > 0", "label": true, "error_types": [] }, { "id": 1888, "question": "Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.", "db_id": "student_club", "sql": "select event.event_name , event.event_date from event inner join expense on event.event_date = expense.expense_date where expense.expense_description = 'Pizza' and expense.cost > 50 and expense.cost < 100", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1889, "question": "Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.", "db_id": "student_club", "sql": "SELECT event.event_name, event.event_date FROM event INNER JOIN attendance ON event.event_id = attendance.link_to_event INNER JOIN expense ON attendance.link_to_member = expense.link_to_member WHERE expense.cost BETWEEN 50 AND 100 AND expense.expense_description = 'Pizza'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1890, "question": "Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.", "db_id": "student_club", "sql": "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 BETWEEN 50 AND 100", "label": true, "error_types": [] }, { "id": 1891, "question": "What is the name and major of members who had to spend more than a hundred dollars on an expense?", "db_id": "student_club", "sql": "select member.first_name , member.last_name , major.major_name from member inner join expense on member.member_id = expense.link_to_member inner join major on member.link_to_major = major.major_id where expense.cost > 100", "label": true, "error_types": [] }, { "id": 1892, "question": "Among the members who incurred expenses in more than one event, who paid the most amount?", "db_id": "student_club", "sql": "select member.first_name , member.last_name from event inner join attendance on event.event_id = attendance.link_to_event inner join member on attendance.link_to_member = member.member_id group by member.first_name , member.last_name order by count(attendance.link_to_member) desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1893, "question": "Among the members who incurred expenses in more than one event, who paid the most amount?", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name FROM expense INNER JOIN member ON expense.link_to_member = member.member_id GROUP BY expense.expense_id HAVING count(expense.expense_id) > 1 ORDER BY sum(expense.cost) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1894, "question": "Among the members who incurred expenses in more than one event, who paid the most amount?", "db_id": "student_club", "sql": "SELECT T1.member_id FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member INNER JOIN budget AS T3 ON T2.link_to_budget = T3.budget_id INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id GROUP BY T1.member_id HAVING COUNT(DISTINCT T4.event_id) > 1 ORDER BY SUM(T2.cost) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1895, "question": "What is the average amount paid by students in a position other than a member?", "db_id": "student_club", "sql": "select avg(expense.cost) from expense inner join attendance on expense.link_to_member = attendance.link_to_member inner join member on attendance.link_to_member = member.member_id where member.position != 'Member'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1896, "question": "What is the average amount paid by students in a position other than a member?", "db_id": "student_club", "sql": "SELECT avg(expense.cost) FROM expense INNER JOIN member ON expense.link_to_member = member.member_id WHERE member.position != 'Member'", "label": true, "error_types": [] }, { "id": 1897, "question": "List the name of events with less than average parking cost.", "db_id": "student_club", "sql": "SELECT event.event_name FROM expense INNER JOIN budget ON expense.link_to_budget = budget.budget_id INNER JOIN event ON budget.link_to_event = event.event_id WHERE budget.category = 'Parking' AND expense.cost < ( SELECT avg(cost) FROM expense )", "label": true, "error_types": [] }, { "id": 1898, "question": "List the name of events with less than average parking cost.", "db_id": "student_club", "sql": "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' GROUP BY T1.event_id HAVING SUM(T3.cost) < ( SELECT AVG(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 T2.category = 'Parking' )", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Redundancy" }, { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Mismatch" } ] }, { "id": 1899, "question": "List the full name of the top five members who spend the most money in the descending order of spending.", "db_id": "student_club", "sql": "select member.first_name , member.last_name from member inner join expense on member.member_id = expense.link_to_member order by expense.cost desc limit 5", "label": true, "error_types": [] }, { "id": 1900, "question": "List the full name of the top five members who spend the most money in the descending order of spending.", "db_id": "student_club", "sql": "SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name ORDER BY SUM(T2.cost) DESC LIMIT 5", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1901, "question": "Give the full name and contact number of members who had to spend more than average on each expense.", "db_id": "student_club", "sql": "SELECT T1.first_name, T1.last_name, T1.phone FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name, T1.phone HAVING SUM(T2.cost) > (SELECT AVG(cost) FROM expense)", "label": true, "error_types": [] }, { "id": 1902, "question": "What is the major of Garrett Gerke and which department does it belong to?", "db_id": "student_club", "sql": "select major.major_name , major.department from member inner join major on member.link_to_major = major.major_id where member.first_name = 'Garrett' and member.last_name = 'Gerke'", "label": true, "error_types": [] }, { "id": 1903, "question": "Write the full name of the member who spent money for water, veggie tray and supplies and include the cost of it.", "db_id": "student_club", "sql": "select member.first_name , member.last_name , expense.cost from member inner join expense on member.member_id = expense.link_to_member where expense.expense_description = 'Water , Veggie tray , supplies'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 1904, "question": "Write the full name of the member who spent money for water, veggie tray and supplies and include the cost of it.", "db_id": "student_club", "sql": "SELECT member.first_name, member.last_name, expense.cost FROM expense INNER JOIN member ON expense.link_to_member = member.member_id WHERE expense.expense_description = 'Water, Veggie tray, supplies'", "label": true, "error_types": [] }, { "id": 1905, "question": "List the last names of students under the Elementary Education major and include their phone numbers.", "db_id": "student_club", "sql": "select member.last_name , member.phone from major inner join member on major.major_id = member.link_to_major where major.major_name = 'Elementary Education'", "label": true, "error_types": [] }, { "id": 1906, "question": "What category was budgeted for the 'January Speaker' event and how much was the amount budgeted for that category?", "db_id": "student_club", "sql": "SELECT budget.category, budget.amount FROM budget INNER JOIN EVENT ON budget.link_to_event = EVENT.event_id WHERE EVENT.event_name = 'January Speaker'", "label": true, "error_types": [] }, { "id": 1907, "question": "List the event names which were budgeted for the food.", "db_id": "student_club", "sql": "select event.event_name from event inner join budget on event.event_id = budget.link_to_event where budget.category = 'Food'", "label": true, "error_types": [] }, { "id": 1908, "question": "Write the full names of students who received funds on the date of 9/9/2019 and include the amount received.", "db_id": "student_club", "sql": "select member.first_name , member.last_name , income.amount from income inner join member on income.link_to_member = member.member_id where income.date_received = '9/9/2019'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1909, "question": "Write the full names of students who received funds on the date of 9/9/2019 and include the amount received.", "db_id": "student_club", "sql": "SELECT T2.first_name, T2.last_name, T1.amount FROM income AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.date_received = '2019-09-09'", "label": true, "error_types": [] }, { "id": 1910, "question": "Which budget category does the expense 'Posters' fall to?", "db_id": "student_club", "sql": "SELECT DISTINCT budget.category FROM budget INNER JOIN expense ON budget.budget_id = expense.link_to_budget WHERE expense.expense_description = 'Posters'", "label": true, "error_types": [] }, { "id": 1911, "question": "Write the full name of the club member with the position of 'Secretary' and list which college the club member belongs to.", "db_id": "student_club", "sql": "select member.first_name , member.last_name , major.college from member inner join major on member.link_to_major = major.major_id where member.position = 'Secretary'", "label": true, "error_types": [] }, { "id": 1912, "question": "Where is the hometown of Garrett Gerke?", "db_id": "student_club", "sql": "select zip_code.city from member inner join zip_code on member.zip = zip_code.zip_code where member.first_name = 'Garrett' and member.last_name = 'Girke'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1913, "question": "Which student has the hometown of Lincolnton, North Carolina with the zip code of 28092? List their full name and position.", "db_id": "student_club", "sql": "select member.first_name , member.last_name , member.position from member inner join zip_code on member.zip = zip_code.zip_code where zip_code.city = 'Lincolnton' and zip_code.state = 'North Carolina' and zip_code.zip_code = 28092", "label": true, "error_types": [] }, { "id": 1914, "question": "How many gas stations in CZE has Premium gas?", "db_id": "debit_card_specializing", "sql": "select count(gasstationid) from gasstations where country = 'CZE' and segment = 'Premium'", "label": true, "error_types": [] }, { "id": 1915, "question": "What is the ratio of customers who pay in EUR against customers who pay in CZK?", "db_id": "debit_card_specializing", "sql": "select cast(sum(case when currency = 'EUR' then 1 else 0 end) as real) * 100 / sum(case when currency = 'CZK' then 1 else 0 end) from customers", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" } ] }, { "id": 1916, "question": "What is the ratio of customers who pay in EUR against customers who pay in CZK?", "db_id": "debit_card_specializing", "sql": "SELECT CAST(SUM(CASE WHEN Currency = 'EUR' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN Currency = 'CZK' THEN 1 ELSE 0 END) FROM customers", "label": true, "error_types": [] }, { "id": 1917, "question": "In 2012, who had the least consumption in LAM?", "db_id": "debit_card_specializing", "sql": "select customers.customerid from customers inner join yearmonth on customers.customerid = yearmonth.customerid where yearmonth.date >= 201201 and yearmonth.date <= 201212 and customers.segment = 'LAM' order by yearmonth.consumption asc limit 1", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1918, "question": "In 2012, who had the least consumption in LAM?", "db_id": "debit_card_specializing", "sql": "SELECT customers.customerid FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.segment = 'LAM' AND strftime('%Y', yearmonth.`date`) = '2012' ORDER BY yearmonth.consumption ASC LIMIT 1", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1919, "question": "What was the average monthly consumption of customers in SME for the year 2013?", "db_id": "debit_card_specializing", "sql": "select avg(yearmonth.consumption) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'SME' and strftime('%Y' , yearmonth.date) = '2013'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Math Functions" } ] }, { "id": 1920, "question": "What was the average monthly consumption of customers in SME for the year 2013?", "db_id": "debit_card_specializing", "sql": "SELECT AVG(T2.Consumption) / 12 AS Average_Monthly_Consumption FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'SME' AND T2.Date BETWEEN '201301' AND '201312'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1921, "question": "Which customers, paying in CZK, consumed the most gas in 2011?", "db_id": "debit_card_specializing", "sql": "select customers.customerid from customers inner join yearmonth on customers.customerid = yearmonth.customerid where strftime('%Y' , yearmonth.date) = '2011' and customers.currency = 'CZK' order by yearmonth.consumption desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1922, "question": "Which customers, paying in CZK, consumed the most gas in 2011?", "db_id": "debit_card_specializing", "sql": "SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date BETWEEN 201101 AND 201112 AND T1.Currency = 'CZK' ORDER BY T2.Consumption DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1923, "question": "How many customers in KAM had a consumption of less than 30,000 for the year 2012?", "db_id": "debit_card_specializing", "sql": "select count(customers.customerid) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'KAM' and strftime('%Y' , yearmonth.date) between '2012-01-01' and '2012-12-31'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1924, "question": "How many customers in KAM had a consumption of less than 30,000 for the year 2012?", "db_id": "debit_card_specializing", "sql": "SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' AND T2.Date BETWEEN 201201 AND 201212 AND T2.Consumption < 30000", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1925, "question": "What was the difference in gas consumption between CZK-paying customers and EUR-paying customers in 2012?", "db_id": "debit_card_specializing", "sql": "select sum(iif(customers.currency = 'CZK' , yearmonth.consumption , 0)) - sum(iif(customers.currency = 'EUR' , yearmonth.consumption , 0)) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where yearmonth.date between '2012-01-01' and '2012-12-31'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1926, "question": "What was the difference in gas consumption between CZK-paying customers and EUR-paying customers in 2012?", "db_id": "debit_card_specializing", "sql": "SELECT SUM(CASE WHEN T1.Currency = 'CZK' THEN T2.Consumption ELSE 0 END) - SUM(CASE WHEN T1.Currency = 'EUR' THEN T2.Consumption ELSE 0 END) AS ConsumptionDifference FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date BETWEEN '201201' AND '201212'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1927, "question": "Which year recorded the most gas use paid in EUR?", "db_id": "debit_card_specializing", "sql": "select yearmonth.date from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.currency = 'EUR' group by yearmonth.date order by sum(yearmonth.consumption) desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1928, "question": "Which year recorded the most gas use paid in EUR?", "db_id": "debit_card_specializing", "sql": "SELECT strftime('%Y', `date`) FROM transactions_1k WHERE price > 0 GROUP BY strftime('%Y', `date`) ORDER BY sum(price) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1929, "question": "Which year recorded the most gas use paid in EUR?", "db_id": "debit_card_specializing", "sql": "SELECT strftime('%Y', T2.Date) AS Year FROM yearmonth T2 JOIN customers T1 ON T2.CustomerID = T1.CustomerID WHERE T1.Currency = 'EUR' GROUP BY Year ORDER BY SUM(T2.Consumption) DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" } ] }, { "id": 1930, "question": "Which segment had the least consumption?", "db_id": "debit_card_specializing", "sql": "select distinct customers.segment from customers inner join yearmonth on customers.customerid = yearmonth.customerid where yearmonth.consumption = ( select min(consumption) from yearmonth )", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1931, "question": "Which segment had the least consumption?", "db_id": "debit_card_specializing", "sql": "SELECT T1.Segment FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Consumption IS NOT NULL GROUP BY T1.Segment ORDER BY SUM(T2.Consumption) ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1932, "question": "Which year recorded the most consumption of gas paid in CZK?", "db_id": "debit_card_specializing", "sql": "select strftime('%Y' , yearmonth.date) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.currency = 'CZK' group by strftime('%Y' , yearmonth.date) order by sum(yearmonth.consumption) desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 1933, "question": "Which year recorded the most consumption of gas paid in CZK?", "db_id": "debit_card_specializing", "sql": "SELECT substr(date, 1, 4) FROM yearmonth GROUP BY substr(date, 1, 4) ORDER BY sum(consumption) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1934, "question": "What was the gas consumption peak month for SME customers in 2013?", "db_id": "debit_card_specializing", "sql": "select yearmonth.date from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'SME' and strftime('%Y' , yearmonth.date) = '2013' order by yearmonth.consumption desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1935, "question": "What was the gas consumption peak month for SME customers in 2013?", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT substr(yearmonth.date, 5, 2) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.segment = 'SME' AND substr(yearmonth.date, 1, 4) = '2013' ORDER BY yearmonth.consumption DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1936, "question": "What was the gas consumption peak month for SME customers in 2013?", "db_id": "debit_card_specializing", "sql": "SELECT T2.Date FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'SME' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "String Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1937, "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?", "db_id": "debit_card_specializing", "sql": "select avg(yearmonth.consumption) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.currency = 'CZK' and customers.segment in ('SME' , 'LAM' , 'KAM') and yearmonth.date in ('2013' , '2013') and customers.segment in ('LAM' , 'KAM' , 'SME') group by yearmonth.customerid order by sum(yearmonth.consumption) asc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1938, "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?", "db_id": "debit_card_specializing", "sql": "SELECT sum(CASE WHEN customers.segment = 'SME' THEN yearmonth.consumption ELSE 0 END) - sum(CASE WHEN customers.segment = 'LAM' THEN yearmonth.consumption ELSE 0 END) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.currency = 'CZK' AND substr(yearmonth.date, 1, 4) = '2013'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1939, "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?", "db_id": "debit_card_specializing", "sql": "SELECT (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'SME' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) - (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) AS diff1, (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) - (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) AS diff2, (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) - (SELECT AVG(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'SME' AND T1.Currency = 'CZK' AND T2.Date LIKE '2013%' ORDER BY T2.Consumption ASC LIMIT 1) AS diff3", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1940, "question": "How much did customer 6 consume in total between August and November 2013?", "db_id": "debit_card_specializing", "sql": "select sum(consumption) from yearmonth where customerid = 6 and date between '2013-08' and '2013-11'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1941, "question": "How much did customer 6 consume in total between August and November 2013?", "db_id": "debit_card_specializing", "sql": "SELECT sum(yearmonth.consumption) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.customerid = 6 AND substr(yearmonth.date, 1, 4) = '2013' AND substr(yearmonth.date, 5, 2) BETWEEN '08' AND '11'", "label": true, "error_types": [] }, { "id": 1942, "question": "How many more \"discount\" gas stations does the Czech Republic have compared to Slovakia?", "db_id": "debit_card_specializing", "sql": "select sum(case when country = 'Czech Rep.' then 1 else 0 end) - sum(case when country = 'Slovakia' then 1 else 0 end) from gasstations", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1943, "question": "How many more \"discount\" gas stations does the Czech Republic have compared to Slovakia?", "db_id": "debit_card_specializing", "sql": "SELECT sum(CASE WHEN country = 'CZE' THEN 1 ELSE 0 END) - sum(CASE WHEN country = 'SVK' THEN 1 ELSE 0 END) FROM gasstations WHERE segment = 'Discount'", "label": true, "error_types": [] }, { "id": 1944, "question": "How much more was customer 7 consuming in April 2013 than customer 5?", "db_id": "debit_card_specializing", "sql": "select consumption * (customerid + consumption) from yearmonth where date like '2013-04%'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1945, "question": "How much more was customer 7 consuming in April 2013 than customer 5?", "db_id": "debit_card_specializing", "sql": "SELECT SUM(CASE WHEN CustomerID = 7 THEN Consumption ELSE 0 END) - SUM(CASE WHEN CustomerID = 5 THEN Consumption ELSE 0 END) FROM yearmonth WHERE Date = '201304'", "label": true, "error_types": [] }, { "id": 1946, "question": "Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?", "db_id": "debit_card_specializing", "sql": "select customers.customerid from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'LAM' and customers.currency = 'Euro' and yearmonth.date = '2013-10' order by yearmonth.consumption desc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1947, "question": "Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?", "db_id": "debit_card_specializing", "sql": "SELECT customers.customerid FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.currency = 'EUR' AND customers.segment = 'LAM' AND substr(yearmonth.date, 1, 6) = '201310' ORDER BY yearmonth.consumption DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1948, "question": "Who among KAM's customers consumed the most? How much did it consume?", "db_id": "debit_card_specializing", "sql": "select customers.customerid , yearmonth.consumption from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'KAM' group by customers.customerid order by sum(yearmonth.consumption) desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" } ] }, { "id": 1949, "question": "Who among KAM's customers consumed the most? How much did it consume?", "db_id": "debit_card_specializing", "sql": "SELECT T1.CustomerID, T2.Consumption FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' ORDER BY T2.Consumption DESC LIMIT 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1950, "question": "How much did the KAM customers consume in total in May 2013?", "db_id": "debit_card_specializing", "sql": "select sum(yearmonth.consumption) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'KAM' and yearmonth.date = '2013-05'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1951, "question": "How much did the KAM customers consume in total in May 2013?", "db_id": "debit_card_specializing", "sql": "SELECT sum(yearmonth.consumption) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.segment = 'KAM' AND yearmonth.date = 201305", "label": true, "error_types": [] }, { "id": 1952, "question": "How many percent of LAM customer consumed more than 46.73?", "db_id": "debit_card_specializing", "sql": "SELECT cast(sum(CASE WHEN yearmonth.consumption > 46.73 THEN 1 ELSE 0 END) AS REAL) * 100 / count(customers.customerid) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.segment = 'LAM'", "label": true, "error_types": [] }, { "id": 1953, "question": "What percentage of KAM customers pay in euros?", "db_id": "debit_card_specializing", "sql": "SELECT cast(sum(CASE WHEN currency = 'EUR' THEN 1 ELSE 0 END) AS REAL) * 100 / count(customerid) FROM customers WHERE segment = 'KAM'", "label": true, "error_types": [] }, { "id": 1954, "question": "What percentage of KAM customers pay in euros?", "db_id": "debit_card_specializing", "sql": "SELECT CAST(SUM(CASE WHEN Currency = 'Euro' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Segment) FROM customers WHERE Segment = 'KAM'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1955, "question": "In February 2012, what percentage of customers consumed more than 528.3?", "db_id": "debit_card_specializing", "sql": "select cast(sum(case when consumption > 528.3 then 1 else 0 end) as real) * 100 / count(customerid) from yearmonth where date = '2012-02'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1956, "question": "In February 2012, what percentage of customers consumed more than 528.3?", "db_id": "debit_card_specializing", "sql": "SELECT cast(sum(CASE WHEN consumption > 528.3 THEN 1 ELSE 0 END) AS REAL) * 100 / count(customerid) FROM yearmonth WHERE date LIKE '201202'", "label": true, "error_types": [] }, { "id": 1957, "question": "What percentage of Slovakian gas stations are premium?", "db_id": "debit_card_specializing", "sql": "select cast(count(case when segment = 'Premium' then gasstationid else null end) as real) * 100 / count(gasstationid) from gasstations", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1958, "question": "What percentage of Slovakian gas stations are premium?", "db_id": "debit_card_specializing", "sql": "SELECT cast(sum(CASE WHEN segment = 'Premium' THEN 1 ELSE 0 END) AS REAL) * 100 / count(country) FROM gasstations WHERE country = 'SVK'", "label": true, "error_types": [] }, { "id": 1959, "question": "What percentage of Slovakian gas stations are premium?", "db_id": "debit_card_specializing", "sql": "SELECT CAST(SUM(CASE WHEN Segment = 'Premium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(GasStationID) FROM gasstations WHERE Country = 'Slovakia'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" } ] }, { "id": 1960, "question": "Which client ID consumed the most in September 2013?", "db_id": "debit_card_specializing", "sql": "select customerid from yearmonth where consumption = ( select max(consumption) from yearmonth where strftime('%Y-%m' , date) = '2013-09' )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1961, "question": "Which client ID consumed the most in September 2013?", "db_id": "debit_card_specializing", "sql": "SELECT CustomerID FROM yearmonth WHERE Date = '201309' ORDER BY Consumption DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1962, "question": "Which client segment consumed the least in September 2013?", "db_id": "debit_card_specializing", "sql": "SELECT T2.Segment FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '201309' ORDER BY T1.Consumption ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1963, "question": "Which SME customer consumed the least in June 2012?", "db_id": "debit_card_specializing", "sql": "select customers.customerid from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.segment = 'SME' and yearmonth.date = '2012-06' order by yearmonth.consumption asc limit 1", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1964, "question": "Which SME customer consumed the least in June 2012?", "db_id": "debit_card_specializing", "sql": "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' ORDER BY T2.Consumption ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1965, "question": "What is the biggest monthly consumption of the customers who use euro as their currency?", "db_id": "debit_card_specializing", "sql": "select yearmonth.consumption from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.currency = 'eur' order by yearmonth.consumption desc limit 1", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 1966, "question": "What is the biggest monthly consumption of the customers who use euro as their currency?", "db_id": "debit_card_specializing", "sql": "SELECT sum(yearmonth.consumption) / 12 FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.currency = 'EUR'", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Other Errors", "sub_error_type": "ASC/DESC" }, { "error_type": "Other Errors", "sub_error_type": "Other" } ] }, { "id": 1967, "question": "Please list the product description of the products consumed in September, 2013.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT T2.Description FROM transactions_1k AS T1 INNER JOIN products AS T2 ON T1.ProductID = T2.ProductID WHERE strftime('%Y%m', T1.Date) = '201309'", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Date/Time Functions" } ] }, { "id": 1968, "question": "Please list the countries of the gas stations with transactions taken place in June, 2013.", "db_id": "debit_card_specializing", "sql": "select distinct gasstations.country from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid where transactions_1k.date like '2013-06%'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1969, "question": "Please list the chains of the gas stations with transactions in euro.", "db_id": "debit_card_specializing", "sql": "select distinct gasstations.chainid from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid where transactions_1k.transactionid = 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1970, "question": "Please list the chains of the gas stations with transactions in euro.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT gasstations.chainid FROM gasstations INNER JOIN transactions_1k ON gasstations.gasstationid = transactions_1k.gasstationid WHERE gasstations.country = 'CZE'", "label": false, "error_types": [ { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" } ] }, { "id": 1971, "question": "Please list the chains of the gas stations with transactions in euro.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT T3.ChainID 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 T1.Currency = 'Euro'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1972, "question": "Please list the product description of the products bought in transactions in euro.", "db_id": "debit_card_specializing", "sql": "select distinct products.description from products inner join transactions_1k on products.productid = transactions_1k.productid where transactions_1k.transactionid = 'Eur'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" } ] }, { "id": 1973, "question": "Please list the product description of the products bought in transactions in euro.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT products.description FROM products INNER JOIN `transactions_1k` ON products.productid = transactions_1k.productid", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1974, "question": "What is the average total price of the transactions taken place in January, 2012?", "db_id": "debit_card_specializing", "sql": "select sum(price) / count(transactionid) from transactions_1k where date like '2012-01%'", "label": true, "error_types": [] }, { "id": 1975, "question": "Among the customers who paid in euro, how many of them have a monthly consumption of over 1000?", "db_id": "debit_card_specializing", "sql": "select count(customers.customerid) from customers inner join yearmonth on customers.customerid = yearmonth.customerid where customers.currency = 'eur' and yearmonth.consumption > 1000", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Redundancy" } ] }, { "id": 1976, "question": "Among the customers who paid in euro, how many of them have a monthly consumption of over 1000?", "db_id": "debit_card_specializing", "sql": "SELECT count(customers.customerid) FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE customers.currency = 'EUR' AND yearmonth.consumption > 1000", "label": true, "error_types": [] }, { "id": 1977, "question": "Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic.", "db_id": "debit_card_specializing", "sql": "select distinct products.description from products inner join transactions_1k on products.productid = transactions_1k.productid inner join gasstations on transactions_1k.gasstationid = gasstations.gasstationid where gasstations.country = 'CZE'", "label": true, "error_types": [] }, { "id": 1978, "question": "Please list the disparate time of the transactions taken place in the gas stations from chain no. 11.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT T2.Time FROM gasstations AS T1 INNER JOIN transactions_1k AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.ChainID = 11", "label": true, "error_types": [] }, { "id": 1979, "question": "How many transactions taken place in the gas station in the Czech Republic are with a price of over 1000?", "db_id": "debit_card_specializing", "sql": "select count(transactions_1k.transactionid) from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid where gasstations.country = 'CZE' and transactions_1k.price > 1000", "label": true, "error_types": [] }, { "id": 1980, "question": "Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?", "db_id": "debit_card_specializing", "sql": "SELECT COUNT(T1.GasStationID) FROM gasstations AS T1 INNER JOIN transactions_1k AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Country = 'CZE' AND T2.Date > '2012-01-01'", "label": true, "error_types": [] }, { "id": 1981, "question": "What is the average total price of the transactions taken place in gas stations in the Czech Republic?", "db_id": "debit_card_specializing", "sql": "select avg(transactions_1k.price) from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid where gasstations.country = 'CZE'", "label": true, "error_types": [] }, { "id": 1982, "question": "What is the average total price of the transactions taken place in gas stations in the Czech Republic?", "db_id": "debit_card_specializing", "sql": "SELECT AVG(T2.Amount * T2.Price) FROM gasstations AS T1 INNER JOIN transactions_1k AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Country = 'CZE'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 1983, "question": "For the customers who paid in the euro, what is their average total price of the transactions?", "db_id": "debit_card_specializing", "sql": "select sum(transactions_1k.price) / count(customers.customerid) from customers inner join transactions_1k on customers.customerid = transactions_1k.customerid where customers.currency = 'eur'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1984, "question": "For the customers who paid in the euro, what is their average total price of the transactions?", "db_id": "debit_card_specializing", "sql": "SELECT avg(price) FROM transactions_1k WHERE customerid IN ( SELECT customerid FROM customers WHERE currency = 'EUR' )", "label": true, "error_types": [] }, { "id": 1985, "question": "Which customer paid the most in 2012/8/25?", "db_id": "debit_card_specializing", "sql": "select customerid from transactions_1k where date = '2012-08-25' order by amount desc limit 1", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 1986, "question": "Which customer paid the most in 2012/8/25?", "db_id": "debit_card_specializing", "sql": "SELECT CustomerID FROM transactions_1k WHERE Date = '2012-08-25' GROUP BY CustomerID ORDER BY SUM(Price) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 1987, "question": "Which country's gas station had the first paid cusomer in 2012/8/25?", "db_id": "debit_card_specializing", "sql": "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 ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1988, "question": "What kind of currency did the customer paid at 16:25:00 in 2012/8/24?", "db_id": "debit_card_specializing", "sql": "select distinct customers.currency from customers inner join transactions_1k on customers.customerid = transactions_1k.customerid where transactions_1k.date = '2012-08-24' and transactions_1k.time = '16:25:00'", "label": true, "error_types": [] }, { "id": 1989, "question": "What segment did the customer have at 2012/8/23 21:20:00?", "db_id": "debit_card_specializing", "sql": "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'", "label": true, "error_types": [] }, { "id": 1990, "question": "How many transactions were paid in CZK in the morning of 2012/8/26?", "db_id": "debit_card_specializing", "sql": "select count(transactions_1k.transactionid) from customers inner join transactions_1k on customers.customerid = transactions_1k.customerid where customers.currency = 'EUR' and transactions_1k.time < '13:00:00' and transactions_1k.date = '2012-08-26'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1991, "question": "For the earliest customer, what segment did he/she have?", "db_id": "debit_card_specializing", "sql": "select segment from customers where customerid = ( select customerid from customers order by customerid asc limit 1 )", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1992, "question": "For the earliest customer, what segment did he/she have?", "db_id": "debit_card_specializing", "sql": "SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY T1.Date ASC LIMIT 1", "label": true, "error_types": [] }, { "id": 1993, "question": "For the deal happened at 2012/8/24 12:42:00, which country was it?", "db_id": "debit_card_specializing", "sql": "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'", "label": true, "error_types": [] }, { "id": 1994, "question": "What was the product id of the transaction happened at 2012/8/23 21:20:00?", "db_id": "debit_card_specializing", "sql": "SELECT ProductID FROM transactions_1k WHERE Date = '2012-08-23' AND Time = '21:20:00'", "label": true, "error_types": [] }, { "id": 1995, "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?", "db_id": "debit_card_specializing", "sql": "select transactions_1k.amount , yearmonth.date , yearmonth.consumption from transactions_1k inner join yearmonth on transactions_1k.customerid = yearmonth.customerid where transactions_1k.date like '2012-01-01%'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1996, "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?", "db_id": "debit_card_specializing", "sql": "SELECT sum(yearmonth.consumption), yearmonth.date FROM `yearmonth` INNER JOIN transactions_1k ON yearmonth.customerid = transactions_1k.customerid WHERE transactions_1k.date = '2012-08-24' AND transactions_1k.price = 124.05", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 1997, "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?", "db_id": "debit_card_specializing", "sql": "SELECT T1.Price, 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 LIKE '201201%'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1998, "question": "For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?", "db_id": "debit_card_specializing", "sql": "select count(transactions_1k.transactionid) from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid where gasstations.country = 'CZE' and transactions_1k.time between '8:00' and '9:00' and transactions_1k.date = '2012-08-26'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" } ] }, { "id": 1999, "question": "For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?", "db_id": "debit_card_specializing", "sql": "SELECT count(transactions_1k.transactionid) FROM gasstations INNER JOIN transactions_1k ON gasstations.gasstationid = transactions_1k.gasstationid WHERE gasstations.country = 'CZE' AND transactions_1k.date = '2012-08-26' AND transactions_1k.time BETWEEN '08:00:00' AND '09:00:00'", "label": true, "error_types": [] }, { "id": 2000, "question": "There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?", "db_id": "debit_card_specializing", "sql": "select distinct customers.currency from customers inner join yearmonth on customers.customerid = yearmonth.customerid where yearmonth.date like '2013-06%'", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 2001, "question": "There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?", "db_id": "debit_card_specializing", "sql": "SELECT customers.currency FROM customers INNER JOIN yearmonth ON customers.customerid = yearmonth.customerid WHERE substr(yearmonth.date, 1, 6) = '201306' AND yearmonth.consumption = 214582.17", "label": true, "error_types": [] }, { "id": 2002, "question": "Which country was the card owner of No.667467 in?", "db_id": "debit_card_specializing", "sql": "select gasstations.country from transactions_1k inner join gasstations on transactions_1k.gasstationid = gasstations.gasstationid where transactions_1k.cardid = 667467", "label": true, "error_types": [] }, { "id": 2003, "question": "What's the nationality of the customer who spent 548.4 in 2012/8/24?", "db_id": "debit_card_specializing", "sql": "SELECT customers.currency FROM customers INNER JOIN transactions_1k ON customers.customerid = transactions_1k.customerid WHERE transactions_1k.date = '2012-08-24' AND transactions_1k.price = 548.4", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 2004, "question": "What's the nationality of the customer who spent 548.4 in 2012/8/24?", "db_id": "debit_card_specializing", "sql": "SELECT T1.Country FROM gasstations AS T1 INNER JOIN transactions_1k AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Date = '2012-08-24' AND T2.Amount = 548.4", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 2005, "question": "For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?", "db_id": "debit_card_specializing", "sql": "select cast(yearmonth.consumption as real) * 100 / yearmonth.consumption from yearmonth inner join transactions_1k on yearmonth.customerid = transactions_1k.customerid where transactions_1k.date = '2012-08-25' and transactions_1k.amount = 634.8", "label": false, "error_types": [ { "error_type": "Subquery-Related Errors", "sub_error_type": "Subquery Missing" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 2006, "question": "For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?", "db_id": "debit_card_specializing", "sql": "SELECT cast((sum(CASE WHEN strftime('%Y', `date`) = '2012' THEN consumption ELSE 0 END) - sum(CASE WHEN strftime('%Y', `date`) = '2013' THEN consumption ELSE 0 END)) AS REAL) * 100 / sum(CASE WHEN strftime('%Y', `date`) = '2012' THEN consumption ELSE 0 END) FROM `yearmonth`", "label": false, "error_types": [ { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" } ] }, { "id": 2007, "question": "For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?", "db_id": "debit_card_specializing", "sql": "SELECT ((SELECT T2.Consumption FROM yearmonth AS T2 WHERE T2.CustomerID = (SELECT T1.CustomerID FROM transactions_1k AS T1 WHERE T1.Date = '2012-08-25' AND T1.Price = 634.8) AND T2.Date LIKE '2012%') - (SELECT T3.Consumption FROM yearmonth AS T3 WHERE T3.CustomerID = (SELECT T1.CustomerID FROM transactions_1k AS T1 WHERE T1.Date = '2012-08-25' AND T1.Price = 634.8) AND T3.Date LIKE '2013%')) / (SELECT T2.Consumption FROM yearmonth AS T2 WHERE T2.CustomerID = (SELECT T1.CustomerID FROM transactions_1k AS T1 WHERE T1.Date = '2012-08-25' AND T1.Price = 634.8) AND T2.Date LIKE '2012%') AS ConsumptionDecreaseRate", "label": false, "error_types": [ { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conversion Functions" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 2008, "question": "Which gas station has the highest amount of revenue?", "db_id": "debit_card_specializing", "sql": "select gasstations.gasstationid from gasstations inner join transactions_1k on gasstations.gasstationid = transactions_1k.gasstationid order by transactions_1k.amount desc limit 1", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Redundancy" }, { "error_type": "Function-Related Errors", "sub_error_type": "Aggregate Functions" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 2009, "question": "Which gas station has the highest amount of revenue?", "db_id": "debit_card_specializing", "sql": "SELECT gasstationid FROM transactions_1k GROUP BY gasstationid ORDER BY sum(price) DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 2010, "question": "What is the percentage of \"premium\" against the overall segment in Country = \"SVK\"?", "db_id": "debit_card_specializing", "sql": "SELECT CAST(SUM(CASE WHEN Segment = 'Premium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Segment) FROM gasstations WHERE Country = 'SVK'", "label": true, "error_types": [] }, { "id": 2011, "question": "What is the amount spent by customer \"38508\" at the gas stations? How much had the customer spent in January 2012?", "db_id": "debit_card_specializing", "sql": "select amount , date from transactions_1k where customerid = 38508 and date = '2012-01'", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Clause-Related Errors", "sub_error_type": "Clause Missing" } ] }, { "id": 2012, "question": "What is the amount spent by customer \"38508\" at the gas stations? How much had the customer spent in January 2012?", "db_id": "debit_card_specializing", "sql": "SELECT sum(transactions_1k.price), sum(transactions_1k.amount) FROM transactions_1k INNER JOIN yearmonth ON transactions_1k.customerid = yearmonth.customerid WHERE transactions_1k.customerid = 38508 AND substr(transactions_1k.date, 1, 6) = '201201'", "label": false, "error_types": [ { "error_type": "Table-Related Errors", "sub_error_type": "Table Mismatch" }, { "error_type": "Function-Related Errors", "sub_error_type": "Conditional Functions" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" } ] }, { "id": 2013, "question": "What is the amount spent by customer \"38508\" at the gas stations? How much had the customer spent in January 2012?", "db_id": "debit_card_specializing", "sql": "SELECT SUM(Amount) FROM transactions_1k WHERE CustomerID = 38508 UNION ALL SELECT SUM(Amount) FROM transactions_1k WHERE Date LIKE '201201%' AND CustomerID = 38508", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Table-Related Errors", "sub_error_type": "Table Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Mismatch" } ] }, { "id": 2014, "question": "Which country had the gas station that sold the most expensive product id No.2 for one unit?", "db_id": "debit_card_specializing", "sql": "SELECT gasstations.country FROM gasstations INNER JOIN transactions_1k ON gasstations.gasstationid = transactions_1k.gasstationid WHERE transactions_1k.productid = 2 ORDER BY transactions_1k.price DESC LIMIT 1", "label": true, "error_types": [] }, { "id": 2015, "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.", "db_id": "debit_card_specializing", "sql": "select distinct yearmonth.consumption from yearmonth inner join transactions_1k on yearmonth.customerid = transactions_1k.customerid where yearmonth.date like '2012-08%' and transactions_1k.productid = 5 and transactions_1k.price > 29 * transactions_1k.amount", "label": false, "error_types": [ { "error_type": "Value-Related Errors", "sub_error_type": "Value Mismatch" }, { "error_type": "Operator-Related Errors", "sub_error_type": "Comparison Operator Mismatch" } ] }, { "id": 2016, "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.", "db_id": "debit_card_specializing", "sql": "SELECT DISTINCT CASE WHEN sum(transactions_1k.price / transactions_1k.amount) > 29 THEN 'high' ELSE 'low' END FROM transactions_1k INNER JOIN yearmonth ON transactions_1k.`date` = yearmonth.`date` WHERE transactions_1k.productid = 5", "label": false, "error_types": [ { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Mismatch" }, { "error_type": "Attribute-Related Errors", "sub_error_type": "Attribute Missing" }, { "error_type": "Condition-Related Errors", "sub_error_type": "Explicit Condition Missing" }, { "error_type": "Table-Related Errors", "sub_error_type": "Join Condition Mismatch" } ] }, { "id": 2017, "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.", "db_id": "debit_card_specializing", "sql": "SELECT T1.Consumption FROM yearmonth AS T1 INNER JOIN ( SELECT DISTINCT CustomerID FROM transactions_1k WHERE ProductID = 5 AND Price / Amount > 29 ) AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '201208'", "label": true, "error_types": [] } ]