output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT AVG("laps") FROM "race" WHERE "grid">22;
## Task Generate a SQL query to answer the following question: `Tell me the average Laps for grid larger than 22` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average Laps for grid larger than 22`: ```sql
SELECT "constructor" FROM "race" WHERE "grid"=17;
## Task Generate a SQL query to answer the following question: `Tell me the constructor for grid of 17` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the constructor for grid of 17`: ```sql
SELECT "ukraine_career" FROM "ukraine_managers" WHERE "lost">1 AND "drawn">11;
## Task Generate a SQL query to answer the following question: `What years had a manager who lost more than 1 and drawn more than 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ukraine_managers" ( "manager" text, "ukraine_career" text, "played" real, "drawn" real, "lost" real, "win_pct" real ); ### SQL Given the database schema, here is the SQL query that answers `What years had a manager who lost more than 1 and drawn more than 11?`: ```sql
SELECT COUNT("win_pct") FROM "ukraine_managers" WHERE "manager"='viktor prokopenko' AND "lost"<2;
## Task Generate a SQL query to answer the following question: `what is the total win % of manager viktor prokopenko, when he lost fewer than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ukraine_managers" ( "manager" text, "ukraine_career" text, "played" real, "drawn" real, "lost" real, "win_pct" real ); ### SQL Given the database schema, here is the SQL query that answers `what is the total win % of manager viktor prokopenko, when he lost fewer than 2?`: ```sql
SELECT AVG("fixtures") FROM "format_and_schedule" WHERE "clubs_involved"=4;
## Task Generate a SQL query to answer the following question: `When 4 clubs are involved, what is the average number of fixtures?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "format_and_schedule" ( "round" text, "date_s" text, "clubs_from_the_previous_round" text, "clubs_involved" real, "fixtures" real ); ### SQL Given the database schema, here is the SQL query that answers `When 4 clubs are involved, what is the average number of fixtures?`: ```sql
SELECT SUM("fixtures") FROM "format_and_schedule" WHERE "round"='sixth round' AND "clubs_involved">15;
## Task Generate a SQL query to answer the following question: `In the sixth round, what is the sum of fixtures when there were more than 15 clubs involved?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "format_and_schedule" ( "round" text, "date_s" text, "clubs_from_the_previous_round" text, "clubs_involved" real, "fixtures" real ); ### SQL Given the database schema, here is the SQL query that answers `In the sixth round, what is the sum of fixtures when there were more than 15 clubs involved?`: ```sql
SELECT "league" FROM "year_by_year" WHERE "year"='1915/16';
## Task Generate a SQL query to answer the following question: `Tell me the league for year of 1915/16` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" text, "division" text, "league" text, "reg_season" text, "playoffs" text, "challenge_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the league for year of 1915/16`: ```sql
SELECT "constructor" FROM "race" WHERE "laps"=54;
## Task Generate a SQL query to answer the following question: `What is the make of the car that drove 54 laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the make of the car that drove 54 laps?`: ```sql
SELECT "name" FROM "highest_capped" WHERE "caps"=59;
## Task Generate a SQL query to answer the following question: `Who has a 59 cap?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "highest_capped" ( "name" text, "career" text, "caps" real, "goals" real, "first_cap" text, "recent_cap" text ); ### SQL Given the database schema, here is the SQL query that answers `Who has a 59 cap?`: ```sql
SELECT SUM("frequency_m_hz") FROM "translators" WHERE "erp_w"<1;
## Task Generate a SQL query to answer the following question: `Tell me the sum of frequency for ERP W less than 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "translators" ( "call_sign" text, "frequency_m_hz" real, "city_of_license" text, "erp_w" real, "class" text, "fcc_info" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of frequency for ERP W less than 1`: ```sql
SELECT MIN("ties_played") FROM "players" WHERE "debut"=1936;
## Task Generate a SQL query to answer the following question: `Tell me the lowest ties played with a debut of 1936` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "players" ( "player" text, "total_w_l" text, "singles_w_l" text, "doubles_w_l" text, "ties_played" real, "debut" real, "years_played" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the lowest ties played with a debut of 1936`: ```sql
SELECT "venue" FROM "achievements" WHERE "competition"='paris marathon';
## Task Generate a SQL query to answer the following question: `Where did the Paris Marathon occur?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `Where did the Paris Marathon occur?`: ```sql
SELECT "capacity" FROM "current_usl_soccer_specific_stadiums" WHERE "stadium"='city park stadium';
## Task Generate a SQL query to answer the following question: `Tell me the capacity for city park stadium` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_usl_soccer_specific_stadiums" ( "stadium" text, "club_s" text, "division" text, "city" text, "capacity" real, "opened" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the capacity for city park stadium`: ```sql
SELECT "tournament" FROM "titles_6" WHERE "opponents_in_the_final"='andrei pavel rogier wassen';
## Task Generate a SQL query to answer the following question: `Tell me the tournament for opponents of andrei pavel rogier wassen` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "titles_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the tournament for opponents of andrei pavel rogier wassen`: ```sql
SELECT "tournament" FROM "titles_6" WHERE "score_in_the_final"='1–6, 3–6';
## Task Generate a SQL query to answer the following question: `Tell me the tournament for score in the final of 1–6, 3–6` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "titles_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the tournament for score in the final of 1–6, 3–6`: ```sql
SELECT "opponents_in_the_final" FROM "titles_6" WHERE "score_in_the_final"='1–6, 2–6';
## Task Generate a SQL query to answer the following question: `Tell me the opponents for score in the final of 1–6, 2–6` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "titles_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the opponents for score in the final of 1–6, 2–6`: ```sql
SELECT "surface" FROM "titles_6" WHERE "date"='16 april 2007';
## Task Generate a SQL query to answer the following question: `Tell me the surface for 16 april 2007` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "titles_6" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the surface for 16 april 2007`: ```sql
SELECT AVG("pages") FROM "publications" WHERE "isbn"='978-0-9766580-5-4';
## Task Generate a SQL query to answer the following question: `I want the average pages for ISBN of 978-0-9766580-5-4` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "publications" ( "title" text, "year" real, "isbn" text, "volume" text, "strips" text, "pages" real, "colors" text ); ### SQL Given the database schema, here is the SQL query that answers `I want the average pages for ISBN of 978-0-9766580-5-4`: ```sql
SELECT SUM("year") FROM "publications" WHERE "pages"=244;
## Task Generate a SQL query to answer the following question: `Tell me the sum of year for 244 pages` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "publications" ( "title" text, "year" real, "isbn" text, "volume" text, "strips" text, "pages" real, "colors" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of year for 244 pages`: ```sql
SELECT "title" FROM "publications" WHERE "pages"=96;
## Task Generate a SQL query to answer the following question: `Tell me the title for pages of 96` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "publications" ( "title" text, "year" real, "isbn" text, "volume" text, "strips" text, "pages" real, "colors" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the title for pages of 96`: ```sql
SELECT "date_of_birth" FROM "historical" WHERE "party"='republican' AND "house_term"='1863-1865';
## Task Generate a SQL query to answer the following question: `What was the date of birth of a republican member of the United States House of Representatives who held the term of 1863-1865?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical" ( "begin_date" text, "representative" text, "date_of_birth" text, "house_term" text, "state_served" text, "party" text, "age_years_days" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of birth of a republican member of the United States House of Representatives who held the term of 1863-1865?`: ```sql
SELECT "age_years_days" FROM "historical" WHERE "begin_date"='may 7, 1886';
## Task Generate a SQL query to answer the following question: `What was the age of the member of the United States House of Representatives that began their term on May 7, 1886?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical" ( "begin_date" text, "representative" text, "date_of_birth" text, "house_term" text, "state_served" text, "party" text, "age_years_days" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the age of the member of the United States House of Representatives that began their term on May 7, 1886?`: ```sql
SELECT "date_of_birth" FROM "historical" WHERE "begin_date"='april 24, 1902';
## Task Generate a SQL query to answer the following question: `What was the date of birth of the member of the United States House of Representatives that began their term on April 24, 1902?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical" ( "begin_date" text, "representative" text, "date_of_birth" text, "house_term" text, "state_served" text, "party" text, "age_years_days" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of birth of the member of the United States House of Representatives that began their term on April 24, 1902?`: ```sql
SELECT "representative" FROM "historical" WHERE "begin_date"='january 4, 1997';
## Task Generate a SQL query to answer the following question: `Which member of the United States House of Representatives began their term on January 4, 1997?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical" ( "begin_date" text, "representative" text, "date_of_birth" text, "house_term" text, "state_served" text, "party" text, "age_years_days" text ); ### SQL Given the database schema, here is the SQL query that answers `Which member of the United States House of Representatives began their term on January 4, 1997?`: ```sql
SELECT "state_served" FROM "historical" WHERE "party"='federalist' AND "representative"='samuel thatcher';
## Task Generate a SQL query to answer the following question: `Which state did Samuel Thatcher of the Federalist party represent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical" ( "begin_date" text, "representative" text, "date_of_birth" text, "house_term" text, "state_served" text, "party" text, "age_years_days" text ); ### SQL Given the database schema, here is the SQL query that answers `Which state did Samuel Thatcher of the Federalist party represent?`: ```sql
SELECT "position" FROM "t" WHERE "player"='hedo türkoğlu';
## Task Generate a SQL query to answer the following question: `What position does Hedo Türkoğlu play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "t" ( "player" text, "nationality" text, "position" text, "years_in_toronto" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does Hedo Türkoğlu play?`: ```sql
SELECT "years_in_toronto" FROM "t" WHERE "player"='sebastian telfair';
## Task Generate a SQL query to answer the following question: `How long has Sebastian Telfair played for Toronto?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "t" ( "player" text, "nationality" text, "position" text, "years_in_toronto" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How long has Sebastian Telfair played for Toronto?`: ```sql
SELECT "title" FROM "games_developed" WHERE "japan"='august 23, 2012';
## Task Generate a SQL query to answer the following question: `Tell me the title for japan august 23, 2012` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "games_developed" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the title for japan august 23, 2012`: ```sql
SELECT "title" FROM "games_developed" WHERE "japan"='august 23, 2012';
## Task Generate a SQL query to answer the following question: `Tell me the title for japan august 23, 2012` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "games_developed" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the title for japan august 23, 2012`: ```sql
SELECT "australia" FROM "games_developed" WHERE "japan"='march 17, 2005';
## Task Generate a SQL query to answer the following question: `Tell me the Australia march 17, 2005` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "games_developed" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the Australia march 17, 2005`: ```sql
SELECT "europe" FROM "games_developed" WHERE "title"='z.h.p. unlosing ranger vs darkdeath evilman';
## Task Generate a SQL query to answer the following question: `Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "games_developed" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman`: ```sql
SELECT COUNT("losses") FROM "group_a" WHERE "place"=4 AND "ties"<0;
## Task Generate a SQL query to answer the following question: `Name the total losses for 4 place and ties less than 0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_a" ( "place" real, "team" text, "wins" real, "ties" real, "losses" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total losses for 4 place and ties less than 0`: ```sql
SELECT AVG("place") FROM "group_a" WHERE "ties"<1 AND "points"='6 qc' AND "losses">3;
## Task Generate a SQL query to answer the following question: `Name the average place for ties less than 1 and losess more than 3 with points of 6 qc` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_a" ( "place" real, "team" text, "wins" real, "ties" real, "losses" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the average place for ties less than 1 and losess more than 3 with points of 6 qc`: ```sql
SELECT MAX("wins") FROM "group_a" WHERE "losses">2 AND "points"='2' AND "place">7;
## Task Generate a SQL query to answer the following question: `Name the most wins for losses more than 2 and points of two with place larger than 7` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_a" ( "place" real, "team" text, "wins" real, "ties" real, "losses" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the most wins for losses more than 2 and points of two with place larger than 7`: ```sql
SELECT SUM("place") FROM "group_a" WHERE "ties">0 AND "points"='7 qc' AND "losses">2;
## Task Generate a SQL query to answer the following question: `Name the sum of place with ties larger than 0 and point sof 7 qc and losses more than 2` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_a" ( "place" real, "team" text, "wins" real, "ties" real, "losses" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the sum of place with ties larger than 0 and point sof 7 qc and losses more than 2`: ```sql
SELECT "no_range" FROM "fleet_details" WHERE "type"='4vip';
## Task Generate a SQL query to answer the following question: `Tell me the number range for 4vip` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_details" ( "class" text, "type" text, "no_converted" real, "year_converted" text, "no_range" text, "operator" text, "withdrawn" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the number range for 4vip`: ```sql
SELECT "heat_rank" FROM "heats" WHERE "country"='senegal';
## Task Generate a SQL query to answer the following question: `Name the heat rank for senegal` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heats" ( "heat_rank" real, "lane" real, "swimmer" text, "country" text, "time" real, "overall_rank" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the heat rank for senegal`: ```sql
SELECT "2010" FROM "singles_performance_timeline" WHERE "2012"='q2';
## Task Generate a SQL query to answer the following question: `What is the value for 2010 when the 2012 value is Q2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the value for 2010 when the 2012 value is Q2?`: ```sql
SELECT "2010" FROM "singles_performance_timeline" WHERE "2006"='a' AND "2009"='1r';
## Task Generate a SQL query to answer the following question: `What is the value for 2010 when the value for 2006 is A and the value for 2009 is 1R?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the value for 2010 when the value for 2006 is A and the value for 2009 is 1R?`: ```sql
SELECT "2012" FROM "singles_performance_timeline" WHERE "2009"='1r' AND "2007"='2r';
## Task Generate a SQL query to answer the following question: `What is the value for 2012 when the value for 2009 is 1R and the vale for 2007 is 2R?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the value for 2012 when the value for 2009 is 1R and the vale for 2007 is 2R?`: ```sql
SELECT "2008" FROM "singles_performance_timeline" WHERE "tournament"='us open';
## Task Generate a SQL query to answer the following question: `What is the value for 2008 for the US Open Tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the value for 2008 for the US Open Tournament?`: ```sql
SELECT "2009" FROM "singles_performance_timeline" WHERE "2011"='138';
## Task Generate a SQL query to answer the following question: `What is the value for 2009 when the value for 2011 is 138?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the value for 2009 when the value for 2011 is 138?`: ```sql
SELECT MAX("series_num") FROM "season_4_1976_1977" WHERE "original_air_date"='september 22, 1976';
## Task Generate a SQL query to answer the following question: `Tell me the highest series # for september 22, 1976` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_4_1976_1977" ( "series_num" real, "season_num" real, "title" text, "original_air_date" text, "tape_date" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the highest series # for september 22, 1976`: ```sql
SELECT "screen_size_pixels" FROM "performance_series" WHERE "lens_35mmequiv_zoom_aperture"='26–678mm (26×) f /2.8–5';
## Task Generate a SQL query to answer the following question: `What is the screen size and pixel value when the lens aperture is 26–678mm (26×) f /2.8–5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_series" ( "model" text, "release_date" text, "sensor_res_size" text, "lens_35mmequiv_zoom_aperture" text, "screen_size_pixels" text, "dimensions_w_h_d_mm" text, "weight" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the screen size and pixel value when the lens aperture is 26–678mm (26×) f /2.8–5?`: ```sql
SELECT "screen_size_pixels" FROM "performance_series" WHERE "dimensions_w_h_d_mm"='115.5×83.7×102.5';
## Task Generate a SQL query to answer the following question: `What is the screen size and pixel value when the dimensions are 115.5×83.7×102.5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_series" ( "model" text, "release_date" text, "sensor_res_size" text, "lens_35mmequiv_zoom_aperture" text, "screen_size_pixels" text, "dimensions_w_h_d_mm" text, "weight" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the screen size and pixel value when the dimensions are 115.5×83.7×102.5?`: ```sql
SELECT "screen_size_pixels" FROM "performance_series" WHERE "dimensions_w_h_d_mm"='98×64.5×41' AND "model"='p5000';
## Task Generate a SQL query to answer the following question: `What is the screen size and pixel amount of model p5000 when the dimensions are 98×64.5×41?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_series" ( "model" text, "release_date" text, "sensor_res_size" text, "lens_35mmequiv_zoom_aperture" text, "screen_size_pixels" text, "dimensions_w_h_d_mm" text, "weight" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the screen size and pixel amount of model p5000 when the dimensions are 98×64.5×41?`: ```sql
SELECT MIN("all_children_000s") FROM "number_of_children_involved_in_ilo_categ" WHERE "child_labour_pct">15.5 AND "children_in_hazardous_work_000s"='170,500' AND "economically_active_children_000s">'351,700';
## Task Generate a SQL query to answer the following question: `What is the lowest number for all children when the child labour percentage is greater than 15.5 and the number of children in hazardous work is 170,500 while the number of economically active children is more than 351,700?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "number_of_children_involved_in_ilo_categ" ( "all_children_000s" real, "economically_active_children_000s" real, "economically_active_children_pct" real, "child_labour_000s" real, "child_labour_pct" real, "children_in_hazardous_work_000s" real, "children_in_hazardous_work_pct" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number for all children when the child labour percentage is greater than 15.5 and the number of children in hazardous work is 170,500 while the number of economically active children is more than 351,700?`: ```sql
SELECT MIN("all_children_000s") FROM "number_of_children_involved_in_ilo_categ" WHERE "child_labour_pct">15.2 AND "economically_active_children_pct"<23.4 AND "economically_active_children_000s"='210,800';
## Task Generate a SQL query to answer the following question: `What is the lowest total number of children when there are more than 15.2% in child labour, less than 23.4% economically active, and the number economically active is 210,800?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "number_of_children_involved_in_ilo_categ" ( "all_children_000s" real, "economically_active_children_000s" real, "economically_active_children_pct" real, "child_labour_000s" real, "child_labour_pct" real, "children_in_hazardous_work_000s" real, "children_in_hazardous_work_pct" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest total number of children when there are more than 15.2% in child labour, less than 23.4% economically active, and the number economically active is 210,800?`: ```sql
SELECT "championship_game" FROM "record_by_conference" WHERE "conference"='big eight';
## Task Generate a SQL query to answer the following question: `Tell me the championship game for big eight` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "record_by_conference" ( "conference" text, "num_of_bids" real, "record" text, "win_pct" text, "round_of_32" text, "elite_eight" text, "final_four" text, "championship_game" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the championship game for big eight`: ```sql
SELECT MIN("total") FROM "medal_table" WHERE "rank"=13 AND "bronze"<1;
## Task Generate a SQL query to answer the following question: `Name the lowest total for rank of 13 with bronze less than 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the lowest total for rank of 13 with bronze less than 1`: ```sql
SELECT SUM("original_week") FROM "schedule" WHERE "date"='september 16, 1982';
## Task Generate a SQL query to answer the following question: `Tell me the sum of original week for september 16, 1982` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "original_week" real, "date" text, "opponent" text, "result" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of original week for september 16, 1982`: ```sql
SELECT AVG("original_week") FROM "schedule" WHERE "venue"='soldier field';
## Task Generate a SQL query to answer the following question: `Tell me the average original week for soldier field` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "original_week" real, "date" text, "opponent" text, "result" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average original week for soldier field`: ```sql
SELECT "date" FROM "schedule" WHERE "original_week"<16 AND "result"='l 23–22';
## Task Generate a SQL query to answer the following question: `Tell me the date for original week less than 16 and result of l 23–22` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "original_week" real, "date" text, "opponent" text, "result" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the date for original week less than 16 and result of l 23–22`: ```sql
SELECT "call_sign" FROM "fm_stations" WHERE "frequency"='0 97.3 fm';
## Task Generate a SQL query to answer the following question: `Tell me the call sign for frequency of 0 97.3 fm` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fm_stations" ( "call_sign" text, "frequency" text, "city_of_license" text, "owner" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the call sign for frequency of 0 97.3 fm`: ```sql
SELECT "owner" FROM "fm_stations" WHERE "format"='classical';
## Task Generate a SQL query to answer the following question: `Tell me the owner for classical` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fm_stations" ( "call_sign" text, "frequency" text, "city_of_license" text, "owner" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the owner for classical`: ```sql
SELECT "city_of_license" FROM "fm_stations" WHERE "frequency"='0 106.9 fm';
## Task Generate a SQL query to answer the following question: `Tell me the city of license for 0 106.9 fm` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fm_stations" ( "call_sign" text, "frequency" text, "city_of_license" text, "owner" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the city of license for 0 106.9 fm`: ```sql
SELECT "years_in_toronto" FROM "o" WHERE "player"='hakeem olajuwon';
## Task Generate a SQL query to answer the following question: `What year(s) did Hakeem Olajuwon play Center for Toronto?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "o" ( "player" text, "nationality" text, "position" text, "years_in_toronto" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What year(s) did Hakeem Olajuwon play Center for Toronto?`: ```sql
SELECT "position" FROM "o" WHERE "nationality"='united states' AND "player"='jimmy oliver';
## Task Generate a SQL query to answer the following question: `What position did Jimmy Oliver of the United States play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "o" ( "player" text, "nationality" text, "position" text, "years_in_toronto" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position did Jimmy Oliver of the United States play?`: ```sql
SELECT COUNT("crest_length_meters") FROM "see_also" WHERE "year_of_construction">1957 AND "name"='mattmark';
## Task Generate a SQL query to answer the following question: `Tell me the total number of crest length for year construction larger than 1957 for mattmark` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "name" text, "canton" text, "height_meters" real, "crest_length_meters" real, "type" text, "year_of_construction" real, "name_of_the_lake" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the total number of crest length for year construction larger than 1957 for mattmark`: ```sql
SELECT "name_of_the_lake" FROM "see_also" WHERE "crest_length_meters"=430;
## Task Generate a SQL query to answer the following question: `Tell me the name of lake for crest length of 430` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "name" text, "canton" text, "height_meters" real, "crest_length_meters" real, "type" text, "year_of_construction" real, "name_of_the_lake" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the name of lake for crest length of 430`: ```sql
SELECT "pct_wt_2nd" FROM "ternary_azeotropes" WHERE "b_p_3rd_comp_c"='98.4';
## Task Generate a SQL query to answer the following question: `Tell me the % of wt 2nd for bp 3rd comp of 98.4` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ternary_azeotropes" ( "2nd_component" text, "b_p_2nd_comp_c" real, "3rd_component" text, "b_p_3rd_comp_c" text, "b_p_azeo_c" text, "pct_wt_1st" text, "pct_wt_2nd" text, "pct_wt_3rd" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the % of wt 2nd for bp 3rd comp of 98.4`: ```sql
SELECT "3rd_component" FROM "ternary_azeotropes" WHERE "b_p_azeo_c"='62.1';
## Task Generate a SQL query to answer the following question: `Tell me the 3rd component for bp azeo of 62.1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ternary_azeotropes" ( "2nd_component" text, "b_p_2nd_comp_c" real, "3rd_component" text, "b_p_3rd_comp_c" text, "b_p_azeo_c" text, "pct_wt_1st" text, "pct_wt_2nd" text, "pct_wt_3rd" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the 3rd component for bp azeo of 62.1`: ```sql
SELECT "name" FROM "see_also" WHERE "county"='sør-trøndelag';
## Task Generate a SQL query to answer the following question: `Tell me the name with sør-trøndelag` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank" real, "county" text, "name" text, "type" text, "elevation" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the name with sør-trøndelag`: ```sql
SELECT "elevation" FROM "see_also" WHERE "county"='oslo';
## Task Generate a SQL query to answer the following question: `Tell me the elevation for oslo` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank" real, "county" text, "name" text, "type" text, "elevation" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the elevation for oslo`: ```sql
SELECT "result" FROM "professional_boxing_record" WHERE "opponent"='pat lawlor';
## Task Generate a SQL query to answer the following question: `What was the result of the match against Pat Lawlor?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "professional_boxing_record" ( "result" text, "opponent" text, "type" text, "rd_time" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result of the match against Pat Lawlor?`: ```sql
SELECT SUM("cars_per_set") FROM "fleet" WHERE "operator"='london midland';
## Task Generate a SQL query to answer the following question: `Tell me the sum of cars per set for operator of london midland` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet" ( "class" text, "operator" text, "no_built" real, "year_built" text, "cars_per_set" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of cars per set for operator of london midland`: ```sql
SELECT "title" FROM "game_releases_in_japan" WHERE "japan"='january 31, 2008';
## Task Generate a SQL query to answer the following question: `Tell me the title of japan january 31, 2008` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the title of japan january 31, 2008`: ```sql
SELECT "japan" FROM "game_releases_in_japan" WHERE "title"='jigsaw land: japan graffiti';
## Task Generate a SQL query to answer the following question: `Tell me japan for jigsaw land: japan graffiti` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me japan for jigsaw land: japan graffiti`: ```sql
SELECT "north_america" FROM "game_releases_in_japan" WHERE "japan"='january 23, 2013';
## Task Generate a SQL query to answer the following question: `Tell me north america for january 23, 2013` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me north america for january 23, 2013`: ```sql
SELECT "north_america" FROM "game_releases_in_japan" WHERE "europe"='september 18, 2009';
## Task Generate a SQL query to answer the following question: `Tell me the north america for september 18, 2009` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the north america for september 18, 2009`: ```sql
SELECT "europe" FROM "game_releases_in_japan" WHERE "japan"='january 28, 2010';
## Task Generate a SQL query to answer the following question: `Tell me europe for japan of january 28, 2010` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me europe for japan of january 28, 2010`: ```sql
SELECT "north_america" FROM "game_releases_in_japan" WHERE "title"='phantom brave';
## Task Generate a SQL query to answer the following question: `Tell me the north america for phantom brave` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_releases_in_japan" ( "title" text, "japan" text, "north_america" text, "europe" text, "australia" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the north america for phantom brave`: ```sql
SELECT AVG("played") FROM "home_stadiums" WHERE "city"='belgrade' AND "average_attendance">'26,222';
## Task Generate a SQL query to answer the following question: `What is the average played value in Belgrade with attendance greater than 26,222?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "home_stadiums" ( "venue" text, "city" text, "first_international" text, "last_international" text, "played" real, "draw" real, "lost" real, "average_attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average played value in Belgrade with attendance greater than 26,222?`: ```sql
SELECT "role" FROM "theater_credits" WHERE "theatre"='festival theatre';
## Task Generate a SQL query to answer the following question: `Tell me the role of festival theatre` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "theater_credits" ( "year" real, "play" text, "role" text, "theatre" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the role of festival theatre`: ```sql
SELECT MIN("year") FROM "theater_credits" WHERE "theatre"='shubert theatre';
## Task Generate a SQL query to answer the following question: `Tell me the lowest year for shubert theatre` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "theater_credits" ( "year" real, "play" text, "role" text, "theatre" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the lowest year for shubert theatre`: ```sql
SELECT COUNT("year") FROM "theater_credits" WHERE "role"='lady cecily waynflete' AND "theatre"='opera house, kennedy center';
## Task Generate a SQL query to answer the following question: `Tell me the total number of years for lady cecily waynflete and opera house, kennedy center` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "theater_credits" ( "year" real, "play" text, "role" text, "theatre" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the total number of years for lady cecily waynflete and opera house, kennedy center`: ```sql
SELECT "role" FROM "theater_credits" WHERE "play"='tea and sympathy';
## Task Generate a SQL query to answer the following question: `Tell me the role for tea and sympathy` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "theater_credits" ( "year" real, "play" text, "role" text, "theatre" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the role for tea and sympathy`: ```sql
SELECT MIN("beatified") FROM "saints" WHERE "place"='korea' AND "canonised"<1984;
## Task Generate a SQL query to answer the following question: `When was the first beatification in Korea that was canonised before 1984?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "saints" ( "name" text, "martyred" real, "place" text, "beatified" real, "canonised" real ); ### SQL Given the database schema, here is the SQL query that answers `When was the first beatification in Korea that was canonised before 1984?`: ```sql
SELECT MAX("martyred") FROM "saints" WHERE "beatified">1909 AND "name"='laurent-marie-joseph imbert / st. imbert' AND "canonised">1984;
## Task Generate a SQL query to answer the following question: `When was Laurent-Marie-Joseph Imbert / St. Imbert, who was beatified after 1909 and canonised after 1984, martyred?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "saints" ( "name" text, "martyred" real, "place" text, "beatified" real, "canonised" real ); ### SQL Given the database schema, here is the SQL query that answers `When was Laurent-Marie-Joseph Imbert / St. Imbert, who was beatified after 1909 and canonised after 1984, martyred?`: ```sql
SELECT "beatified" FROM "saints" WHERE "canonised"<1988;
## Task Generate a SQL query to answer the following question: `When was the person(s) who were canonised before 1988 beatified?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "saints" ( "name" text, "martyred" real, "place" text, "beatified" real, "canonised" real ); ### SQL Given the database schema, here is the SQL query that answers `When was the person(s) who were canonised before 1988 beatified?`: ```sql
SELECT MAX("martyred") FROM "saints" WHERE "beatified"=1909 AND "name"='john hoan trinh doan / st. john hoan' AND "canonised">1988;
## Task Generate a SQL query to answer the following question: `When was John Hoan Trinh Doan / St. John Hoan, who was beatified in 1909 and canonised after 1988, martyred?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "saints" ( "name" text, "martyred" real, "place" text, "beatified" real, "canonised" real ); ### SQL Given the database schema, here is the SQL query that answers `When was John Hoan Trinh Doan / St. John Hoan, who was beatified in 1909 and canonised after 1988, martyred?`: ```sql
SELECT SUM("year") FROM "references" WHERE "local_host_s"='sai';
## Task Generate a SQL query to answer the following question: `What is the sum of year with the local host Sai?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "year" real, "conference" text, "city" text, "country" text, "local_host_s" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of year with the local host Sai?`: ```sql
SELECT "local_host_s" FROM "references" WHERE "country"='united states' AND "year"<2007;
## Task Generate a SQL query to answer the following question: `Who are the local hosts for the United States in years earlier than 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "year" real, "conference" text, "city" text, "country" text, "local_host_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Who are the local hosts for the United States in years earlier than 2007?`: ```sql
SELECT "city" FROM "references" WHERE "year"<2009 AND "conference"='lcc2';
## Task Generate a SQL query to answer the following question: `Which city has a conference of LCC2 and a year earlier than 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "year" real, "conference" text, "city" text, "country" text, "local_host_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Which city has a conference of LCC2 and a year earlier than 2009?`: ```sql
SELECT "class" FROM "grand_am_rolex_sports_car_series_results" WHERE "rank"='89th';
## Task Generate a SQL query to answer the following question: `Tell me the class with rank of 89th` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_am_rolex_sports_car_series_results" ( "year" real, "team" text, "make" text, "engine" text, "class" text, "rank" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the class with rank of 89th`: ```sql
SELECT MAX("year") FROM "grand_am_rolex_sports_car_series_results" WHERE "points"=3;
## Task Generate a SQL query to answer the following question: `Tell me the most year for 3 points` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_am_rolex_sports_car_series_results" ( "year" real, "team" text, "make" text, "engine" text, "class" text, "rank" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the most year for 3 points`: ```sql
SELECT "lane" FROM "heats" WHERE "swimmer"='goksu bicer';
## Task Generate a SQL query to answer the following question: `Which lane is Goksu Bicer in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heats" ( "heat_rank" real, "lane" real, "swimmer" text, "country" text, "time" real, "overall_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `Which lane is Goksu Bicer in?`: ```sql
SELECT "driver" FROM "race" WHERE "grid"<9 AND "time_retired"='2:06:26.358';
## Task Generate a SQL query to answer the following question: `Which Driver that has a Grid less than 9 and a Time/Retired of 2:06:26.358?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Driver that has a Grid less than 9 and a Time/Retired of 2:06:26.358?`: ```sql
SELECT "driver" FROM "race" WHERE "constructor"='ferrari' AND "grid"<3;
## Task Generate a SQL query to answer the following question: `Which driver drove a Ferrari in the 2007 European Grand Prix with a grid less than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `Which driver drove a Ferrari in the 2007 European Grand Prix with a grid less than 3?`: ```sql
SELECT "location" FROM "mixed_martial_arts_record" WHERE "event"='ufc 98';
## Task Generate a SQL query to answer the following question: `Name the location of ufc 98` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the location of ufc 98`: ```sql
SELECT MIN("wins") FROM "summary" WHERE "tournament"='totals' AND "top_25">3;
## Task Generate a SQL query to answer the following question: `What is the smallest number of wins for the Totals Tournament with a Top-25 value greater than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of wins for the Totals Tournament with a Top-25 value greater than 3?`: ```sql
SELECT SUM("top_5") FROM "summary" WHERE "events"<2;
## Task Generate a SQL query to answer the following question: `What is the sum of Top-5 values with events values less than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of Top-5 values with events values less than 2?`: ```sql
SELECT MIN("wins") FROM "summary" WHERE "cuts_made">4 AND "top_5"<1;
## Task Generate a SQL query to answer the following question: `What is the smallest value for Wins when the number of cuts is greater than 4 and the Top-5 value is less than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest value for Wins when the number of cuts is greater than 4 and the Top-5 value is less than 1?`: ```sql
SELECT "competition" FROM "achievements" WHERE "position"='2nd' AND "year">2005;
## Task Generate a SQL query to answer the following question: `Tell me the competition for 2nd position with year more than 2005` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the competition for 2nd position with year more than 2005`: ```sql
SELECT SUM("year") FROM "achievements" WHERE "position"='2nd' AND "event"='junior race';
## Task Generate a SQL query to answer the following question: `Name the sum of year for 2nd position for junior race` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the sum of year for 2nd position for junior race`: ```sql
SELECT "venue" FROM "achievements" WHERE "year"<2008 AND "position"='2nd';
## Task Generate a SQL query to answer the following question: `Name the venue for 2nd position of year before 2008` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the venue for 2nd position of year before 2008`: ```sql
SELECT "circuit" FROM "non_championship_grands_prix" WHERE "winning_driver"='raymond mays';
## Task Generate a SQL query to answer the following question: `Which circuit did Raymond Mays win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_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 `Which circuit did Raymond Mays win?`: ```sql
SELECT "circuit" FROM "non_championship_grands_prix" WHERE "winning_driver"='johnny wakefield';
## Task Generate a SQL query to answer the following question: `Which Circuit did Johnny Wakefield win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_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 `Which Circuit did Johnny Wakefield win?`: ```sql
SELECT MIN("bronze") FROM "medal_table" WHERE "nation"='panama' AND "total">8;
## Task Generate a SQL query to answer the following question: `Tell me the lowest bronze for panama and total larger than 8` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the lowest bronze for panama and total larger than 8`: ```sql
SELECT AVG("total") FROM "medal_table" WHERE "nation"='guatemala' AND "bronze"<2;
## Task Generate a SQL query to answer the following question: `Tell me the average total for guatemala and bronze less than 2` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average total for guatemala and bronze less than 2`: ```sql