output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT COUNT("laps") FROM "indy_500_results" WHERE "rank"='3';
## Task Generate a SQL query to answer the following question: `What is the sum of all laps with rank 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of all laps with rank 3?`: ```sql
SELECT SUM("laps") FROM "indy_500_results" WHERE "start"='10' AND "finish"='20';
## Task Generate a SQL query to answer the following question: `What is the sum of all laps starting at 10 and finishing at 20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of all laps starting at 10 and finishing at 20?`: ```sql
SELECT "rank" FROM "indy_500_results" WHERE "start"='10' AND "laps"<192;
## Task Generate a SQL query to answer the following question: `What's the rank when the start is 10 and the laps are fewer than 192?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the rank when the start is 10 and the laps are fewer than 192?`: ```sql
SELECT "rank" FROM "indy_500_results" WHERE "laps"<137 AND "qual"='116.470';
## Task Generate a SQL query to answer the following question: `What's the rank when the laps are fewer than 137 and the qual is 116.470?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the rank when the laps are fewer than 137 and the qual is 116.470?`: ```sql
SELECT "director_s" FROM "2009_i" WHERE "writer_s"='al mackay';
## Task Generate a SQL query to answer the following question: `What director worked with Al Mackay as writer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_i" ( "film" text, "director_s" text, "producer_s" text, "writer_s" text, "date" text, "award" text ); ### SQL Given the database schema, here is the SQL query that answers `What director worked with Al Mackay as writer?`: ```sql
SELECT "producer_s" FROM "2009_i" WHERE "writer_s"='robert sproul-cran';
## Task Generate a SQL query to answer the following question: `Which producer worked with Robert Sproul-cran as writer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_i" ( "film" text, "director_s" text, "producer_s" text, "writer_s" text, "date" text, "award" text ); ### SQL Given the database schema, here is the SQL query that answers `Which producer worked with Robert Sproul-cran as writer?`: ```sql
SELECT "film" FROM "2009_i" WHERE "writer_s"='al mackay';
## Task Generate a SQL query to answer the following question: `Which film did Al Mackay write?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_i" ( "film" text, "director_s" text, "producer_s" text, "writer_s" text, "date" text, "award" text ); ### SQL Given the database schema, here is the SQL query that answers `Which film did Al Mackay write?`: ```sql
SELECT "director_s" FROM "2009_i" WHERE "film"='the chapel';
## Task Generate a SQL query to answer the following question: `Who directed the film 'The Chapel'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_i" ( "film" text, "director_s" text, "producer_s" text, "writer_s" text, "date" text, "award" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the film 'The Chapel'?`: ```sql
SELECT "award" FROM "2009_i" WHERE "producer_s"='andrew ryder';
## Task Generate a SQL query to answer the following question: `What award did Andrew Ryder win as producer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_i" ( "film" text, "director_s" text, "producer_s" text, "writer_s" text, "date" text, "award" text ); ### SQL Given the database schema, here is the SQL query that answers `What award did Andrew Ryder win as producer?`: ```sql
SELECT SUM("rank") FROM "semifinal_1" WHERE "nationality"='canada' AND "lane">3;
## Task Generate a SQL query to answer the following question: `What is the total national rank of Canada with lanes larger than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total national rank of Canada with lanes larger than 3?`: ```sql
SELECT COUNT("wins") FROM "final_table" WHERE "points"='39+1' AND "draws"<7;
## Task Generate a SQL query to answer the following question: `For the team with 39+1 points and fewer than 7 draws, how many wins were scored?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `For the team with 39+1 points and fewer than 7 draws, how many wins were scored?`: ```sql
SELECT MAX("draws") FROM "final_table" WHERE "goal_difference">3 AND "losses"<8;
## Task Generate a SQL query to answer the following question: `For a goal difference greater than 3 and fewer than 8 losses, what is the most draws scored?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `For a goal difference greater than 3 and fewer than 8 losses, what is the most draws scored?`: ```sql
SELECT "club" FROM "final_table" WHERE "goals_against"<29 AND "goal_difference"<26;
## Task Generate a SQL query to answer the following question: `Which club had fewer than 29 goals against and a difference smaller than 26?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `Which club had fewer than 29 goals against and a difference smaller than 26?`: ```sql
SELECT "score" FROM "game_log" WHERE "attendance"='23,493';
## Task Generate a SQL query to answer the following question: `What was the score when the Rangers' attendance was 23,493?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score when the Rangers' attendance was 23,493?`: ```sql
SELECT "opponent" FROM "2007_game_log" WHERE "date"='april 14, 2007';
## Task Generate a SQL query to answer the following question: `Who was the opponent on the game on April 14, 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_game_log" ( "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent on the game on April 14, 2007?`: ```sql
SELECT "attendance" FROM "2007_game_log" WHERE "date"='april 8, 2007';
## Task Generate a SQL query to answer the following question: `How many people were in attendance on the game on April 8, 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_game_log" ( "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people were in attendance on the game on April 8, 2007?`: ```sql
SELECT "date" FROM "2007_game_log" WHERE "attendance"='16,404';
## Task Generate a SQL query to answer the following question: `What was the date of the game with 16,404 people?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007_game_log" ( "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of the game with 16,404 people?`: ```sql
SELECT "category" FROM "nickelodeon_movies" WHERE "winner_nominee_s"='dev patel';
## Task Generate a SQL query to answer the following question: `Which category was Dev Patel nominated for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nickelodeon_movies" ( "year" real, "category" text, "film" text, "winner_nominee_s" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which category was Dev Patel nominated for?`: ```sql
SELECT "film" FROM "nickelodeon_movies" WHERE "winner_nominee_s"='eddie murphy' AND "result"='nominated';
## Task Generate a SQL query to answer the following question: `Which film was Eddie Murphy nominated for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nickelodeon_movies" ( "year" real, "category" text, "film" text, "winner_nominee_s" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which film was Eddie Murphy nominated for?`: ```sql
SELECT "finish" FROM "indy_500_results" WHERE "start"='22';
## Task Generate a SQL query to answer the following question: `When the start is 22, what is the finish?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `When the start is 22, what is the finish?`: ```sql
SELECT "year" FROM "indy_500_results" WHERE "laps"=54;
## Task Generate a SQL query to answer the following question: `What year resulted in 54 laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What year resulted in 54 laps?`: ```sql
SELECT "date" FROM "los_angeles_kings_4_edmonton_oilers_3" WHERE "score"='2–4';
## Task Generate a SQL query to answer the following question: `On what date was the score 2–4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "los_angeles_kings_4_edmonton_oilers_3" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the score 2–4?`: ```sql
SELECT "home" FROM "los_angeles_kings_4_edmonton_oilers_3" WHERE "score"='4–3';
## Task Generate a SQL query to answer the following question: `Who was the home team when the score was 4–3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "los_angeles_kings_4_edmonton_oilers_3" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the home team when the score was 4–3?`: ```sql
SELECT "date" FROM "los_angeles_kings_4_edmonton_oilers_3" WHERE "record"='2–1';
## Task Generate a SQL query to answer the following question: `On what date was the record 2–1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "los_angeles_kings_4_edmonton_oilers_3" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the record 2–1?`: ```sql
SELECT "winning_driver" FROM "race_calendar_and_winners" WHERE "winning_team"='opel team holzer 1' AND "round"<9 AND "fastest_lap"='bernd schneider';
## Task Generate a SQL query to answer the following question: `Who was the winning driver with the winning team Opel Team Holzer 1, and a round under 9 with the fastest lap being Bernd Schneider?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "fastest_lap" text, "winning_driver" text, "winning_team" text, "winning_manufacturer" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning driver with the winning team Opel Team Holzer 1, and a round under 9 with the fastest lap being Bernd Schneider?`: ```sql
SELECT COUNT("round") FROM "race_calendar_and_winners" WHERE "winning_manufacturer"='mercedes-benz' AND "circuit"='hockenheimring';
## Task Generate a SQL query to answer the following question: `What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "fastest_lap" text, "winning_driver" text, "winning_team" text, "winning_manufacturer" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring?`: ```sql
SELECT "date" FROM "race_calendar_and_winners" WHERE "circuit"='hockenheimring' AND "winning_manufacturer"='mercedes-benz';
## Task Generate a SQL query to answer the following question: `What was the date of Circuit Hockenheimring and the winning manufacturer being Mercedes-Benz?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "fastest_lap" text, "winning_driver" text, "winning_team" text, "winning_manufacturer" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of Circuit Hockenheimring and the winning manufacturer being Mercedes-Benz?`: ```sql
SELECT "winning_driver" FROM "race_calendar_and_winners" WHERE "circuit"='lausitzring';
## Task Generate a SQL query to answer the following question: `Who was the winning driver of the Circuit of Lausitzring?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "fastest_lap" text, "winning_driver" text, "winning_team" text, "winning_manufacturer" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning driver of the Circuit of Lausitzring?`: ```sql
SELECT "city_of_license" FROM "am_radio" WHERE "brand"='txdot har';
## Task Generate a SQL query to answer the following question: `What is the city of txdot har?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "am_radio" ( "frequency" real, "callsign" text, "brand" text, "city_of_license" text, "website" text, "webcast" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the city of txdot har?`: ```sql
SELECT "website" FROM "am_radio" WHERE "brand"='radio mexicana';
## Task Generate a SQL query to answer the following question: `What was radio mexicana's website?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "am_radio" ( "frequency" real, "callsign" text, "brand" text, "city_of_license" text, "website" text, "webcast" text ); ### SQL Given the database schema, here is the SQL query that answers `What was radio mexicana's website?`: ```sql
SELECT "player" FROM "rebounds" WHERE "rank">9;
## Task Generate a SQL query to answer the following question: `Which player ranks higher than 9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rebounds" ( "rank" real, "player" text, "years" text, "games" real, "reb_avg" real, "total_rebounds" real ); ### SQL Given the database schema, here is the SQL query that answers `Which player ranks higher than 9?`: ```sql
SELECT "gross_revenue_2011" FROM "box_office_score_data" WHERE "gross_revenue_1982"='$156,315';
## Task Generate a SQL query to answer the following question: `What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "box_office_score_data" ( "venue" text, "city" text, "tickets_sold_available" text, "gross_revenue_1982" text, "gross_revenue_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?`: ```sql
SELECT "gross_revenue_2011" FROM "box_office_score_data" WHERE "gross_revenue_1982"='$156,315';
## Task Generate a SQL query to answer the following question: `What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "box_office_score_data" ( "venue" text, "city" text, "tickets_sold_available" text, "gross_revenue_1982" text, "gross_revenue_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?`: ```sql
SELECT "tickets_sold_available" FROM "box_office_score_data" WHERE "gross_revenue_2011"='$333,100';
## Task Generate a SQL query to answer the following question: `How many tickets were sold / available for the venue that had a gross revenue of $333,100 in 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "box_office_score_data" ( "venue" text, "city" text, "tickets_sold_available" text, "gross_revenue_1982" text, "gross_revenue_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `How many tickets were sold / available for the venue that had a gross revenue of $333,100 in 2011?`: ```sql
SELECT "venue" FROM "box_office_score_data" WHERE "city"='brussels, belgium';
## Task Generate a SQL query to answer the following question: `What is the venue in the city of Brussels, Belgium?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "box_office_score_data" ( "venue" text, "city" text, "tickets_sold_available" text, "gross_revenue_1982" text, "gross_revenue_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the venue in the city of Brussels, Belgium?`: ```sql
SELECT "venue" FROM "box_office_score_data" WHERE "gross_revenue_2011"='$1,325,153';
## Task Generate a SQL query to answer the following question: `What venue had gross revenues of $1,325,153 in 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "box_office_score_data" ( "venue" text, "city" text, "tickets_sold_available" text, "gross_revenue_1982" text, "gross_revenue_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue had gross revenues of $1,325,153 in 2011?`: ```sql
SELECT "2003_04" FROM "performance_and_rankings_timeline" WHERE "2007_08"='former ranking tournaments';
## Task Generate a SQL query to answer the following question: `What was held in 2003/04 when Former Ranking Tournaments was in 2007/08?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_and_rankings_timeline" ( "2003_04" text, "2004_05" text, "2007_08" text, "2009_10" text, "2010_11" text, "2011_12" text, "2012_13" text ); ### SQL Given the database schema, here is the SQL query that answers `What was held in 2003/04 when Former Ranking Tournaments was in 2007/08?`: ```sql
SELECT "2009_10" FROM "performance_and_rankings_timeline" WHERE "2003_04"='former ranking tournaments';
## Task Generate a SQL query to answer the following question: `What was held in 2009/10 with Former Ranking Tournaments in 2003/04?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_and_rankings_timeline" ( "2003_04" text, "2004_05" text, "2007_08" text, "2009_10" text, "2010_11" text, "2011_12" text, "2012_13" text ); ### SQL Given the database schema, here is the SQL query that answers `What was held in 2009/10 with Former Ranking Tournaments in 2003/04?`: ```sql
SELECT "2003_04" FROM "performance_and_rankings_timeline" WHERE "2012_13"='3r';
## Task Generate a SQL query to answer the following question: `What was held in 2003/04 when 3R was in 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_and_rankings_timeline" ( "2003_04" text, "2004_05" text, "2007_08" text, "2009_10" text, "2010_11" text, "2011_12" text, "2012_13" text ); ### SQL Given the database schema, here is the SQL query that answers `What was held in 2003/04 when 3R was in 2012?`: ```sql
SELECT "2009_10" FROM "performance_and_rankings_timeline" WHERE "2004_05"='variant format tournaments';
## Task Generate a SQL query to answer the following question: `What was held in 2009/10 when 2004/05 was Variant Format Tournaments?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_and_rankings_timeline" ( "2003_04" text, "2004_05" text, "2007_08" text, "2009_10" text, "2010_11" text, "2011_12" text, "2012_13" text ); ### SQL Given the database schema, here is the SQL query that answers `What was held in 2009/10 when 2004/05 was Variant Format Tournaments?`: ```sql
SELECT COUNT("livingstone") FROM "population" WHERE "fitzroy"<'6,406' AND "mt_morgan"<'3,967' AND "rockhampton">'52,383' AND "total_region"<'102,048';
## Task Generate a SQL query to answer the following question: `How many people are in Livingstone when less than 6,406 are in Firzroy, less than 3,967 in Mt. Morgan, more than 52,383 in Rochhampton, and less than 102,048 in total region?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "total_region" real, "rockhampton" real, "livingstone" real, "fitzroy" real, "mt_morgan" real ); ### SQL Given the database schema, here is the SQL query that answers `How many people are in Livingstone when less than 6,406 are in Firzroy, less than 3,967 in Mt. Morgan, more than 52,383 in Rochhampton, and less than 102,048 in total region?`: ```sql
SELECT COUNT("total_region") FROM "population" WHERE "fitzroy">'6,406' AND "livingstone"='27,017' AND "rockhampton"<'58,382';
## Task Generate a SQL query to answer the following question: `How many people in the total region when there are more than 6,406 in Fitzroy, 27,017 in Livinstonge, and less than 58,382 in Rochhampton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "total_region" real, "rockhampton" real, "livingstone" real, "fitzroy" real, "mt_morgan" real ); ### SQL Given the database schema, here is the SQL query that answers `How many people in the total region when there are more than 6,406 in Fitzroy, 27,017 in Livinstonge, and less than 58,382 in Rochhampton?`: ```sql
SELECT COUNT("mt_morgan") FROM "population" WHERE "total_region"='44,501' AND "year"<1933;
## Task Generate a SQL query to answer the following question: `How many people were in Mt Morgan earlier than 1933 when the Total Region had 44,501?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "total_region" real, "rockhampton" real, "livingstone" real, "fitzroy" real, "mt_morgan" real ); ### SQL Given the database schema, here is the SQL query that answers `How many people were in Mt Morgan earlier than 1933 when the Total Region had 44,501?`: ```sql
SELECT SUM("total_region") FROM "population" WHERE "mt_morgan">'5,060';
## Task Generate a SQL query to answer the following question: `What is the sum of people in the total region when more than 5,060 were in Mt. Morgan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "total_region" real, "rockhampton" real, "livingstone" real, "fitzroy" real, "mt_morgan" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of people in the total region when more than 5,060 were in Mt. Morgan?`: ```sql
SELECT SUM("swimsuit") FROM "final_competition_scores" WHERE "preliminaries"<8.27;
## Task Generate a SQL query to answer the following question: `What is the total swimsuit with Preliminaries smaller than 8.27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_competition_scores" ( "state" text, "preliminaries" real, "interview" real, "swimsuit" real, "evening_gown" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total swimsuit with Preliminaries smaller than 8.27?`: ```sql
SELECT AVG("interview") FROM "final_competition_scores" WHERE "preliminaries">8.27 AND "evening_gown"=8.85 AND "average"<8.842;
## Task Generate a SQL query to answer the following question: `What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_competition_scores" ( "state" text, "preliminaries" real, "interview" real, "swimsuit" real, "evening_gown" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842?`: ```sql
SELECT COUNT("swimsuit") FROM "final_competition_scores" WHERE "evening_gown">9 AND "interview">8.405;
## Task Generate a SQL query to answer the following question: `How many swimsuits have an Evening Gown larger than 9, and an Interview larger than 8.405?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_competition_scores" ( "state" text, "preliminaries" real, "interview" real, "swimsuit" real, "evening_gown" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `How many swimsuits have an Evening Gown larger than 9, and an Interview larger than 8.405?`: ```sql
SELECT "2000_population" FROM "u_s_census_statistics" WHERE "state_s"='ok' AND "percent_change_1990_2000"='a078 +17.22%';
## Task Generate a SQL query to answer the following question: `What is the 2000 population in OK with a 1990-2000 percent change of A078 +17.22%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_census_statistics" ( "rank_csa" text, "state_s" text, "2007_estimate" text, "2000_population" text, "percent_change_1990_2000" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2000 population in OK with a 1990-2000 percent change of A078 +17.22%?`: ```sql
SELECT "percent_change_1990_2000" FROM "u_s_census_statistics" WHERE "2007_estimate"='45,393';
## Task Generate a SQL query to answer the following question: `What is the 1990-2000 percent change of a result that is estimated to be 45,393 in 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_census_statistics" ( "rank_csa" text, "state_s" text, "2007_estimate" text, "2000_population" text, "percent_change_1990_2000" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 1990-2000 percent change of a result that is estimated to be 45,393 in 2007?`: ```sql
SELECT "rank_csa" FROM "u_s_census_statistics" WHERE "2000_population"='99,962';
## Task Generate a SQL query to answer the following question: `What is the rank of a result with a population of 99,962 in 2000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_census_statistics" ( "rank_csa" text, "state_s" text, "2007_estimate" text, "2000_population" text, "percent_change_1990_2000" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank of a result with a population of 99,962 in 2000?`: ```sql
SELECT SUM("matches") FROM "for_top_goalkeepers" WHERE "goalkeeper"='wilfredo caballero' AND "average"<1.11;
## Task Generate a SQL query to answer the following question: `How many matches did goalkeeper Wilfredo Caballero have an average less than 1.11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "for_top_goalkeepers" ( "goalkeeper" text, "goals" real, "matches" real, "average" real, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many matches did goalkeeper Wilfredo Caballero have an average less than 1.11?`: ```sql
SELECT COUNT("average") FROM "for_top_goalkeepers" WHERE "goals"<41 AND "goalkeeper"='claudio bravo';
## Task Generate a SQL query to answer the following question: `What is the average goals less than 41 that goalkeeper Claudio Bravo had?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "for_top_goalkeepers" ( "goalkeeper" text, "goals" real, "matches" real, "average" real, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average goals less than 41 that goalkeeper Claudio Bravo had?`: ```sql
SELECT MAX("average") FROM "for_top_goalkeepers" WHERE "goals"<45 AND "team"='real sociedad';
## Task Generate a SQL query to answer the following question: `What is the highest average of goals less than 45 for team Real Sociedad?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "for_top_goalkeepers" ( "goalkeeper" text, "goals" real, "matches" real, "average" real, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest average of goals less than 45 for team Real Sociedad?`: ```sql
SELECT "ceased_to_be_countess" FROM "1405_1482" WHERE "birth"='3 may 1446';
## Task Generate a SQL query to answer the following question: `When did the person born on 3 May 1446 cease to be countess?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1405_1482" ( "name" text, "father" text, "birth" text, "marriage" text, "became_countess" text, "ceased_to_be_countess" text, "death" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `When did the person born on 3 May 1446 cease to be countess?`: ```sql
SELECT "father" FROM "1405_1482" WHERE "birth"='1363';
## Task Generate a SQL query to answer the following question: `Who was the father of the person born in 1363?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1405_1482" ( "name" text, "father" text, "birth" text, "marriage" text, "became_countess" text, "ceased_to_be_countess" text, "death" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the father of the person born in 1363?`: ```sql
SELECT "marriage" FROM "1405_1482" WHERE "death"='17 december 1471';
## Task Generate a SQL query to answer the following question: `When was the marriage of the person who died on 17 December 1471?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1405_1482" ( "name" text, "father" text, "birth" text, "marriage" text, "became_countess" text, "ceased_to_be_countess" text, "death" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the marriage of the person who died on 17 December 1471?`: ```sql
SELECT "surface" FROM "fed_cup_doubles_performances_0_5" WHERE "against"='poland';
## Task Generate a SQL query to answer the following question: `On what surface did Poland play as the against team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_doubles_performances_0_5" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `On what surface did Poland play as the against team?`: ```sql
SELECT "against" FROM "fed_cup_doubles_performances_0_5" WHERE "result"='3–6, 2–6';
## Task Generate a SQL query to answer the following question: `Who was played against with a result of 3–6, 2–6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_doubles_performances_0_5" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was played against with a result of 3–6, 2–6?`: ```sql
SELECT MIN("year") FROM "achievements" WHERE "venue"='paris, france';
## Task Generate a SQL query to answer the following question: `Name the least year for paris, france venue` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "extra" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the least year for paris, france venue`: ```sql
SELECT SUM("pick") FROM "supplemental_first_round_selections" WHERE "school"='mckinney high school';
## Task Generate a SQL query to answer the following question: `What's the total number of picks for mckinney high school?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the total number of picks for mckinney high school?`: ```sql
SELECT MAX("pick") FROM "supplemental_first_round_selections" WHERE "player"='adam jones';
## Task Generate a SQL query to answer the following question: `What was the highest pick for the player Adam Jones?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the highest pick for the player Adam Jones?`: ```sql
SELECT SUM("pick") FROM "supplemental_first_round_selections" WHERE "player"='matt murton';
## Task Generate a SQL query to answer the following question: `What's the total number of picks for the player Matt Murton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the total number of picks for the player Matt Murton?`: ```sql
SELECT "position" FROM "supplemental_first_round_selections" WHERE "pick"=32;
## Task Generate a SQL query to answer the following question: `What position was pick 32?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `What position was pick 32?`: ```sql
SELECT "winner" FROM "race_calendar" WHERE "circuit"='barbagallo raceway';
## Task Generate a SQL query to answer the following question: `Who won at the Barbagallo Raceway circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won at the Barbagallo Raceway circuit?`: ```sql
SELECT "race_title" FROM "race_calendar" WHERE "circuit"='oran park raceway';
## Task Generate a SQL query to answer the following question: `What was the title of the race at Oran Park Raceway?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the title of the race at Oran Park Raceway?`: ```sql
SELECT "winner" FROM "race_calendar" WHERE "circuit"='oran park raceway';
## Task Generate a SQL query to answer the following question: `Who won at the Oran Park Raceway?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won at the Oran Park Raceway?`: ```sql
SELECT "city_state" FROM "race_calendar" WHERE "winner"='jim richards' AND "circuit"='winton motor raceway';
## Task Generate a SQL query to answer the following question: `When Jim Richards won at the Winton Motor Raceway circuit, what was the city and state listed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "city_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `When Jim Richards won at the Winton Motor Raceway circuit, what was the city and state listed?`: ```sql
SELECT "capacity_thousands_of_metric_tons" FROM "leading_copper_producing_mines" WHERE "operator"='cyprus amax minerals';
## Task Generate a SQL query to answer the following question: `What is the capacity of the mine that is operated by Cyprus Amax minerals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leading_copper_producing_mines" ( "rank" text, "mine" text, "county" text, "operator" text, "capacity_thousands_of_metric_tons" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the capacity of the mine that is operated by Cyprus Amax minerals?`: ```sql
SELECT "rank" FROM "leading_copper_producing_mines" WHERE "county"='pima' AND "mine"='silver bell';
## Task Generate a SQL query to answer the following question: `What rank is the Silver Bell mine of Pima county?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leading_copper_producing_mines" ( "rank" text, "mine" text, "county" text, "operator" text, "capacity_thousands_of_metric_tons" text ); ### SQL Given the database schema, here is the SQL query that answers `What rank is the Silver Bell mine of Pima county?`: ```sql
SELECT "capacity_thousands_of_metric_tons" FROM "leading_copper_producing_mines" WHERE "county"='gila' AND "mine"='pinto valley';
## Task Generate a SQL query to answer the following question: `What is the capacity of the Pinto Valley mine in Gila county?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leading_copper_producing_mines" ( "rank" text, "mine" text, "county" text, "operator" text, "capacity_thousands_of_metric_tons" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the capacity of the Pinto Valley mine in Gila county?`: ```sql
SELECT "1st_leg" FROM "first_round" WHERE "agg"='10-2';
## Task Generate a SQL query to answer the following question: `What is the first leg with an agg of 10-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first leg with an agg of 10-2?`: ```sql
SELECT "agg" FROM "first_round" WHERE "team_2"='vantour club mangoungou';
## Task Generate a SQL query to answer the following question: `What is the agg of team 2 for Vantour Club Mangoungou?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the agg of team 2 for Vantour Club Mangoungou?`: ```sql
SELECT "1st_leg" FROM "first_round" WHERE "team_1"='hardware stars';
## Task Generate a SQL query to answer the following question: `What is the first leg of team 1 for Hardware stars?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first leg of team 1 for Hardware stars?`: ```sql
SELECT "agg" FROM "first_round" WHERE "2nd_leg"='0-1';
## Task Generate a SQL query to answer the following question: `What is the agg with a second leg of 0-1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the agg with a second leg of 0-1?`: ```sql
SELECT "team_2" FROM "first_round" WHERE "1st_leg"='1-1' AND "agg"='3-1';
## Task Generate a SQL query to answer the following question: `What team 2 had a 1st leg of 1-1, and agg of 3-1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What team 2 had a 1st leg of 1-1, and agg of 3-1?`: ```sql
SELECT "team_2" FROM "first_round" WHERE "2nd_leg"='3-2';
## Task Generate a SQL query to answer the following question: `What team 2 had a second leg of 3-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What team 2 had a second leg of 3-2?`: ```sql
SELECT "date" FROM "matches" WHERE "opponent"='siena' AND "ground"='home';
## Task Generate a SQL query to answer the following question: `On what date was the game played at home against the opponent Siena?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "date" text, "time" text, "round" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the game played at home against the opponent Siena?`: ```sql
SELECT "time" FROM "matches" WHERE "opponent"='cagliari' AND "round"='16';
## Task Generate a SQL query to answer the following question: `What time was the game played against Cagliari that lasted 16 rounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "date" text, "time" text, "round" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What time was the game played against Cagliari that lasted 16 rounds?`: ```sql
SELECT "ground" FROM "matches" WHERE "score"='3-2' AND "time"='15:00 cet';
## Task Generate a SQL query to answer the following question: `Where was the game played that had a score of 3-2 and a time of 15:00 cet?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "date" text, "time" text, "round" text, "opponent" text, "ground" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was the game played that had a score of 3-2 and a time of 15:00 cet?`: ```sql
SELECT "score" FROM "game_log" WHERE "date"='april 18';
## Task Generate a SQL query to answer the following question: `What was the score on April 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score on April 18?`: ```sql
SELECT "attendance" FROM "game_log" WHERE "loss"='nakamura (0-1)';
## Task Generate a SQL query to answer the following question: `What was the attendance when Nakamura (0-1) lost?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the attendance when Nakamura (0-1) lost?`: ```sql
SELECT "record" FROM "game_log" WHERE "loss"='lilly (0-1)';
## Task Generate a SQL query to answer the following question: `What was their record when they lost with Lilly (0-1) pitching?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was their record when they lost with Lilly (0-1) pitching?`: ```sql
SELECT "record" FROM "game_log" WHERE "attendance"='26,827';
## Task Generate a SQL query to answer the following question: `What was their record when the attendance was 26,827?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was their record when the attendance was 26,827?`: ```sql
SELECT "december" FROM "1980_1989" WHERE "february"='anne-marie fox';
## Task Generate a SQL query to answer the following question: `Who is the December playmate with a February playmate Anne-Marie Fox?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the December playmate with a February playmate Anne-Marie Fox?`: ```sql
SELECT "august" FROM "1980_1989" WHERE "october"='shannon long';
## Task Generate a SQL query to answer the following question: `Who is the August playmate with the October playmate Shannon Long?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the August playmate with the October playmate Shannon Long?`: ```sql
SELECT "december" FROM "1980_1989" WHERE "november"='marlene janssen';
## Task Generate a SQL query to answer the following question: `Who is the December playmate with a November playmate Marlene Janssen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the December playmate with a November playmate Marlene Janssen?`: ```sql
SELECT "november" FROM "1980_1989" WHERE "july"='hope marie carlton';
## Task Generate a SQL query to answer the following question: `Who is the November playmate with the July playmate Hope Marie Carlton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the November playmate with the July playmate Hope Marie Carlton?`: ```sql
SELECT "march" FROM "1980_1989" WHERE "august"='gianna amore';
## Task Generate a SQL query to answer the following question: `Who is the March playmate with an August playmate Gianna Amore?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the March playmate with an August playmate Gianna Amore?`: ```sql
SELECT "january" FROM "1980_1989" WHERE "november"='donna edmondson';
## Task Generate a SQL query to answer the following question: `Who is the January playmate with the November playmate Donna Edmondson?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_1989" ( "january" text, "february" text, "march" text, "april" text, "june" text, "july" text, "august" text, "september" text, "october" text, "november" text, "december" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the January playmate with the November playmate Donna Edmondson?`: ```sql
SELECT "stadium" FROM "2010_season" WHERE "host_team"='tennessee titans';
## Task Generate a SQL query to answer the following question: `What is the home stadium of the Tennessee Titans?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the home stadium of the Tennessee Titans?`: ```sql
SELECT MAX("week") FROM "2010_season" WHERE "visiting_team"='houston texans';
## Task Generate a SQL query to answer the following question: `When were the Houston Texans the visiting team later in the season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); ### SQL Given the database schema, here is the SQL query that answers `When were the Houston Texans the visiting team later in the season?`: ```sql
SELECT "date" FROM "2010_season" WHERE "final_score"='24-34';
## Task Generate a SQL query to answer the following question: `The final score was 24-34 on what date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_season" ( "week" real, "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); ### SQL Given the database schema, here is the SQL query that answers `The final score was 24-34 on what date?`: ```sql
SELECT SUM("gold") FROM "performance_by_nation" WHERE "silver"=2 AND "total"<7;
## Task Generate a SQL query to answer the following question: `What is the total number of gold medals won by nations that won 2 silver medals but fewer than 7 in total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_by_nation" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of gold medals won by nations that won 2 silver medals but fewer than 7 in total?`: ```sql
SELECT SUM("total") FROM "performance_by_nation" WHERE "bronze"=7 AND "gold">18;
## Task Generate a SQL query to answer the following question: `What is the total number of medals won by nations that had 7 bronze medals and more than 18 gold medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_by_nation" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of medals won by nations that had 7 bronze medals and more than 18 gold medals?`: ```sql
SELECT MIN("gold") FROM "performance_by_nation" WHERE "silver">11 AND "rank"='1' AND "bronze"<7;
## Task Generate a SQL query to answer the following question: `What nation with Rank 1 won the fewest gold medals while winning more than 11 silver but fewer than 7 bronze medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_by_nation" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What nation with Rank 1 won the fewest gold medals while winning more than 11 silver but fewer than 7 bronze medals?`: ```sql
SELECT MAX("total") FROM "performance_by_nation" WHERE "bronze"=7 AND "silver">12;
## Task Generate a SQL query to answer the following question: `What is the highest total medals won by a nation that had 7 bronze but more than 12 silver medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_by_nation" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest total medals won by a nation that had 7 bronze but more than 12 silver medals?`: ```sql
SELECT MIN("gold") FROM "performance_by_nation" WHERE "total"=37 AND "rank"='1' AND "bronze">7;
## Task Generate a SQL query to answer the following question: `What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performance_by_nation" ( "rank" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals?`: ```sql
SELECT "score" FROM "singles_titles" WHERE "opponent"='yuliya ustyuzhanina';
## Task Generate a SQL query to answer the following question: `Name the score for yuliya ustyuzhanina` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the score for yuliya ustyuzhanina`: ```sql
SELECT "date" FROM "singles_titles" WHERE "surface"='hard' AND "tournament"='fort walton beach';
## Task Generate a SQL query to answer the following question: `Name the date for hard surface and tournament of fort walton beach` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date for hard surface and tournament of fort walton beach`: ```sql
SELECT "opponent" FROM "singles_titles" WHERE "score"='1–6, 6–4, 6–4';
## Task Generate a SQL query to answer the following question: `Name the opponent with score of 1–6, 6–4, 6–4` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_titles" ( "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the opponent with score of 1–6, 6–4, 6–4`: ```sql