output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT COUNT("draw") FROM "results" WHERE "artist"='de spelbrekers' AND "points"<0;
## Task Generate a SQL query to answer the following question: `Can you tell me the total number of Draw that has the Artist of de spelbrekers, and the Points smaller than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "draw" real, "language" text, "artist" text, "english_translation" text, "place" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the total number of Draw that has the Artist of de spelbrekers, and the Points smaller than 0?`: ```sql
SELECT "artist" FROM "results" WHERE "draw"<16 AND "english_translation"='lullaby';
## Task Generate a SQL query to answer the following question: `Can you tell me the Artist that has the Draw smaller than 16, and the English translation of lullaby?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "draw" real, "language" text, "artist" text, "english_translation" text, "place" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the Artist that has the Draw smaller than 16, and the English translation of lullaby?`: ```sql
SELECT "english_translation" FROM "results" WHERE "artist"='camillo felgen';
## Task Generate a SQL query to answer the following question: `Can you tell me the English translation that has the Artist of camillo felgen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "draw" real, "language" text, "artist" text, "english_translation" text, "place" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the English translation that has the Artist of camillo felgen?`: ```sql
SELECT AVG("population") FROM "communities" WHERE "area_km_2">3.09 AND "status"='town';
## Task Generate a SQL query to answer the following question: `What is the population of the town with an area larger than 3.09?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "communities" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population of the town with an area larger than 3.09?`: ```sql
SELECT AVG("area_km_2") FROM "communities" WHERE "census_ranking"='636 of 5,008';
## Task Generate a SQL query to answer the following question: `What is the area of the community with a census ranking of 636 of 5,008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "communities" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the area of the community with a census ranking of 636 of 5,008?`: ```sql
SELECT MAX("area_km_2") FROM "communities" WHERE "status"='village' AND "official_name"='drummond';
## Task Generate a SQL query to answer the following question: `What is the area of drummond village?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "communities" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the area of drummond village?`: ```sql
SELECT "status" FROM "communities" WHERE "census_ranking"='2,418 of 5,008';
## Task Generate a SQL query to answer the following question: `What is the status of the community with a census ranking of 2,418 of 5,008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "communities" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the status of the community with a census ranking of 2,418 of 5,008?`: ```sql
SELECT MAX("area_km_2") FROM "communities" WHERE "status"='village' AND "census_ranking"='1,442 of 5,008' AND "population"<'1,778';
## Task Generate a SQL query to answer the following question: `What is the area of the village with a census ranking of 1,442 of 5,008 and a population less than 1,778?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "communities" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the area of the village with a census ranking of 1,442 of 5,008 and a population less than 1,778?`: ```sql
SELECT "year_s_won" FROM "missed_the_cut" WHERE "to_par"<16 AND "total"=151;
## Task Generate a SQL query to answer the following question: `WHAT YEAR HAS A TO PAR SMALLER THAN 16, TOTAL 151?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "missed_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" real ); ### SQL Given the database schema, here is the SQL query that answers `WHAT YEAR HAS A TO PAR SMALLER THAN 16, TOTAL 151?`: ```sql
SELECT MAX("total") FROM "missed_the_cut" WHERE "to_par"=10;
## Task Generate a SQL query to answer the following question: `WHAT IS THE TOTAL WITH A TO PAR OF 10?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "missed_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" real ); ### SQL Given the database schema, here is the SQL query that answers `WHAT IS THE TOTAL WITH A TO PAR OF 10?`: ```sql
SELECT "player" FROM "missed_the_cut" WHERE "total"<151 AND "to_par"=8;
## Task Generate a SQL query to answer the following question: `WHAT IS THE PLAYER WITH TOTAL LESS THAN 151, TO PAR OF 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "missed_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" real ); ### SQL Given the database schema, here is the SQL query that answers `WHAT IS THE PLAYER WITH TOTAL LESS THAN 151, TO PAR OF 8?`: ```sql
SELECT "player" FROM "top_scorers" WHERE "total"<4 AND "scottish_cup"=0 AND "league_cup">0;
## Task Generate a SQL query to answer the following question: `Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "league_cup" real, "scottish_cup" real, "uefa_champions_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?`: ```sql
SELECT SUM("scottish_cup") FROM "top_scorers" WHERE "league_cup"<2 AND "total">6 AND "position"='forward';
## Task Generate a SQL query to answer the following question: `What is the sum of the scottish cup of the forward player with less than 2 league cups and a total greater than 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "league_cup" real, "scottish_cup" real, "uefa_champions_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the scottish cup of the forward player with less than 2 league cups and a total greater than 6?`: ```sql
SELECT "kilgore_r" FROM "opinion_polls" WHERE "potts_i"='4%' AND "kaine_d"='47%' AND "date"='october 30, 2005';
## Task Generate a SQL query to answer the following question: `What was Kilgore's percentage when Potts (I) had 4% and Kaine (D) 47%, in the poll from October 30, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Kilgore's percentage when Potts (I) had 4% and Kaine (D) 47%, in the poll from October 30, 2005?`: ```sql
SELECT "date" FROM "opinion_polls" WHERE "potts_i"='9%';
## Task Generate a SQL query to answer the following question: `On which date did Potts (I) poll at 9%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `On which date did Potts (I) poll at 9%?`: ```sql
SELECT "kaine_d" FROM "opinion_polls" WHERE "source"='rasmussen' AND "date"='october 24, 2005';
## Task Generate a SQL query to answer the following question: `What was Kaine's (D) percentage in the Rasmussen poll on October 24, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Kaine's (D) percentage in the Rasmussen poll on October 24, 2005?`: ```sql
SELECT "kaine_d" FROM "opinion_polls" WHERE "date"='october 30, 2005';
## Task Generate a SQL query to answer the following question: `What was Kaine's (D) percentage in the poll on October 30, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Kaine's (D) percentage in the poll on October 30, 2005?`: ```sql
SELECT "kilgore_r" FROM "opinion_polls" WHERE "potts_i"='1%';
## Task Generate a SQL query to answer the following question: `What was Kilgore's (R) percentage when Potts (I) polled at 1%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Kilgore's (R) percentage when Potts (I) polled at 1%?`: ```sql
SELECT "kaine_d" FROM "opinion_polls" WHERE "date"='september 19, 2005';
## Task Generate a SQL query to answer the following question: `What was Kaine's (D) percentage in the poll on september 19, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "source" text, "date" text, "kaine_d" text, "kilgore_r" text, "potts_i" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Kaine's (D) percentage in the poll on september 19, 2005?`: ```sql
SELECT "to_par" FROM "final_round" WHERE "country"='united states' AND "player"='jay haas';
## Task Generate a SQL query to answer the following question: `What is To par, when Country is "United States", and when Player is "Jay Haas"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What is To par, when Country is "United States", and when Player is "Jay Haas"?`: ```sql
SELECT "player" FROM "final_round" WHERE "score"='68-67-75-70=280';
## Task Generate a SQL query to answer the following question: `What is Player, when Score is "68-67-75-70=280"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What is Player, when Score is "68-67-75-70=280"?`: ```sql
SELECT "result" FROM "2010s" WHERE "competition"='friendly' AND "date"='23 january 2010';
## Task Generate a SQL query to answer the following question: `What is the result of the friendly competition on 23 January 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010s" ( "date" text, "result" text, "score" text, "venue" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the result of the friendly competition on 23 January 2010?`: ```sql
SELECT "venue" FROM "2010s" WHERE "result"='w' AND "date"='3 march 2010';
## Task Generate a SQL query to answer the following question: `What is the venue of the match with a w result on 3 March 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010s" ( "date" text, "result" text, "score" text, "venue" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the venue of the match with a w result on 3 March 2010?`: ```sql
SELECT MIN("year") FROM "women" WHERE "notes"='5.19km, 18controls';
## Task Generate a SQL query to answer the following question: `What is the lowest Year, when Notes is "5.19km, 18controls"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "year" real, "gold" text, "silver" text, "bronze" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest Year, when Notes is "5.19km, 18controls"?`: ```sql
SELECT "notes" FROM "women" WHERE "year"=2010;
## Task Generate a SQL query to answer the following question: `What is Notes, when Year is "2010"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "year" real, "gold" text, "silver" text, "bronze" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Notes, when Year is "2010"?`: ```sql
SELECT "winning_score" FROM "lpga_tour_wins_9" WHERE "runner_s_up"='in-kyung kim';
## Task Generate a SQL query to answer the following question: `What winning score has in-kyung kim as the runner(s)-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "to_par" text, "margin_of_victory" text, "runner_s_up" text, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `What winning score has in-kyung kim as the runner(s)-up?`: ```sql
SELECT "winning_score" FROM "lpga_tour_wins_9" WHERE "tournament"='kraft nabisco championship';
## Task Generate a SQL query to answer the following question: `What winning score has kraft nabisco championship as the tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_tour_wins_9" ( "date" text, "tournament" text, "winning_score" text, "to_par" text, "margin_of_victory" text, "runner_s_up" text, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `What winning score has kraft nabisco championship as the tournament?`: ```sql
SELECT "winning_constructor" FROM "other_grands_prix" WHERE "name"='grand prix de la marne';
## Task Generate a SQL query to answer the following question: `What Winning constructor has a Name of grand prix de la marne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What Winning constructor has a Name of grand prix de la marne?`: ```sql
SELECT "winning_driver" FROM "other_grands_prix" WHERE "circuit"='saint-raphaël';
## Task Generate a SQL query to answer the following question: `What kind of the Winning driver has a Circuit of saint-raphaël?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What kind of the Winning driver has a Circuit of saint-raphaël?`: ```sql
SELECT "report" FROM "other_grands_prix" WHERE "winning_constructor"='maserati' AND "name"='monza grand prix';
## Task Generate a SQL query to answer the following question: `Name the Report with Winning constructor of maserati, and a Name of monza grand prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the Report with Winning constructor of maserati, and a Name of monza grand prix?`: ```sql
SELECT "report" FROM "other_grands_prix" WHERE "name"='lyon grand prix';
## Task Generate a SQL query to answer the following question: `Name the Report has a Name of lyon grand prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the Report has a Name of lyon grand prix?`: ```sql
SELECT "report" FROM "other_grands_prix" WHERE "winning_driver"='heinrich-joachim von morgen';
## Task Generate a SQL query to answer the following question: `Name the Report which has heinrich-joachim von morgen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_grands_prix" ( "name" text, "circuit" text, "date" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the Report which has heinrich-joachim von morgen?`: ```sql
SELECT "player" FROM "draft_picks" WHERE "draft"<1975 AND "round"<6;
## Task Generate a SQL query to answer the following question: `Which player had a draft before 1975 and before round 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_picks" ( "draft" real, "round" real, "pick" real, "player" text, "nationality" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player had a draft before 1975 and before round 6?`: ```sql
SELECT "score" FROM "singles_7_4_3" WHERE "opponent_team"='belgium' AND "opponent"='kirsten flipkens';
## Task Generate a SQL query to answer the following question: `What is Score, when Opponent Team is Belgium, and when Opponent is Kirsten Flipkens?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score, when Opponent Team is Belgium, and when Opponent is Kirsten Flipkens?`: ```sql
SELECT "opponent" FROM "singles_7_4_3" WHERE "round"='world group';
## Task Generate a SQL query to answer the following question: `What is Opponent, when Round is World Group?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Opponent, when Round is World Group?`: ```sql
SELECT "surface" FROM "singles_7_4_3" WHERE "edition"=2012 AND "outcome"='winner';
## Task Generate a SQL query to answer the following question: `What is Surface, when Edition is 2012, and when Outcome is Winner?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Surface, when Edition is 2012, and when Outcome is Winner?`: ```sql
SELECT "score" FROM "singles_7_4_3" WHERE "outcome"='loser' AND "edition"=2011;
## Task Generate a SQL query to answer the following question: `What is Score, when Outcome is Loser, and when Edition is 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score, when Outcome is Loser, and when Edition is 2011?`: ```sql
SELECT "score" FROM "singles_7_4_3" WHERE "edition"=2011 AND "surface"='hard (i)';
## Task Generate a SQL query to answer the following question: `What is Score, when Edition is 2011, and when Surface is Hard (i)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score, when Edition is 2011, and when Surface is Hard (i)?`: ```sql
SELECT "round" FROM "singles_7_4_3" WHERE "opponent_team"='slovakia' AND "outcome"='loser' AND "edition">2010;
## Task Generate a SQL query to answer the following question: `What is Round, when Opponent Team is Slovakia, when Outcome is Loser, and when Edition is greater than 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_7_4_3" ( "outcome" text, "edition" real, "round" text, "opponent_team" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Round, when Opponent Team is Slovakia, when Outcome is Loser, and when Edition is greater than 2010?`: ```sql
SELECT MIN("week") FROM "schedule" WHERE "record"='4–7–1';
## Task Generate a SQL query to answer the following question: `In what Week was the Record 4–7–1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `In what Week was the Record 4–7–1?`: ```sql
SELECT "date" FROM "schedule" WHERE "attendance"='63,546';
## Task Generate a SQL query to answer the following question: `On what Date was the Attendance 63,546?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `On what Date was the Attendance 63,546?`: ```sql
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='17,737';
## Task Generate a SQL query to answer the following question: `In what Week was the Attendance 17,737?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `In what Week was the Attendance 17,737?`: ```sql
SELECT "result" FROM "schedule" WHERE "week">10 AND "opponent"='philadelphia eagles';
## Task Generate a SQL query to answer the following question: `What is the Result of the game after Week 10 against Philadelphia Eagles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Result of the game after Week 10 against Philadelphia Eagles?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "week"=11;
## Task Generate a SQL query to answer the following question: `What is the Opponent on Week 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Opponent on Week 11?`: ```sql
SELECT MAX("wnba_game_average") FROM "regular_season_attendance" WHERE "average"='9,290 (4th)' AND "total_for_year"<'157,934';
## Task Generate a SQL query to answer the following question: `What is the largest WNBA game average with 9,290 (4th) is the average, and less than 157,934 is the total for the year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season_attendance" ( "year" real, "average" text, "high" real, "sellouts" real, "total_for_year" real, "wnba_game_average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the largest WNBA game average with 9,290 (4th) is the average, and less than 157,934 is the total for the year?`: ```sql
SELECT COUNT("year") FROM "regular_season_attendance" WHERE "total_for_year"<'105,005';
## Task Generate a SQL query to answer the following question: `How many years in all was less than 105,005 the total for the year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season_attendance" ( "year" real, "average" text, "high" real, "sellouts" real, "total_for_year" real, "wnba_game_average" real ); ### SQL Given the database schema, here is the SQL query that answers `How many years in all was less than 105,005 the total for the year?`: ```sql
SELECT AVG("total_for_year") FROM "regular_season_attendance" WHERE "wnba_game_average"<'7,742' AND "average"='7,625 (10th)' AND "year"<1999;
## Task Generate a SQL query to answer the following question: `What is the total for year average that less than 7,742 is the WNBA game average, and 7,625 (10th) is the average, and before the year 1999?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season_attendance" ( "year" real, "average" text, "high" real, "sellouts" real, "total_for_year" real, "wnba_game_average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total for year average that less than 7,742 is the WNBA game average, and 7,625 (10th) is the average, and before the year 1999?`: ```sql
SELECT SUM("year") FROM "regular_season_attendance" WHERE "high">'13,142' AND "average"='10,387 (2nd)' AND "sellouts"<0;
## Task Generate a SQL query to answer the following question: `What is the total of the year that more than 13,142 is the high, and 10,387 (2nd) is the average, and there was less than 0 sellouts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season_attendance" ( "year" real, "average" text, "high" real, "sellouts" real, "total_for_year" real, "wnba_game_average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total of the year that more than 13,142 is the high, and 10,387 (2nd) is the average, and there was less than 0 sellouts?`: ```sql
SELECT MAX("sellouts") FROM "regular_season_attendance" WHERE "year"=2008 AND "total_for_year"<'161,369';
## Task Generate a SQL query to answer the following question: `What is the maximum sellouts for the 2008 year, with less than 161,369 total for year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season_attendance" ( "year" real, "average" text, "high" real, "sellouts" real, "total_for_year" real, "wnba_game_average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the maximum sellouts for the 2008 year, with less than 161,369 total for year?`: ```sql
SELECT MAX("first_elected") FROM "louisiana" WHERE "party"='republican' AND "district"='louisiana 7';
## Task Generate a SQL query to answer the following question: `What is the highest First Elected, when Party is "Republican", and when District is "Louisiana 7"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "louisiana" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest First Elected, when Party is "Republican", and when District is "Louisiana 7"?`: ```sql
SELECT "party" FROM "louisiana" WHERE "results"='re-elected' AND "district"='louisiana 5';
## Task Generate a SQL query to answer the following question: `What is Party, when Results is "Re-Elected", and when District is "Louisiana 5"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "louisiana" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Party, when Results is "Re-Elected", and when District is "Louisiana 5"?`: ```sql
SELECT "party" FROM "louisiana" WHERE "incumbent"='rodney alexander';
## Task Generate a SQL query to answer the following question: `What is Party, when Incumbent is "Rodney Alexander"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "louisiana" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Party, when Incumbent is "Rodney Alexander"?`: ```sql
SELECT "results" FROM "louisiana" WHERE "first_elected"<1988;
## Task Generate a SQL query to answer the following question: `What is Results, when First Elected is less than 1988?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "louisiana" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Results, when First Elected is less than 1988?`: ```sql
SELECT "incumbent" FROM "louisiana" WHERE "district"='louisiana 4';
## Task Generate a SQL query to answer the following question: `What is Incumbent, when District is "Louisiana 4"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "louisiana" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Incumbent, when District is "Louisiana 4"?`: ```sql
SELECT "finish" FROM "indy_500_results" WHERE "car_number"='6';
## Task Generate a SQL query to answer the following question: `What's the finish for car number 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" text, "car_number" text, "start" text, "qual_speed" text, "speed_rank" text, "finish" text, "laps_completed" real, "laps_led" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the finish for car number 6?`: ```sql
SELECT "speed_rank" FROM "indy_500_results" WHERE "year"='1963';
## Task Generate a SQL query to answer the following question: `What's the speed rank in 1963?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" text, "car_number" text, "start" text, "qual_speed" text, "speed_rank" text, "finish" text, "laps_completed" real, "laps_led" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the speed rank in 1963?`: ```sql
SELECT SUM("losses") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "result"='runner-up' AND "wins"=1 AND "year"<2006;
## Task Generate a SQL query to answer the following question: `What is the total of Losses with a Result of runner-up, Wins of 1, and a Year smaller than 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total of Losses with a Result of runner-up, Wins of 1, and a Year smaller than 2006?`: ```sql
SELECT MIN("draws") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "result"='runner-up' AND "losses">1;
## Task Generate a SQL query to answer the following question: `What is the smallest Draws with a Result of runner-up, and Losses larger than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest Draws with a Result of runner-up, and Losses larger than 1?`: ```sql
SELECT COUNT("year") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "result"='champions' AND "matches">5;
## Task Generate a SQL query to answer the following question: `What is the number of Year with a Result of champions, and Matches larger than 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of Year with a Result of champions, and Matches larger than 5?`: ```sql
SELECT MAX("wins") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "losses">1;
## Task Generate a SQL query to answer the following question: `What is the greatest Wins with Losses larger than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the greatest Wins with Losses larger than 1?`: ```sql
SELECT SUM("year") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "wins"=1 AND "losses"<1;
## Task Generate a SQL query to answer the following question: `What is the total number of Year with Wins of 1, and Losses smaller than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of Year with Wins of 1, and Losses smaller than 1?`: ```sql
SELECT MAX("wins") FROM "concacaf_women_s_world_cup_qualifiers_re" WHERE "matches"<5 AND "year"=1994;
## Task Generate a SQL query to answer the following question: `What is the greatest Wins with Matches smaller than 5, and a Year of 1994?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "concacaf_women_s_world_cup_qualifiers_re" ( "year" real, "result" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the greatest Wins with Matches smaller than 5, and a Year of 1994?`: ```sql
SELECT "date" FROM "scottish_cup" WHERE "opponent"='motherwell' AND "venue"='fir park';
## Task Generate a SQL query to answer the following question: `On what date was Motherwell the opponent at Fir Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "scottish_cup" ( "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `On what date was Motherwell the opponent at Fir Park?`: ```sql
SELECT "round" FROM "scottish_cup" WHERE "venue"='st. mirren park' AND "attendance">'4,555';
## Task Generate a SQL query to answer the following question: `What is the round at St. Mirren Park with more than 4,555 people attending?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "scottish_cup" ( "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the round at St. Mirren Park with more than 4,555 people attending?`: ```sql
SELECT SUM("attendance") FROM "ties" WHERE "away_team"='banbury united' AND "tie_no">102;
## Task Generate a SQL query to answer the following question: `What's the sum of attendance when banbury united is the away team and tie no is over 102?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ties" ( "tie_no" real, "home_team" text, "score" text, "away_team" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the sum of attendance when banbury united is the away team and tie no is over 102?`: ```sql
SELECT SUM("tie_no") FROM "ties" WHERE "home_team"='burgess hill town';
## Task Generate a SQL query to answer the following question: `What's the sum of tie no for home team burgess hill town?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ties" ( "tie_no" real, "home_team" text, "score" text, "away_team" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the sum of tie no for home team burgess hill town?`: ```sql
SELECT MAX("population") FROM "south_dakota_counties_by_per_capita_inco" WHERE "county"='deuel' AND "number_of_households"<'1,819';
## Task Generate a SQL query to answer the following question: `What is the highest population of Deuel county's 1,819 households?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_dakota_counties_by_per_capita_inco" ( "county" text, "per_capita_income" text, "median_household_income" text, "median_family_income" text, "population" real, "number_of_households" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest population of Deuel county's 1,819 households?`: ```sql
SELECT "competition" FROM "september" WHERE "venue"='away' AND "opponent"='bracknell bees';
## Task Generate a SQL query to answer the following question: `When the venue is away and the opponents are the bracknell bees, what is the competition?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When the venue is away and the opponents are the bracknell bees, what is the competition?`: ```sql
SELECT "opponent" FROM "september" WHERE "venue"='away' AND "date"='28th';
## Task Generate a SQL query to answer the following question: `What opponent played on the 28th with a venue of away?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What opponent played on the 28th with a venue of away?`: ```sql
SELECT "venue" FROM "september" WHERE "date"='20th';
## Task Generate a SQL query to answer the following question: `What was the venue on the 20th?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the venue on the 20th?`: ```sql
SELECT "date" FROM "september" WHERE "venue"='home' AND "opponent"='peterborough phantoms';
## Task Generate a SQL query to answer the following question: `When did the peterborough phantoms play at a venue of home?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When did the peterborough phantoms play at a venue of home?`: ```sql
SELECT "opponent" FROM "september" WHERE "result"='2-0 l';
## Task Generate a SQL query to answer the following question: `Which opponent has a result of 2-0 l?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Which opponent has a result of 2-0 l?`: ```sql
SELECT "opponent" FROM "september" WHERE "competition"='challenge' AND "result"='8-2 w';
## Task Generate a SQL query to answer the following question: `Which opponent completed a challenge competition with a result of 8-2 w?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "september" ( "date" text, "opponent" text, "venue" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Which opponent completed a challenge competition with a result of 8-2 w?`: ```sql
SELECT "round" FROM "race_calendar_and_winners" WHERE "race"='int. adac preis von zweibrücken';
## Task Generate a SQL query to answer the following question: `What shows for round when the race was Int. Adac Preis Von Zweibrücken?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "race" text, "circuit" text, "date" text, "event" text, "winning_driver" text ); ### SQL Given the database schema, here is the SQL query that answers `What shows for round when the race was Int. Adac Preis Von Zweibrücken?`: ```sql
SELECT AVG("round") FROM "race_calendar_and_winners" WHERE "circuit"='norisring';
## Task Generate a SQL query to answer the following question: `What is the round for the Norisring circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "race" text, "circuit" text, "date" text, "event" text, "winning_driver" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the round for the Norisring circuit?`: ```sql
SELECT "race" FROM "race_calendar_and_winners" WHERE "round"<8 AND "date"='6 july';
## Task Generate a SQL query to answer the following question: `What race was a round smaller than 8, on 6 july?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "race" text, "circuit" text, "date" text, "event" text, "winning_driver" text ); ### SQL Given the database schema, here is the SQL query that answers `What race was a round smaller than 8, on 6 july?`: ```sql
SELECT "round" FROM "race_calendar_and_winners" WHERE "race"='int. adac-preis der tourenwagen von sachsen-anhalt';
## Task Generate a SQL query to answer the following question: `What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "race" text, "circuit" text, "date" text, "event" text, "winning_driver" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?`: ```sql
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='56,023';
## Task Generate a SQL query to answer the following question: `What week were there 56,023 people in attendance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What week were there 56,023 people in attendance?`: ```sql
SELECT COUNT("attendance") FROM "schedule" WHERE "week">9 AND "date"='november 20, 1983';
## Task Generate a SQL query to answer the following question: `What is the attendance number later than week 9 on November 20, 1983?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the attendance number later than week 9 on November 20, 1983?`: ```sql
SELECT "surface" FROM "wins_3" WHERE "date"<1979 AND "opponent_in_the_final"='bill scanlon';
## Task Generate a SQL query to answer the following question: `What is Surface, when Date is less than 1979, and when Opponent in the Final is "Bill Scanlon"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wins_3" ( "outcome" text, "date" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Surface, when Date is less than 1979, and when Opponent in the Final is "Bill Scanlon"?`: ```sql
SELECT "score_in_the_final" FROM "wins_3" WHERE "opponent_in_the_final"='john mcenroe' AND "championship"='los angeles , u.s.';
## Task Generate a SQL query to answer the following question: `What is Score in The Final, when Opponent in The Final is "John McEnroe", and when Championship is "Los Angeles , U.S."?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wins_3" ( "outcome" text, "date" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score in The Final, when Opponent in The Final is "John McEnroe", and when Championship is "Los Angeles , U.S."?`: ```sql
SELECT "outcome" FROM "wins_3" WHERE "opponent_in_the_final"='bill scanlon';
## Task Generate a SQL query to answer the following question: `What is Outcome, when Opponent in The Final is "Bill Scanlon"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wins_3" ( "outcome" text, "date" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Outcome, when Opponent in The Final is "Bill Scanlon"?`: ```sql
SELECT "to_par" FROM "third_round" WHERE "player"='bernhard langer';
## Task Generate a SQL query to answer the following question: `Which To par has a Player of bernhard langer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which To par has a Player of bernhard langer?`: ```sql
SELECT "score" FROM "third_round" WHERE "country"='united states' AND "player"='raymond floyd';
## Task Generate a SQL query to answer the following question: `Which Score has a Country of united states, and a Player of raymond floyd?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Score has a Country of united states, and a Player of raymond floyd?`: ```sql
SELECT "to_par" FROM "third_round" WHERE "place"='t6' AND "player"='nick faldo';
## Task Generate a SQL query to answer the following question: `Which To par has a Place of t6, and a Player of nick faldo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which To par has a Place of t6, and a Player of nick faldo?`: ```sql
SELECT "to_par" FROM "third_round" WHERE "place"='t2' AND "player"='mark james';
## Task Generate a SQL query to answer the following question: `Which To par has a Place of t2, and a Player of mark james?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which To par has a Place of t2, and a Player of mark james?`: ```sql
SELECT "country" FROM "third_round" WHERE "place"='t10' AND "player"='tony jacklin';
## Task Generate a SQL query to answer the following question: `Which Country has a Place of t10, and a Player of tony jacklin?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Country has a Place of t10, and a Player of tony jacklin?`: ```sql
SELECT "country" FROM "third_round" WHERE "score"='71-74-70=215';
## Task Generate a SQL query to answer the following question: `Which Country has a Score of 71-74-70=215?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Country has a Score of 71-74-70=215?`: ```sql
SELECT AVG("losses") FROM "2008_ladder" WHERE "wins"<4 AND "against"=2510 AND "byes">0;
## Task Generate a SQL query to answer the following question: `How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008_ladder" ( "mininera_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?`: ```sql
SELECT MAX("wins") FROM "2008_ladder" WHERE "against"=1800 AND "draws">0;
## Task Generate a SQL query to answer the following question: `How many wins for team with 1800 Against and more than 0 byes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008_ladder" ( "mininera_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many wins for team with 1800 Against and more than 0 byes?`: ```sql
SELECT MIN("wins") FROM "2008_ladder" WHERE "against"<814;
## Task Generate a SQL query to answer the following question: `What is the least wins for a team with against less than 814?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008_ladder" ( "mininera_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the least wins for a team with against less than 814?`: ```sql
SELECT MIN("losses") FROM "2008_ladder" WHERE "wins"=3 AND "against">1919;
## Task Generate a SQL query to answer the following question: `How many losses for the team with 3 wins and more than 1919 against?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008_ladder" ( "mininera_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many losses for the team with 3 wins and more than 1919 against?`: ```sql
SELECT "2002" FROM "singles_performance_timeline" WHERE "2011"='1r' AND "2000"='1r';
## Task Generate a SQL query to answer the following question: `What is the 2002 result where 2011 and 2000 are 1R?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2002 result where 2011 and 2000 are 1R?`: ```sql
SELECT "2008" FROM "singles_performance_timeline" WHERE "2003"='325';
## Task Generate a SQL query to answer the following question: `What is the 2008 result where 2003 is 325?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2008 result where 2003 is 325?`: ```sql
SELECT "2002" FROM "singles_performance_timeline" WHERE "2006"='a' AND "2010"='q1';
## Task Generate a SQL query to answer the following question: `What is the 2002 result when 2006 is A and 2010 is Q1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2002 result when 2006 is A and 2010 is Q1?`: ```sql
SELECT MIN("year_completed") FROM "major_dams_and_reservoirs" WHERE "dam_type"='concrete gravity' AND "impounded_body_of_water"='deep creek reservoir';
## Task Generate a SQL query to answer the following question: `Which Year completed has a Dam type of concrete gravity, and an Impounded body of water of deep creek reservoir?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "major_dams_and_reservoirs" ( "dam_constructed" text, "year_completed" real, "impounded_body_of_water" text, "reservoir_capacity" text, "dam_wall_height" text, "dam_type" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Year completed has a Dam type of concrete gravity, and an Impounded body of water of deep creek reservoir?`: ```sql
SELECT "dam_type" FROM "major_dams_and_reservoirs" WHERE "year_completed"=1961;
## Task Generate a SQL query to answer the following question: `Which dam type was completed in 1961?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "major_dams_and_reservoirs" ( "dam_constructed" text, "year_completed" real, "impounded_body_of_water" text, "reservoir_capacity" text, "dam_wall_height" text, "dam_type" text ); ### SQL Given the database schema, here is the SQL query that answers `Which dam type was completed in 1961?`: ```sql
SELECT MAX("year_completed") FROM "major_dams_and_reservoirs" WHERE "dam_type"='earthfill embankment' AND "dam_constructed"='khancoban dam';
## Task Generate a SQL query to answer the following question: `Which Year completed has a Dam type of earthfill embankment, and a Dam constructed of khancoban dam?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "major_dams_and_reservoirs" ( "dam_constructed" text, "year_completed" real, "impounded_body_of_water" text, "reservoir_capacity" text, "dam_wall_height" text, "dam_type" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Year completed has a Dam type of earthfill embankment, and a Dam constructed of khancoban dam?`: ```sql
SELECT "reservoir_capacity" FROM "major_dams_and_reservoirs" WHERE "impounded_body_of_water"='tumut two pondage';
## Task Generate a SQL query to answer the following question: `Which Reservoir capacity has an Impounded body of water of tumut two pondage?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "major_dams_and_reservoirs" ( "dam_constructed" text, "year_completed" real, "impounded_body_of_water" text, "reservoir_capacity" text, "dam_wall_height" text, "dam_type" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Reservoir capacity has an Impounded body of water of tumut two pondage?`: ```sql
SELECT "companion_in_order_from_star" FROM "the_hd_40307_system" WHERE "semimajor_axis_au"='0.1886 +0.083 −0.0104';
## Task Generate a SQL query to answer the following question: `What Companion (in order from star) has a Semimajor axis (AU) of 0.1886 +0.083 −0.0104?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_hd_40307_system" ( "companion_in_order_from_star" text, "mass" text, "semimajor_axis_au" text, "orbital_period_s_day" text, "eccentricity" text, "inclination" text ); ### SQL Given the database schema, here is the SQL query that answers `What Companion (in order from star) has a Semimajor axis (AU) of 0.1886 +0.083 −0.0104?`: ```sql