{"question_id": 1076, "db_id": "european_football_2", "difficulty": "challenging", "question": "What is the difference of the average ball control score between Abdou Diallo and Aaron Appindangoye\n?", "evidence": "difference of the average ball control = SUBTRACT(AVG(ball_control WHERE player_name = 'Abdou Diallo'), AVG(ball_control WHERE player_name = 'Aaron Appindangoye')); AVG(ball_control WHERE player_name = 'XX XX') = SUM(CASE WHEN player_name = 'XX XX' THEN ball_control ELSE 0 END) / COUNT(CASE WHEN player_name = 'XX XX' THEN id ELSE NULL END)", "gold_sql": "SELECT CAST(SUM(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.id ELSE NULL END) - CAST(SUM(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.id ELSE NULL END) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id", "note": "Join `Player_Attributes` with `Player` on `Player_Attributes.player_api_id = Player.player_api_id`. Use the `player_name` column to filter for 'Abdou Diallo' and 'Aaron Appindangoye'. The `ball_control` column in `Player_Attributes` contains the values. Use the hint to calculate the average for each player and subtract them. Note that the `player_api_id` is the key to join the tables.", "note_tokens": 96, "note_has_sql": false, "schema_tokens": 4541, "gold_error": null, "none_sql": "SELECT \n (SELECT AVG(ball_control) FROM players WHERE name = 'Abdou Diallo') \n - \n (SELECT AVG(ball_control) FROM players WHERE name = 'Aaron Appindangoye') AS difference;", "none_error": "no such table: players", "none_ok": false, "text_sql": "SELECT \n (SELECT AVG(ball_control) FROM Player_Attributes JOIN Player ON Player_Attributes.player_api_id = Player.player_api_id WHERE player_name = 'Abdou Diallo') \n - \n (SELECT AVG(ball_control) FROM Player_Attributes JOIN Player ON Player_Attributes.player_api_id = Player.player_api_id WHERE player_name = 'Aaron Appindangoye') AS difference;", "text_error": null, "text_ok": true, "full_sql": "SELECT \n (SELECT AVG(ball_control) FROM Player_Attributes WHERE player_api_id = (SELECT player_api_id FROM Player WHERE player_name = 'Abdou Diallo')) \n - \n (SELECT AVG(ball_control) FROM Player_Attributes WHERE player_api_id = (SELECT player_api_id FROM Player WHERE player_name = 'Aaron Appindangoye')) AS difference;", "full_error": null, "full_ok": true} {"question_id": 1171, "db_id": "thrombosis_prediction", "difficulty": "challenging", "question": "How many underage patients were examined during the course of the three-year period from 1990 to 1993?", "evidence": "underage patients refers to year(Birthday) < 18; three-year period from 1990 to 1993 refers to year(`Examination Date`) between '1990' and '1993'", "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1990' AND '1993' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.Birthday) < 18", "note": "Join `Patient` and `Examination` on `Patient.ID = Examination.ID`. Filter for patients where `year(Birthday) < 18` (underage) and `year(Examination.Date) between '1990' and '1993'`. Use `COUNT(DISTINCT Patient.ID)` to count unique patients. Note: `Examination.Date` is in the `Examination` table, and `Birthday` is in the `Patient` table. The `year()` function applies to both columns. Ensure dates are in the correct format (YYYY-MM-DD). The hint refers to filtering by the examination date range and age at birth.", "note_tokens": 137, "note_has_sql": false, "schema_tokens": 1376, "gold_error": null, "none_sql": "SELECT COUNT(*) \nFROM patients \nWHERE EXAMINATION_DATE BETWEEN '1990-01-01' AND '1993-12-31' \n AND AGE < 18;", "none_error": "no such table: patients", "none_ok": false, "text_sql": "SELECT COUNT(DISTINCT Patient.ID)\nFROM Patient\nJOIN Examination ON Patient.ID = Examination.ID\nWHERE YEAR(Patient.Birthday) < 18\n AND YEAR(Examination.Date) BETWEEN '1990' AND '1993';", "text_error": "no such function: YEAR", "text_ok": false, "full_sql": "SELECT COUNT(DISTINCT p.ID)\nFROM Patient p\nJOIN Examination e ON p.ID = e.ID\nWHERE YEAR(p.Birthday) < 18\n AND YEAR(e.`Examination Date`) BETWEEN 1990 AND 1993;", "full_error": "no such function: YEAR", "full_ok": false} {"question_id": 169, "db_id": "financial", "difficulty": "challenging", "question": "What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?", "evidence": "Growth rate = (sum of amount_1997 - sum of amount_1996) / (sum of amount_1996) * 100%; Male refers to gender = 'M'", "gold_sql": "SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T3.account_id = T2.account_id INNER JOIN client AS T4 ON T4.client_id = T3.client_id WHERE T4.gender = 'M' AND T3.type = 'OWNER'", "note": "Your query should join `loan`, `client`, and `account` tables. Use `client.client_id` to link to `disp.client_id`, then `disp.account_id` to link to `loan.account_id`. Filter for `client.gender = 'M'` (Male). Focus on `loan.date` between 1996 and 1997. Calculate total loan amounts for 1996 and 1997. Use `SUM(loan.amount)` for each year. The hint means you should calculate the growth rate using the formula: (sum_1997 - sum_1996) / sum_1996 * 100. Ensure dates are in `YYYY-MM-DD` format. Use `WHERE loan.date BETWEEN '1996-01-01' AND '1997-12-31'`.", "note_tokens": 188, "note_has_sql": false, "schema_tokens": 1564, "gold_error": null, "none_sql": "SELECT \n (SUM(CAST(loan_amount AS REAL)) OVER (PARTITION BY client_id ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) \n - SUM(CAST(loan_amount AS REAL)) OVER (PARTITION BY client_id ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW - 1)) / \n SUM(CAST(loan_amount AS REAL)) OVER (PARTITION BY client_id ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW - 1) * 100 AS growth_rate\nFROM (\n SELECT \n client_id, \n year, \n loan_amount\n FROM loans\n WHERE client_gender = 'Male' \n AND year BETWEEN 1996 AND 1997\n) sub\nWHERE year = 1997;", "none_error": "near \"-\": syntax error", "none_ok": false, "text_sql": "SELECT \n ((SUM(CASE WHEN strftime('%Y', loan.date) = '1997' THEN loan.amount ELSE 0 END) \n - SUM(CASE WHEN strftime('%Y', loan.date) = '1996' THEN loan.amount ELSE 0 END)) \n / SUM(CASE WHEN strftime('%Y', loan.date) = '1996' THEN loan.amount ELSE 0 END)) * 100 AS growth_rate\nFROM \n loan\nJOIN \n client ON loan.client_id = client.client_id\nJOIN \n account ON loan.account_id = account.account_id\nWHERE \n client.gender = 'M'\n AND loan.date BETWEEN '1996-01-01' AND '1997-12-31';", "text_error": "no such column: loan.client_id", "text_ok": false, "full_sql": "SELECT \n (SUM(CASE WHEN YEAR(date) = 1997 THEN amount ELSE 0 END) - SUM(CASE WHEN YEAR(date) = 1996 THEN amount ELSE 0 END)) / SUM(CASE WHEN YEAR(date) = 1996 THEN amount ELSE 0 END) * 100 AS growth_rate\nFROM \n loan\nWHERE \n account_id IN (\n SELECT \n account_id \n FROM \n disp \n WHERE \n client_id IN (\n SELECT \n client_id \n FROM \n client \n WHERE \n gender = 'M' AND YEAR(birth_date) BETWEEN 1996 AND 1997\n )\n );", "full_error": "no such function: YEAR", "full_ok": false} {"question_id": 769, "db_id": "superhero", "difficulty": "challenging", "question": "Which superhero has the most durability published by Dark Horse Comics?", "evidence": "which superhero refers to superhero_name; most durability refers to MAX(attribute_value) WHERE attribute_name = 'durability'; published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';", "gold_sql": "SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T3.id = T2.attribute_id INNER JOIN publisher AS T4 ON T4.id = T1.publisher_id WHERE T4.publisher_name = 'Dark Horse Comics' AND T3.attribute_name = 'Durability' ORDER BY T2.attribute_value DESC LIMIT 1", "note": "Your teammate needs to find the superhero with the highest durability (attribute_value) from the `hero_attribute` table where the attribute_name is 'durability', and the superhero's publisher is 'Dark Horse Comics'. \n\nJoin `superhero` with `hero_attribute` on `superhero.id = hero_attribute.hero_id`. Use `attribute.attribute_name = 'durability'` to filter the attribute. Filter `publisher.publisher_name = 'Dark Horse Comics'`. The `publisher` table is linked to `superhero` via `superhero.publisher_id = publisher.id`. \n\nThe `attribute` table has `attribute_name` values, and the `hero_attribute` table has `attribute_value`. Use `MAX(attribute_value)` to find the highest durability. Ensure to quote column names with spaces using backticks.", "note_tokens": 162, "note_has_sql": false, "schema_tokens": 865, "gold_error": null, "none_sql": "SELECT superhero, COUNT(*) as durability_count\nFROM comics\nWHERE publisher = 'Dark Horse Comics'\nGROUP BY superhero\nORDER BY durability_count DESC\nLIMIT 1;", "none_error": "no such table: comics", "none_ok": false, "text_sql": "SELECT \n `superhero`.`name` AS `superhero_name`, \n MAX(`hero_attribute`.`attribute_value`) AS `max_durability`\nFROM \n `superhero`\nJOIN \n `hero_attribute` ON `superhero`.`id` = `hero_attribute`.`hero_id`\nJOIN \n `publisher` ON `superhero`.`publisher_id` = `publisher`.`id`\nWHERE \n `publisher`.`publisher_name` = 'Dark Horse Comics'\n AND `hero_attribute`.`attribute_name` = 'durability'\nGROUP BY \n `superhero`.`name`;", "text_error": "no such column: superhero.name", "text_ok": false, "full_sql": "SELECT s.superhero_name, MAX(ha.attribute_value) as max_durability\nFROM superhero s\nJOIN hero_attribute ha ON s.id = ha.hero_id\nJOIN attribute a ON ha.attribute_id = a.id\nJOIN publisher p ON s.publisher_id = p.id\nWHERE a.attribute_name = 'durability' AND p.publisher_name = 'Dark Horse Comics'\nGROUP BY s.id\nORDER BY max_durability DESC\nLIMIT 1;", "full_error": null, "full_ok": false} {"question_id": 1302, "db_id": "thrombosis_prediction", "difficulty": "challenging", "question": "For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?", "evidence": "normal range of creatinine phosphokinase refers to CPK < 250; positive measure of degree of coagulation refers to KCT = '+' or RVVT = '+' or LAC = '+' ;", "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.CPK < 250 AND (T3.KCT = '+' OR T3.RVVT = '+' OR T3.LAC = '+')", "note": "Join `Patient` with `Examination` on `Patient.ID = Examination.ID`. Use `Laboratory` to find CPK values (CPK < 250 for normal range). Use `Laboratory` to check for positive coagulation measures: `KCT = '+' OR RVVT = '+' OR LAC = '+'`. Filter patients where CPK is normal and coagulation is positive. Count the number of such patients. Note: `Laboratory.ID` must match `Patient.ID` for the coagulation data. Use `Examination.ID` to link to `Patient.ID`.", "note_tokens": 123, "note_has_sql": false, "schema_tokens": 1376, "gold_error": null, "none_sql": "SELECT COUNT(*) \nFROM patients \nWHERE creatinine_phosphokinase = 'normal' \n AND coagulation_degree = 'positive';", "none_error": "no such table: patients", "none_ok": false, "text_sql": "SELECT COUNT(*) \nFROM Patient \nJOIN Examination ON Patient.ID = Examination.ID \nJOIN Laboratory ON Laboratory.ID = Patient.ID \nWHERE Laboratory.CPK < 250 \n AND (Laboratory.KCT = '+' OR Laboratory.RVVT = '+' OR Laboratory.LAC = '+');", "text_error": "no such column: Laboratory.KCT", "text_ok": false, "full_sql": "SELECT COUNT(*) \nFROM Patient \nJOIN Examination ON Patient.ID = Examination.ID \nJOIN Laboratory ON Patient.ID = Laboratory.ID \nWHERE Laboratory.CPK < 250 \n AND (Examination.KCT = '+' OR Examination.RVVT = '+' OR Examination.LAC = '+');", "full_error": null, "full_ok": true} {"question_id": 1243, "db_id": "thrombosis_prediction", "difficulty": "challenging", "question": "For all patients who are older than 55 years old, what is the percentage of female who has abnormal prothrombin time (PT)?", "evidence": "older than 55 years old = SUBTRACT(year(current_timestamp), year(Birthday)) > 55; abnormal prothrombin time (PT) refers to PT > = 14; percentage = DIVIDE(SUM(PT > = 14 AND SEX = 'F'), SUM(PT > = 14)) * 100; female refers to sex = 'F'; ", "gold_sql": "SELECT CAST(SUM(CASE WHEN T2.PT >= 14 AND T1.SEX = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) > 55", "note": "Join `Patient` and `Laboratory` on `Patient.ID = Laboratory.ID`. Use `Patient.Birthday` to determine age with the hint formula. Filter for patients older than 55. In `Laboratory`, check for `PT >= 14` (abnormal PT). Count females with abnormal PT and divide by total abnormal PT cases, then multiply by 100 for percentage. Use `SEX = 'F'` for females. Column names must be quoted with backticks for spaces, e.g., `First Date`, `T-BIL`, `T-CHO`, etc.", "note_tokens": 123, "note_has_sql": false, "schema_tokens": 1376, "gold_error": null, "none_sql": "SELECT \n (COUNT(CASE WHEN gender = 'F' AND pt_result = 'abnormal' THEN 1 END) * 100.0 / COUNT(*)) AS female_abnormal_pt_percentage\nFROM \n patients\nWHERE \n age > 55;", "none_error": "no such table: patients", "none_ok": false, "text_sql": "SELECT \n (COUNT(CASE WHEN `Patient`.SEX = 'F' AND `Laboratory`.PT >= 14 THEN 1 END) * 100.0 / COUNT(CASE WHEN `Laboratory`.PT >= 14 THEN 1 END)) AS percentage\nFROM \n `Patient`\nJOIN \n `Laboratory` ON `Patient`.ID = `Laboratory`.ID\nWHERE \n strftime('%Y', datetime('now')) - strftime('%Y', `Patient`.Birthday) > 55\n AND `Laboratory`.PT >= 14;", "text_error": null, "text_ok": false, "full_sql": "SELECT \n (COUNT(CASE WHEN SEX = 'F' AND PT >= 14 THEN 1 END) * 100.0 / COUNT(CASE WHEN PT >= 14 THEN 1 END)) AS percentage\nFROM \n Laboratory\nWHERE \n ID IN (\n SELECT ID\n FROM Patient\n WHERE \n SUBTRACT(year(current_timestamp), year(Birthday)) > 55\n );", "full_error": "no such column: SEX", "full_ok": false} {"question_id": 1139, "db_id": "european_football_2", "difficulty": "challenging", "question": "What was the final score for the match on September 24, 2008, in the Belgian Jupiler League between the home team and the away team?", "evidence": "September 24, 2008 refers to date like '2008-09-24%'; in the Belgian Jupiler League refers to League.name = 'Belgium Jupiler League'; final score for home team refers to home_team_goal; final score for away team refers to away_team_goal", "gold_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%'", "note": "Join `Match` with `League` on `League.id = Match.league_id` to find the match in the \"Belgium Jupiler League\". Use the date filter `date LIKE '2008-09-24%'`. Once identified, retrieve `home_team_goal` and `away_team_goal` from the `Match` table. The hint indicates that \"Belgian Jupiler League\" is the league name, and the date format is '2008-09-24%'.", "note_tokens": 110, "note_has_sql": false, "schema_tokens": 4541, "gold_error": null, "none_sql": "SELECT home_team_score, away_team_score\nFROM matches\nWHERE match_date = '2008-09-24' AND league = 'Belgian Jupiler League';", "none_error": "no such table: matches", "none_ok": false, "text_sql": "SELECT Match.home_team_goal, Match.away_team_goal\nFROM Match\nJOIN League ON League.id = Match.league_id\nWHERE League.name = 'Belgian Jupiler League'\n AND Match.date LIKE '2008-09-24%';", "text_error": null, "text_ok": false, "full_sql": "SELECT home_team_goal, away_team_goal\nFROM Match\nWHERE date LIKE '2008-09-24%' AND League.name = 'Belgium Jupiler League';", "full_error": "no such column: League.name", "full_ok": false} {"question_id": 896, "db_id": "formula_1", "difficulty": "challenging", "question": "Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010.", "evidence": "percentage = DIVIDE(COUNT(raceId) where surname = 'Hamilton' and position>1), (COUNT(raceId) where surname = 'Hamilton'); since 2010 refers to year >= 2010", "gold_sql": "SELECT CAST(COUNT(CASE WHEN T2.position <> 1 THEN T2.position END) AS REAL) * 100 / COUNT(T2.driverStandingsId) FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.surname = 'Hamilton' AND T1.year >= 2010", "note": "Join `drivers` with `driverStandings` on `driverId`, then filter for drivers with `surname = 'Hamilton'` and `year >= 2010`. Use the `position` column to determine if the driver was not in 1st place. The `position` column represents the final position in the race. Count the number of races where `position > 1` (not 1st) and divide by the total number of races where `surname = 'Hamilton'` and `year >= 2010`. The `year` is found in the `races` table, which is linked to `driverStandings` via `raceId`. Use the `year` column in the `races` table to apply the \"since 2010\" filter.", "note_tokens": 167, "note_has_sql": false, "schema_tokens": 2657, "gold_error": null, "none_sql": "SELECT \n (100.0 * COUNT(CASE WHEN track = '1st track' THEN 1 END)) / COUNT(*) AS percentage\nFROM \n f1_results\nWHERE \n driver = 'Hamilton' AND year >= 2010;", "none_error": "no such table: f1_results", "none_ok": false, "text_sql": "SELECT \n (COUNT(CASE WHEN position > 1 THEN 1 END) * 100.0 / COUNT(*)) AS percentage\nFROM \n driverStandings\nJOIN \n drivers ON driverStandings.driverId = drivers.driverId\nJOIN \n races ON driverStandings.raceId = races.raceId\nWHERE \n drivers.surname = 'Hamilton' \n AND races.year >= 2010;", "text_error": null, "text_ok": true, "full_sql": "SELECT \n (COUNT(CASE WHEN position > 1 THEN 1 END) * 100.0 / COUNT(*)) AS percentage\nFROM \n driverStandings\nWHERE \n driverId = (SELECT driverId FROM drivers WHERE surname = 'Hamilton')\n AND raceId IN (SELECT raceId FROM races WHERE year >= 2010);", "full_error": null, "full_ok": true} {"question_id": 939, "db_id": "formula_1", "difficulty": "moderate", "question": "How many drivers from the UN participated in the 2008 Australian Grand Prix?", "evidence": "from the UN refers to nationality = 'British'", "gold_sql": "SELECT COUNT(*) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T1.nationality = 'British' AND T3.year = 2008", "note": "Your teammate needs to find the number of drivers from the UN (nationality = 'British') who participated in the 2008 Australian Grand Prix. \n\n**Tables to use:** `drivers`, `races`, and `results`. \n**Columns to use:** \n- `drivers.nationality` (filter for 'British') \n- `races.name` (filter for 'Australian Grand Prix') \n- `races.year` (filter for 2008) \n- `results.driverId` (join with `drivers.driverId`) \n\n**Join logic:** \n- Join `results` with `races` on `results.raceId = races.raceId` \n- Join `results` with `drivers` on `results.driverId = drivers.driverId` \n- Filter where `races.name = 'Australian Grand Prix'`, `races.year = 2008`, and `drivers.nationality = 'British'` \n\n**Value formats:** \n- `nationality` is a text field with value 'British'. \n- `races.name` and `races.year` are used to filter the correct race. \n\n**Hint explanation:** The \"UN\" refers to the nationality 'British'.", "note_tokens": 257, "note_has_sql": false, "schema_tokens": 2657, "gold_error": null, "none_sql": "SELECT COUNT(*) FROM drivers WHERE team = 'UN' AND race = '2008 Australian Grand Prix';", "none_error": "no such column: team", "none_ok": false, "text_sql": "SELECT COUNT(*) \nFROM results \nJOIN races ON results.raceId = races.raceId \nJOIN drivers ON results.driverId = drivers.driverId \nWHERE races.name = 'Australian Grand Prix' \n AND races.year = 2008 \n AND drivers.nationality = 'British';", "text_error": null, "text_ok": true, "full_sql": "SELECT COUNT(*) \nFROM drivers \nWHERE nationality = 'British' \n AND driverId IN (\n SELECT driverId \n FROM results \n WHERE raceId = (\n SELECT raceId \n FROM races \n WHERE name = 'Australian Grand Prix' AND year = 2008\n )\n);", "full_error": null, "full_ok": true} {"question_id": 692, "db_id": "codebase_community", "difficulty": "moderate", "question": "How long did it take the user, known by his or her display name 'Zolomon' to get the badge? Count from the date the user's account was created.", "evidence": "SUBTRACT(Date from stats_badges, CreationDate) where DisplayName = 'Zolomon';", "gold_sql": "SELECT T1.Date - T2.CreationDate FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Zolomon'", "note": "Your teammate needs to find the time difference between the user 'Zolomon's account creation date and the date they received their first badge. Here's what to use:\n\n- **Users** table: Use `DisplayName` to find the user with the name 'Zolomon'. Get their `CreationDate` from this table.\n- **Badges** table: Find the earliest `Date` for the user (use `UserId` to join). Use `Date` as the badge date.\n- Join **users** and **badges** on `users.Id = badges.UserId`.\n- Subtract `CreationDate` (from users) from `Date` (from badges) to calculate the time difference.\n- The hint refers to the `Date` column in the badges table and the `CreationDate` in the users table. Ensure the date format is consistent (DATETIME).", "note_tokens": 176, "note_has_sql": false, "schema_tokens": 2430, "gold_error": null, "none_sql": "SELECT strftime('%Y-%m-%d', date('now')) - strftime('%Y-%m-%d', account_created) AS duration_days\nFROM users\nWHERE display_name = 'Zolomon';", "none_error": "no such column: account_created", "none_ok": false, "text_sql": "SELECT \n JULIANDAY(badge.Date) - JULIANDAY(user.CreationDate) AS days_since_creation\nFROM \n Users user\nJOIN \n Badges badge ON user.Id = badge.UserId\nWHERE \n user.DisplayName = 'Zolomon'\nORDER BY \n badge.Date ASC\nLIMIT 1;", "text_error": null, "text_ok": false, "full_sql": "SELECT \n JULIANDAY(badges.Date) - JULIANDAY(users.CreationDate) AS days_to_get_badge\nFROM \n badges\nJOIN \n users ON badges.UserId = users.Id\nWHERE \n users.DisplayName = 'Zolomon';", "full_error": null, "full_ok": false} {"question_id": 1109, "db_id": "european_football_2", "difficulty": "moderate", "question": "How was the build up play dribbling class for \"LEI\" on 2015/9/10?", "evidence": "\"LEI\" refers to team_short_name = 'LEI'; on 2015/9/10 refers to\u00a0 date = '2015-09-10 00:00:00'", "gold_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 SUBSTR(t2.`date`, 1, 10) = '2015-09-10'", "note": "Join `Team_Attributes` with `Team` to find the team with `team_short_name` = 'LEI'. Filter for the row where `date` = '2015-09-10 00:00:00'. The column `buildUpPlayDribblingClass` gives the answer. Use `team_short_name` from `Team` and `date` from `Team_Attributes`.", "note_tokens": 90, "note_has_sql": false, "schema_tokens": 4541, "gold_error": null, "none_sql": "SELECT build_up_play_dribbling_class\nFROM matches\nWHERE team_abbr = 'LEI' AND date = '2015-09-10';", "none_error": "no such table: matches", "none_ok": false, "text_sql": "SELECT Team_Attributes.buildUpPlayDribblingClass\nFROM Team_Attributes\nJOIN Team ON Team_Attributes.team_short_name = Team.team_short_name\nWHERE Team_Attributes.date = '2015-09-10 00:00:00'\n AND Team.team_short_name = 'LEI';", "text_error": "no such column: Team_Attributes.team_short_name", "text_ok": false, "full_sql": "SELECT buildUpPlayDribblingClass\nFROM Team_Attributes\nWHERE team_short_name = 'LEI'\n AND date = '2015-09-10 00:00:00';", "full_error": "no such column: team_short_name", "full_ok": false} {"question_id": 1506, "db_id": "debit_card_specializing", "difficulty": "moderate", "question": "Please list the product descriptions of the transactions taken place in the gas stations in the Czech Republic.", "evidence": "Czech Republic can be represented as the Country value in the gasstations table is 'CZE'; ", "gold_sql": "SELECT DISTINCT T3.Description FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Country = 'CZE'", "note": "Your teammate needs to join the `gasstations` table with the `transactions_1k` table on `GasStationID`, filter for `Country = 'CZE'`, and then join with the `products` table on `ProductID` to get the descriptions. Use backticks for `yearmonth` (though it's not needed here). The `Country` column in `gasstations` is the key for the hint. Make sure to use the exact column names: `GasStationID`, `Country`, `ProductID`, and `Description`. The `transactions_1k` table contains the transaction data, and `products` provides the descriptions. No need to use the `yearmonth` table for this query.", "note_tokens": 148, "note_has_sql": false, "schema_tokens": 589, "gold_error": null, "none_sql": "SELECT product_description\nFROM transactions\nJOIN gas_stations ON transactions.gas_station_id = gas_stations.id\nWHERE gas_stations.country = 'Czech Republic';", "none_error": "no such table: transactions", "none_ok": false, "text_sql": "SELECT products.Description\nFROM transactions_1k\nJOIN gasstations ON transactions_1k.GasStationID = gasstations.GasStationID\nJOIN products ON transactions_1k.ProductID = products.ProductID\nWHERE gasstations.Country = 'CZE';", "text_error": null, "text_ok": true, "full_sql": "SELECT p.Description\nFROM transactions_1k t\nJOIN gasstations g ON t.GasStationID = g.GasStationID\nJOIN products p ON t.ProductID = p.ProductID\nWHERE g.Country = 'CZE';", "full_error": null, "full_ok": true} {"question_id": 360, "db_id": "card_games", "difficulty": "moderate", "question": "cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question\nWhat are the languages available for the set that card 'Angel of Mercy' is in?", "evidence": "Angel of Mercy' is the name of card;", "gold_sql": "SELECT language FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )", "note": "Your teammate needs to find the languages associated with the set that contains the card \"Angel of Mercy\". Here's what they need:\n\n- **Tables to use**: `cards`, `sets`, and `set_translations`.\n- **Columns**: \n - From `cards`: `uuid` (for the card \"Angel of Mercy\").\n - From `sets`: `code` (to link to `set_translations`).\n - From `set_translations`: `language` (the desired output).\n- **Join logic**: \n - Join `cards` to `sets` on `cards.uuid = sets.uuid` (but `sets` doesn't have a `uuid` column\u2014use `cards.uuid` to link to `sets.uuid` if it exists, or use `cards.uuid` to find the set code via `cards.setCode`).\n - Join `sets` to `set_translations` on `sets.code = set_translations.setCode`.\n- **Value formats**: Use the `language` column from `set_translations` for the result.\n- **Hint**: The card \"Angel of Mercy\" is in the set with code `10E` (from the example rows). Use that to find the set's translations.", "note_tokens": 253, "note_has_sql": false, "schema_tokens": 3378, "gold_error": null, "none_sql": "SELECT DISTINCT language\nFROM set\nJOIN cards ON set.set_id = cards.set_id\nWHERE cards.card_name = 'Angel of Mercy';", "none_error": "near \"set\": syntax error", "none_ok": false, "text_sql": "SELECT set_translations.language\nFROM cards\nJOIN sets ON cards.uuid = sets.uuid\nJOIN set_translations ON sets.code = set_translations.setCode\nWHERE cards.uuid = 'Angel of Mercy';", "text_error": "no such column: sets.uuid", "text_ok": false, "full_sql": "SELECT DISTINCT set_translations.language\nFROM cards\nJOIN sets ON cards.setCode = sets.code\nJOIN set_translations ON sets.code = set_translations.setCode\nWHERE cards.name = 'Angel of Mercy';", "full_error": null, "full_ok": false} {"question_id": 995, "db_id": "formula_1", "difficulty": "moderate", "question": "What is the average score of Lewis Hamilton among all the Turkish Grand Prix?", "evidence": "Average score = AVG(points)", "gold_sql": "SELECT AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T3.name = 'Turkish Grand Prix'", "note": "Your teammate needs to find the average score (points) of Lewis Hamilton in all races called the \"Turkish Grand Prix.\" Here's what to use:\n\n- **Tables**: `drivers`, `races`, `results`\n- **Columns**:\n - `drivers.driverRef` to find Lewis Hamilton (`'hamilton'`)\n - `races.name` to filter for \"Turkish Grand Prix\"\n - `results.points` to calculate the average\n- **Join**:\n - Join `drivers` with `results` on `drivers.driverId = results.driverId`\n - Join `races` with `results` on `races.raceId = results.raceId`\n- **Filter**:\n - `drivers.driverRef = 'hamilton'`\n - `races.name = 'Turkish Grand Prix'`\n- **Hint**: Use `AVG(points)` to calculate the average score.", "note_tokens": 190, "note_has_sql": false, "schema_tokens": 2657, "gold_error": null, "none_sql": "SELECT AVG(score) AS average_score\nFROM race_results\nWHERE driver = 'Lewis Hamilton' AND circuit = 'Turkish Grand Prix';", "none_error": "no such table: race_results", "none_ok": false, "text_sql": "SELECT AVG(results.points) \nFROM drivers \nJOIN results ON drivers.driverId = results.driverId \nJOIN races ON races.raceId = results.raceId \nWHERE drivers.driverRef = 'hamilton' AND races.name = 'Turkish Grand Prix';", "text_error": null, "text_ok": false, "full_sql": "SELECT AVG(r.points) AS average_score\nFROM results r\nJOIN drivers d ON r.driverId = d.driverId\nWHERE d.forename = 'Lewis' AND d.surname = 'Hamilton' AND r.name = 'Turkish Grand Prix';", "full_error": "no such column: r.name", "full_ok": false} {"question_id": 222, "db_id": "toxicology", "difficulty": "moderate", "question": "What is the difference between the number of molecules that are carcinogenic and those that are not?", "evidence": "label = '+' means molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; difference = SUBTRACT(SUM(label = '+'), SUM(label = '-'))", "gold_sql": "SELECT COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) - COUNT(CASE WHEN T.label = '-' THEN T.molecule_id ELSE NULL END) AS diff_car_notcar FROM molecule t", "note": "Your teammate needs to calculate the difference between the number of carcinogenic and non-carcinogenic molecules. The `molecule` table contains the `label` column, where '+' indicates carcinogenic and '-' indicates non-carcinogenic. The hint refers to using `SUM(label = '+')` and `SUM(label = '-')` to count the rows where the label matches each value. The tables do not need to be joined because the question is purely about the `molecule` table. Use the `label` column directly. Ensure the query uses the correct column name and handles the comparison correctly. The result is the difference between the count of '+' and '-'.", "note_tokens": 134, "note_has_sql": false, "schema_tokens": 492, "gold_error": null, "none_sql": "SELECT \n (SELECT COUNT(*) FROM molecules WHERE is_carcinogenic = 1) - \n (SELECT COUNT(*) FROM molecules WHERE is_carcinogenic = 0) AS difference;", "none_error": "no such table: molecules", "none_ok": false, "text_sql": "SELECT SUM(label = '+') - SUM(label = '-') AS difference;", "text_error": "no such column: label", "text_ok": false, "full_sql": "SELECT SUM(CASE WHEN label = '+' THEN 1 ELSE 0 END) - SUM(CASE WHEN label = '-' THEN 1 ELSE 0 END) AS difference\nFROM molecule;", "full_error": null, "full_ok": true} {"question_id": 500, "db_id": "card_games", "difficulty": "moderate", "question": "Tell the Japanese name of the set which card \"Fellwar Stone\" is in it.", "evidence": "Japanese name refers to language = 'Japanese'; card \"Fellwar Stone\" refers to name = 'Fellwar Stone'", "gold_sql": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Fellwar Stone' AND T2.language = 'Japanese' AND T2.translation IS NOT NULL", "note": "Your teammate needs to find the Japanese name of the set containing the card \"Fellwar Stone\". Here's what they need:\n\n- **Tables**: Use `cards` and `set_translations`.\n- **Columns**: \n - From `cards`: `uuid` (to link to `set_translations`).\n - From `set_translations`: `setCode` (to find the set code), `translation` (for the Japanese name), and `language` (filter for 'Japanese').\n- **Join**: Join `cards` on `uuid` with `set_translations` on `setCode` (from `cards.setCode` to `set_translations.setCode`).\n- **Filter**: Find the card with `name` = 'Fellwar Stone', then get the `setCode` from that row. Use that `setCode` to find the `translation` in `set_translations` where `language` = 'Japanese'.\n- **Hint**: The Japanese name is in the `translation` column for the set containing the card.", "note_tokens": 215, "note_has_sql": false, "schema_tokens": 3378, "gold_error": null, "none_sql": "SELECT JapaneseName\nFROM Sets\nWHERE CardName = 'Fellwar Stone';", "none_error": "no such column: JapaneseName", "none_ok": false, "text_sql": "SELECT set_translations.translation\nFROM cards\nJOIN set_translations ON cards.setCode = set_translations.setCode\nWHERE cards.name = 'Fellwar Stone' AND set_translations.language = 'Japanese';", "text_error": null, "text_ok": false, "full_sql": "SELECT st.translation\nFROM sets s\nJOIN set_translations st ON s.code = st.setCode\nWHERE s.code = (\n SELECT setCode\n FROM cards\n WHERE name = 'Fellwar Stone'\n);", "full_error": null, "full_ok": false} {"question_id": 256, "db_id": "toxicology", "difficulty": "simple", "question": "Calculate the total atoms consisting of the element carbon and hydrogen.", "evidence": "consisting of element carbon and hydrogen refers to element in('c', 'h')", "gold_sql": "SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.element = 'c' OR T.element = 'h'", "note": "Your teammate needs to count the number of atoms in the `atom` table where the `element` is either 'c' or 'h'. The `atom` table contains the `element` column, and the `atom_id` is the primary key. The `molecule_id` is a foreign key to the `molecule` table, but it is not needed for this query. Use the `COUNT(*)` function and filter using `element IN ('c', 'h')`. Make sure to quote the column names if they contain spaces, but in this case, all column names are valid. The hint refers to the `element` column and the allowed values 'c' and 'h'.", "note_tokens": 142, "note_has_sql": false, "schema_tokens": 492, "gold_error": null, "none_sql": "SELECT SUM(atom_count) AS total_atoms\nFROM elements\nWHERE element IN ('Carbon', 'Hydrogen');", "none_error": "no such table: elements", "none_ok": false, "text_sql": "SELECT COUNT(*) FROM atom WHERE element IN ('c', 'h');", "text_error": null, "text_ok": true, "full_sql": "SELECT COUNT(*) AS total_atoms\nFROM atom\nWHERE element IN ('c', 'h');", "full_error": null, "full_ok": true} {"question_id": 1286, "db_id": "thrombosis_prediction", "difficulty": "simple", "question": "For the patient with an abnormal alkaliphophatase level, how many of them are admitted to the hospital?", "evidence": "abnormal alkaliphophatase level refers to ALP > = 300; admitted to the hospital refers to Admission = '+';", "gold_sql": "SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP >= 300 AND T1.Admission = '+'", "note": "Join the `Laboratory` and `Patient` tables on `Laboratory.ID = Patient.ID`. Filter rows where `Laboratory.ALP >= 300` (abnormal ALP) and `Patient.Admission = '+'` (admitted to the hospital). Count the distinct `Patient.ID` values. The `Laboratory` table has multiple entries per patient, so use `DISTINCT` to avoid counting the same patient multiple times. The `Admission` column in `Patient` uses the value `+` to indicate admission. The `ALP` column in `Laboratory` is an integer.", "note_tokens": 126, "note_has_sql": false, "schema_tokens": 1376, "gold_error": null, "none_sql": "SELECT COUNT(*) \nFROM patients \nWHERE alkaliphophatase_level IS NOT NULL;", "none_error": "no such table: patients", "none_ok": false, "text_sql": "SELECT COUNT(DISTINCT Patient.ID)\nFROM Laboratory\nJOIN Patient ON Laboratory.ID = Patient.ID\nWHERE Laboratory.ALP >= 300 AND Patient.Admission = '+';", "text_error": null, "text_ok": false, "full_sql": "SELECT COUNT(*) \nFROM Patient \nWHERE ID IN (\n SELECT ID \n FROM Laboratory \n WHERE ALP >= 300\n) \nAND Admission = '+';", "full_error": null, "full_ok": false} {"question_id": 161, "db_id": "financial", "difficulty": "simple", "question": "What type of credit card does the client with the id 13539 own?", "evidence": "", "gold_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", "note": "Your teammate needs to find the type of credit card owned by client 13539. The `card` table links to the `disp` table via `disp_id`, and `disp` links to the `client` table via `client_id`. Join `card` to `disp` on `card.disp_id = disp.disp_id`, then join to `client` on `disp.client_id = client.client_id`. Filter where `client.client_id = 13539` and select the `card.type` column. The `type` column in the `card` table contains the credit card type (e.g., 'gold', 'classic'). Ensure to use backticks around `card.type` if needed.", "note_tokens": 151, "note_has_sql": true, "schema_tokens": 1564, "gold_error": null, "none_sql": "SELECT credit_card_type FROM clients WHERE client_id = 13539;", "none_error": "no such table: clients", "none_ok": false, "text_sql": "SELECT `card`.type\nFROM `card`\nJOIN `disp` ON `card`.disp_id = `disp`.disp_id\nJOIN `client` ON `disp`.client_id = `client`.client_id\nWHERE `client`.client_id = 13539;", "text_error": null, "text_ok": true, "full_sql": "SELECT card.type\nFROM card\nJOIN disp ON card.card_id = disp.card_id\nJOIN client ON disp.client_id = client.client_id\nWHERE client.client_id = 13539;", "full_error": "no such column: disp.card_id", "full_ok": false} {"question_id": 966, "db_id": "formula_1", "difficulty": "simple", "question": "How many driver participated in race ID number 18?", "evidence": "", "gold_sql": "SELECT COUNT(driverId) FROM driverStandings WHERE raceId = 18", "note": "Your teammate needs to find the number of unique drivers who participated in race with `raceId = 18`. \n\n**Tables to use**: `races`, `results`, `drivers` \n**Columns**: \n- `races.raceId` (join key) \n- `results.raceId`, `results.driverId` (to find drivers in the race) \n- `drivers.driverId` (to ensure unique drivers) \n\n**Join**: Join `races` with `results` on `races.raceId = results.raceId`, then join with `drivers` on `results.driverId = drivers.driverId`. \n\n**Value format**: `raceId` is an integer. Use `COUNT(DISTINCT drivers.driverId)` to count unique drivers. \n\n**Hint**: The hint refers to the `results` table, where each row represents a driver's performance in a race. To find how many drivers participated, count the distinct `driverId` values in the `results` table for `raceId = 18`.", "note_tokens": 216, "note_has_sql": false, "schema_tokens": 2657, "gold_error": null, "none_sql": "SELECT COUNT(*) FROM driver WHERE driver_id IN (SELECT driver_id FROM race_result WHERE race_id = 18);", "none_error": "no such table: driver", "none_ok": false, "text_sql": "SELECT COUNT(DISTINCT results.driverId)\nFROM results\nWHERE results.raceId = 18;", "text_error": null, "text_ok": false, "full_sql": "SELECT COUNT(DISTINCT driverId) AS numberOfDrivers\nFROM results\nWHERE raceId = 18;", "full_error": null, "full_ok": false} {"question_id": 1365, "db_id": "student_club", "difficulty": "simple", "question": "What are the expenses of the budget with the lowest remaining?", "evidence": "expense of budget refers to expense_description; lowest remaining refers to MIN(remaining)", "gold_sql": "SELECT T2.expense_description FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget ORDER BY T1.remaining LIMIT 1", "note": "Join `budget` with `expense` on `budget.budget_id = expense.link_to_budget`. Use `MIN(remaining)` to find the budget with the lowest remaining balance. The `expense_description` column in the `expense` table contains the expense details. Filter results to only include expenses linked to the budget with the lowest remaining value. The `remaining` column in the `budget` table is a real number, so ensure proper formatting when interpreting values. Use `expense_description` to identify the specific expenses.", "note_tokens": 104, "note_has_sql": false, "schema_tokens": 1681, "gold_error": null, "none_sql": "SELECT expenses\nFROM budget\nORDER BY remaining ASC\nLIMIT 1;", "none_error": "no such column: expenses", "none_ok": false, "text_sql": "SELECT expense.expense_description, expense.remaining\nFROM expense\nJOIN budget ON budget.budget_id = expense.link_to_budget\nWHERE budget.budget_id = (\n SELECT budget.budget_id\n FROM budget\n ORDER BY remaining ASC\n LIMIT 1\n);", "text_error": "no such column: expense.remaining", "text_ok": false, "full_sql": "SELECT e.expense_description, b.remaining\nFROM expense e\nJOIN budget b ON e.link_to_budget = b.budget_id\nWHERE b.remaining = (SELECT MIN(remaining) FROM budget);", "full_error": null, "full_ok": false} {"question_id": 424, "db_id": "card_games", "difficulty": "simple", "question": "What proportion of cards do not have a text box with a normal layout?", "evidence": "do not have a text box refers to isTextless = 1; proportion refers to DIVIDE(COUNT(Textless = 1 and layout = 'normal'),COUNT(Textless))*100", "gold_sql": "SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards", "note": "Join the \"cards\" table with the \"legalities\" table on the \"uuid\" column. Use the \"isTextless\" column to identify cards without a text box, and the \"layout\" column to filter for \"normal\" layout. The \"hint\" means you need to calculate the percentage of cards that are both \"isTextless = 1\" and \"layout = 'normal'\". Use COUNT() with conditions for the numerator and COUNT() without conditions for the denominator. Ensure to format the result as a percentage.", "note_tokens": 108, "note_has_sql": false, "schema_tokens": 3378, "gold_error": null, "none_sql": "SELECT COUNT(*) * 1.0 / (SELECT COUNT(*) FROM cards) AS proportion\nFROM cards\nWHERE text_box_layout != 'normal';", "none_error": "no such column: text_box_layout", "none_ok": false, "text_sql": "SELECT \n (COUNT(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 END) * 100.0 / COUNT(*)) AS proportion\nFROM \n cards\nJOIN \n legalities ON cards.uuid = legalities.uuid;", "text_error": null, "text_ok": false, "full_sql": "SELECT \n (COUNT(CASE WHEN isTextless = 1 AND layout = 'normal' END) * 100.0) / COUNT(*) AS proportion\nFROM cards;", "full_error": "near \"END\": syntax error", "full_ok": false} {"question_id": 841, "db_id": "superhero", "difficulty": "simple", "question": "Provide the weight and race of the superhero with superhero ID 40.", "evidence": "weight refers to weight_kg; superhero ID 40 refers to superhero.id = 40;", "gold_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", "note": "Join the `superhero` table with the `race` table using `superhero.race_id = race.id`. Use the `weight_kg` column from the `superhero` table and the `race` column from the `race` table. The hint specifies that superhero ID 40 is in the `superhero.id` column. Ensure the `race` table's `id` matches the `race_id` from the `superhero` table. Use the exact column names as provided, including backticks for any with spaces. The `race` column in the `race` table contains the race name (e.g., \"Alien\", \"Alpha\", or \"-\").", "note_tokens": 140, "note_has_sql": false, "schema_tokens": 865, "gold_error": null, "none_sql": "SELECT weight, race FROM superheroes WHERE superhero_id = 40;", "none_error": "no such table: superheroes", "none_ok": false, "text_sql": "SELECT `superhero`.weight_kg, `race`.race\nFROM `superhero`\nJOIN `race` ON `superhero`.race_id = `race`.id\nWHERE `superhero`.id = 40;", "text_error": null, "text_ok": true, "full_sql": "SELECT weight_kg, race\nFROM superhero\nWHERE id = 40;", "full_error": "no such column: race", "full_ok": false} {"question_id": 1134, "db_id": "european_football_2", "difficulty": "simple", "question": "What is the difference between players 6 and 23's jumping scores?", "evidence": "difference between players 6 and 23's jumping scores refers to SUBTRACT(jumping AND id = 6,jumping AND id = 23)", "gold_sql": "SELECT SUM(CASE WHEN t1.id = 6 THEN t1.jumping ELSE 0 END) - SUM(CASE WHEN t1.id = 23 THEN t1.jumping ELSE 0 END) FROM Player_Attributes AS t1", "note": "Join `Player_Attributes` with `Player` on `player_api_id`. Use the `id` column to identify players 6 and 23. The `jumping` column in `Player_Attributes` contains the jumping scores. Subtract the `jumping` value for player 6 from the `jumping` value for player 23. Note that the `id` in `Player_Attributes` corresponds to the player's record in the table, not the `player_api_id`.", "note_tokens": 102, "note_has_sql": false, "schema_tokens": 4541, "gold_error": null, "none_sql": "SELECT (SELECT jump_score FROM players WHERE player_id = 6) - (SELECT jump_score FROM players WHERE player_id = 23) AS difference;", "none_error": "no such table: players", "none_ok": false, "text_sql": "SELECT (SELECT jumping FROM Player_Attributes WHERE Player.id = 23) - (SELECT jumping FROM Player_Attributes WHERE Player.id = 6) AS difference;", "text_error": "no such column: Player.id", "text_ok": false, "full_sql": "SELECT (SELECT jumping FROM Player_Attributes WHERE id = 6) - (SELECT jumping FROM Player_Attributes WHERE id = 23) AS difference;", "full_error": null, "full_ok": true}