output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT MIN("matches") FROM "1966_season_finished_1st_54pts_out_of_19" WHERE "bonus_pts"=19 AND "total_points">421;
## Task Generate a SQL query to answer the following question: `What is the smallest number of matches with Bonus Pts of 19 and Total Points greater than 421?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1966_season_finished_1st_54pts_out_of_19" ( "rider" text, "matches" real, "rides" real, "bonus_pts" real, "total_points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of matches with Bonus Pts of 19 and Total Points greater than 421?`: ```sql
SELECT "category" FROM "winners_from_2004" WHERE "date"<2006 AND "rider_2"='bart brentjens';
## Task Generate a SQL query to answer the following question: `Which category earlier than 2006 has Bart Brentjens as rider 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_from_2004" ( "date" real, "category" text, "team" text, "rider_1" text, "rider_2" text ); ### SQL Given the database schema, here is the SQL query that answers `Which category earlier than 2006 has Bart Brentjens as rider 2?`: ```sql
SELECT COUNT("date") FROM "winners_from_2004" WHERE "category"='ladies' AND "team"='rothaus-cube';
## Task Generate a SQL query to answer the following question: `How many dates does the ladies category correspond to Rothaus-Cube?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_from_2004" ( "date" real, "category" text, "team" text, "rider_1" text, "rider_2" text ); ### SQL Given the database schema, here is the SQL query that answers `How many dates does the ladies category correspond to Rothaus-Cube?`: ```sql
SELECT "category" FROM "winners_from_2004" WHERE "team"='cannondale vredestein';
## Task Generate a SQL query to answer the following question: `Which category has a team of Cannondale Vredestein?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners_from_2004" ( "date" real, "category" text, "team" text, "rider_1" text, "rider_2" text ); ### SQL Given the database schema, here is the SQL query that answers `Which category has a team of Cannondale Vredestein?`: ```sql
SELECT "qual" FROM "indy_500_results" WHERE "rank"='9';
## Task Generate a SQL query to answer the following question: `What is the qual with a rank 9?` ### 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 is the qual with a rank 9?`: ```sql
SELECT "finish" FROM "indy_500_results" WHERE "year"='1956';
## Task Generate a SQL query to answer the following question: `What is the finish in 1956?` ### 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 is the finish in 1956?`: ```sql
SELECT "finish" FROM "indy_500_results" WHERE "laps"=200 AND "start"='3';
## Task Generate a SQL query to answer the following question: `What is the finish with 200 laps and a start of 3?` ### 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 is the finish with 200 laps and a start of 3?`: ```sql
SELECT "qual" FROM "indy_500_results" WHERE "laps"=200 AND "rank"='27';
## Task Generate a SQL query to answer the following question: `What is the qual with 200 laps and a rank of 27?` ### 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 is the qual with 200 laps and a rank of 27?`: ```sql
SELECT "rank" FROM "indy_500_results" WHERE "finish"='14';
## Task Generate a SQL query to answer the following question: `What is the rank with a 14 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 `What is the rank with a 14 finish?`: ```sql
SELECT MIN("year") FROM "previous_winners" WHERE "women_s_singles"='deng xuan';
## Task Generate a SQL query to answer the following question: `When did Deng Xuan first win Women's singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Deng Xuan first win Women's singles?`: ```sql
SELECT MIN("year") FROM "previous_winners" WHERE "women_s_singles"='julie still';
## Task Generate a SQL query to answer the following question: `When did Julie Still first win Women's singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Julie Still first win Women's singles?`: ```sql
SELECT MIN("cuts_made") FROM "summary" WHERE "tournament"='masters tournament' AND "top_25"<0;
## Task Generate a SQL query to answer the following question: `What is the lowest cuts made of the Masters tournament, which had a top-25 less than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest cuts made of the Masters tournament, which had a top-25 less than 0?`: ```sql
SELECT MAX("wins") FROM "summary" WHERE "cuts_made"=1 AND "top_25"<1 AND "events"<2;
## Task Generate a SQL query to answer the following question: `What is the highest number of wins a tournament with 1 cuts made, a top-25 less than 1, and less than 2 events has?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of wins a tournament with 1 cuts made, a top-25 less than 1, and less than 2 events has?`: ```sql
SELECT AVG("events") FROM "summary" WHERE "tournament"='masters tournament' AND "top_25">0;
## Task Generate a SQL query to answer the following question: `What is the average number of events the Masters tournament, which has more than 0 top-25, has?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average number of events the Masters tournament, which has more than 0 top-25, has?`: ```sql
SELECT COUNT("top_25") FROM "summary" WHERE "events"<2;
## Task Generate a SQL query to answer the following question: `What is the total number of top-25 a tournament with less than 2 events has?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of top-25 a tournament with less than 2 events has?`: ```sql
SELECT "women_s_doubles" FROM "previous_winners" WHERE "men_s_singles"='nikhil kanetkar';
## Task Generate a SQL query to answer the following question: `Who won Women's doubles when Nikhil Kanetkar won Men's singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won Women's doubles when Nikhil Kanetkar won Men's singles?`: ```sql
SELECT "women_s_doubles" FROM "previous_winners" WHERE "women_s_singles"='zen yaqiong';
## Task Generate a SQL query to answer the following question: `Who won Women's doubles when Zen Yaqiong won Women's singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won Women's doubles when Zen Yaqiong won Women's singles?`: ```sql
SELECT "date" FROM "game_log" WHERE "loss"='gott (2-7)';
## Task Generate a SQL query to answer the following question: `What was the date of the game that had a loss of Gott (2-7)?` ### 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, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of the game that had a loss of Gott (2-7)?`: ```sql
SELECT "opponent" FROM "game_log" WHERE "record"='54-58';
## Task Generate a SQL query to answer the following question: `Who was the opponent at the game when the record was 54-58?` ### 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, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent at the game when the record was 54-58?`: ```sql
SELECT "score" FROM "game_log" WHERE "record"='59-65';
## Task Generate a SQL query to answer the following question: `What was the score of the game when the record was 59-65?` ### 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, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score of the game when the record was 59-65?`: ```sql
SELECT "opponent" FROM "game_log" WHERE "loss"='caldwell (10-11)';
## Task Generate a SQL query to answer the following question: `Who was the opponent at the game that had a loss of Caldwell (10-11)?` ### 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, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent at the game that had a loss of Caldwell (10-11)?`: ```sql
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "time"='1:26';
## Task Generate a SQL query to answer the following question: `Which opponent had a time of 1:26?` ### 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 `Which opponent had a time of 1:26?`: ```sql
SELECT "date" FROM "game_log" WHERE "opponent"='royals' AND "record"='18-12';
## Task Generate a SQL query to answer the following question: `What was the date of the game with the Kansas City Royals when the Blue Jays record was 18-12?` ### 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 date of the game with the Kansas City Royals when the Blue Jays record was 18-12?`: ```sql
SELECT "catalogue" FROM "release_history_and_variations" WHERE "region"='uk' AND "format"='vinyl' AND "date"='1986';
## Task Generate a SQL query to answer the following question: `Which catalogue is from the UK region, and is on vinyl, and was dated in 1986?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Which catalogue is from the UK region, and is on vinyl, and was dated in 1986?`: ```sql
SELECT "region" FROM "release_history_and_variations" WHERE "label"='bronze' AND "catalogue"='202 876-270';
## Task Generate a SQL query to answer the following question: `What region has a bronze label and a catalogue of 202 876-270?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `What region has a bronze label and a catalogue of 202 876-270?`: ```sql
SELECT "label" FROM "release_history_and_variations" WHERE "region"='germany';
## Task Generate a SQL query to answer the following question: `Which label is from the Germany region?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Which label is from the Germany region?`: ```sql
SELECT "label" FROM "release_history_and_variations" WHERE "catalogue"='brol 34531';
## Task Generate a SQL query to answer the following question: `What label has brol 34531 as it's catalogue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `What label has brol 34531 as it's catalogue?`: ```sql
SELECT "label" FROM "release_history_and_variations" WHERE "region"='uk' AND "date"='1986' AND "format"='cd';
## Task Generate a SQL query to answer the following question: `Which label has UK for its region, is on a CD, and is dated from 1986?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Which label has UK for its region, is on a CD, and is dated from 1986?`: ```sql
SELECT "catalogue" FROM "release_history_and_variations" WHERE "label"='essential, castle music';
## Task Generate a SQL query to answer the following question: `Which catalogue has essential, castle music as it's label?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history_and_variations" ( "date" text, "region" text, "label" text, "catalogue" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `Which catalogue has essential, castle music as it's label?`: ```sql
SELECT "period_active" FROM "120_million_to_199_million_records" WHERE "release_year_of_first_charted_record"=1973 AND "genre"='rock';
## Task Generate a SQL query to answer the following question: `What's the period of a rock album released in 1973?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "120_million_to_199_million_records" ( "artist" text, "country_of_origin" text, "period_active" text, "release_year_of_first_charted_record" real, "genre" text, "claimed_sales" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the period of a rock album released in 1973?`: ```sql
SELECT "pick_num" FROM "indianapolis_colts_draft_history" WHERE "name"='bill atessis';
## Task Generate a SQL query to answer the following question: `Name the pick number for bill atessis` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indianapolis_colts_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the pick number for bill atessis`: ```sql
SELECT COUNT("overall") FROM "indianapolis_colts_draft_history" WHERE "position"='defensive tackle';
## Task Generate a SQL query to answer the following question: `Name the total number of overall for defensive tackle` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indianapolis_colts_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of overall for defensive tackle`: ```sql
SELECT MAX("2012_list") FROM "divided_in_countries" WHERE "2010_list"<13 AND "2009_list"=0 AND "2008_list">4;
## Task Generate a SQL query to answer the following question: `What is the 2012-list rank of a country with the lowest 2012-list rank out of all the countries with a 2010-list rank better than 13, a 2009-list rank of 0, a 2008-list rank lower than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "divided_in_countries" ( "country" text, "2008_list" real, "2009_list" real, "2010_list" real, "2011_list" real, "2012_list" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2012-list rank of a country with the lowest 2012-list rank out of all the countries with a 2010-list rank better than 13, a 2009-list rank of 0, a 2008-list rank lower than 4?`: ```sql
SELECT "engine" FROM "complete_formula_one_world_championship_" WHERE "entrant"='daimler benz ag';
## Task Generate a SQL query to answer the following question: `Which engine has daimler benz ag as an entrant?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which engine has daimler benz ag as an entrant?`: ```sql
SELECT "year_s_won" FROM "made_the_cut" WHERE "to_par"='+6';
## Task Generate a SQL query to answer the following question: `In which years was the to par +6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `In which years was the to par +6?`: ```sql
SELECT MIN("total") FROM "made_the_cut" WHERE "year_s_won"='1991';
## Task Generate a SQL query to answer the following question: `In 1991, what was the lowest total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `In 1991, what was the lowest total?`: ```sql
SELECT SUM("lane") FROM "heats" WHERE "rank">22;
## Task Generate a SQL query to answer the following question: `What are the total lanes that have a rank larger than 22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heats" ( "rank" real, "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the total lanes that have a rank larger than 22?`: ```sql
SELECT "name" FROM "heats" WHERE "rank">2 AND "lane"=1 AND "nationality"='hong kong';
## Task Generate a SQL query to answer the following question: `Which one has a rank bigger than 2, lane of 1, and is from Hong Kong?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heats" ( "rank" real, "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Which one has a rank bigger than 2, lane of 1, and is from Hong Kong?`: ```sql
SELECT SUM("rank") FROM "heats" WHERE "nationality"='japan' AND "lane"<7 AND "heat"<3;
## Task Generate a SQL query to answer the following question: `What rank is from Japan, has a lane smaller than 7 and a heat smaller than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heats" ( "rank" real, "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What rank is from Japan, has a lane smaller than 7 and a heat smaller than 3?`: ```sql
SELECT SUM("losses") FROM "managers" WHERE "manager"='jim hoff' AND "wins"<12;
## Task Generate a SQL query to answer the following question: `What was Jim Hoff's sum of losses and a wins smaller than 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managers" ( "manager" text, "years" text, "games" real, "wins" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What was Jim Hoff's sum of losses and a wins smaller than 12?`: ```sql
SELECT AVG("wins") FROM "managers" WHERE "years"='1978' AND "games"<141;
## Task Generate a SQL query to answer the following question: `What was the average of games that were one in 1978 that were smaller than 141?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managers" ( "manager" text, "years" text, "games" real, "wins" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the average of games that were one in 1978 that were smaller than 141?`: ```sql
SELECT SUM("games") FROM "managers" WHERE "manager"='richie hebner' AND "wins"<34;
## Task Generate a SQL query to answer the following question: `What was the sum of Richie Hebner winning games that were smaller 34?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managers" ( "manager" text, "years" text, "games" real, "wins" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the sum of Richie Hebner winning games that were smaller 34?`: ```sql
SELECT AVG("wins") FROM "managers" WHERE "games"<3 AND "manager"='george scherger' AND "losses"<1;
## Task Generate a SQL query to answer the following question: `What was the average of wins with manager George Scherger smaller than 3 and losses smaller than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managers" ( "manager" text, "years" text, "games" real, "wins" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the average of wins with manager George Scherger smaller than 3 and losses smaller than 1?`: ```sql
SELECT "date" FROM "1994_95_season_as_a_two_year_old" WHERE "race"='golden slipper';
## Task Generate a SQL query to answer the following question: `When was the golden slipper race?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994_95_season_as_a_two_year_old" ( "result" text, "date" text, "race" text, "venue" text, "group" text, "distance" text, "weight_kg" real, "jockey" text, "winner_2nd" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the golden slipper race?`: ```sql
SELECT "race" FROM "1994_95_season_as_a_two_year_old" WHERE "weight_kg"<55.5;
## Task Generate a SQL query to answer the following question: `In which races did the jockey weigh less than 55.5 kg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994_95_season_as_a_two_year_old" ( "result" text, "date" text, "race" text, "venue" text, "group" text, "distance" text, "weight_kg" real, "jockey" text, "winner_2nd" text ); ### SQL Given the database schema, here is the SQL query that answers `In which races did the jockey weigh less than 55.5 kg?`: ```sql
SELECT "result" FROM "1994_95_season_as_a_two_year_old" WHERE "venue"='rosehill' AND "race"='todman stakes';
## Task Generate a SQL query to answer the following question: `What was the result of the Todman stakes race at rosehill?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994_95_season_as_a_two_year_old" ( "result" text, "date" text, "race" text, "venue" text, "group" text, "distance" text, "weight_kg" real, "jockey" text, "winner_2nd" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result of the Todman stakes race at rosehill?`: ```sql
SELECT "country" FROM "final_leaderboard" WHERE "player"='ky laffoon';
## Task Generate a SQL query to answer the following question: `What Country has Player Ky Laffoon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What Country has Player Ky Laffoon?`: ```sql
SELECT "player" FROM "final_leaderboard" WHERE "country"='united states' AND "money"=356;
## Task Generate a SQL query to answer the following question: `What Player is from the Country United States and Money ($) of 356?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What Player is from the Country United States and Money ($) of 356?`: ```sql
SELECT "player" FROM "final_leaderboard" WHERE "to_par"='+1' AND "score"='75-70-71-73=289';
## Task Generate a SQL query to answer the following question: `What Player has a To par of +1 and the Score 75-70-71-73=289?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What Player has a To par of +1 and the Score 75-70-71-73=289?`: ```sql
SELECT "outcome" FROM "doubles_finals_29_12_17" WHERE "tournament"='rome 2, italy';
## Task Generate a SQL query to answer the following question: `What was the outcome for the Rome 2, Italy tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_finals_29_12_17" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the outcome for the Rome 2, Italy tournament?`: ```sql
SELECT "outcome" FROM "doubles_finals_29_12_17" WHERE "opponents_in_the_final"='marius călugăru ciprian petre porumb';
## Task Generate a SQL query to answer the following question: `What was the outcome of the match opponents in the final of Marius Călugăru Ciprian Petre Porumb?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_finals_29_12_17" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the outcome of the match opponents in the final of Marius Călugăru Ciprian Petre Porumb?`: ```sql
SELECT SUM("gold") FROM "total" WHERE "total"=11 AND "bronze"<3;
## Task Generate a SQL query to answer the following question: `How many golds have a Total of 11, and a Bronze smaller than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "total" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many golds have a Total of 11, and a Bronze smaller than 3?`: ```sql
SELECT SUM("gold") FROM "total" WHERE "bronze"=0 AND "total">1 AND "nation"='chad' AND "silver">0;
## Task Generate a SQL query to answer the following question: `How many golds have a Bronze of 0, a Total larger than 1, a Nation of chad, and a Silver larger than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "total" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many golds have a Bronze of 0, a Total larger than 1, a Nation of chad, and a Silver larger than 0?`: ```sql
SELECT MIN("silver") FROM "total" WHERE "gold"=1 AND "nation"='lithuania';
## Task Generate a SQL query to answer the following question: `What is the smallest silver with a Gold of 1, and a Nation of lithuania?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "total" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest silver with a Gold of 1, and a Nation of lithuania?`: ```sql
SELECT COUNT("bronze") FROM "total" WHERE "gold">1 AND "rank"=2 AND "silver"<12;
## Task Generate a SQL query to answer the following question: `What is the total bronze with a Gold larger than 1, a Rank of 2, and a Silver smaller than 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "total" ( "rank" real, "nation" 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 bronze with a Gold larger than 1, a Rank of 2, and a Silver smaller than 12?`: ```sql
SELECT "visiting_team" FROM "2000" WHERE "date"='december 23';
## Task Generate a SQL query to answer the following question: `Which Visiting Team is on december 23?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000" ( "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 `Which Visiting Team is on december 23?`: ```sql
SELECT "host_team" FROM "2000" WHERE "final_score"='42-23';
## Task Generate a SQL query to answer the following question: `Which Host Team has Final Score of 42-23?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000" ( "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 `Which Host Team has Final Score of 42-23?`: ```sql
SELECT "date" FROM "2000" WHERE "final_score"='31-7';
## Task Generate a SQL query to answer the following question: `When did Final Score of 31-7 happen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000" ( "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 did Final Score of 31-7 happen?`: ```sql
SELECT "score" FROM "game_log" WHERE "attendance">'33,736' AND "record"='75-68';
## Task Generate a SQL query to answer the following question: `What was the score of the Blue Jays game when their record was 75-68 and the attendance was larger than 33,736?` ### 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" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score of the Blue Jays game when their record was 75-68 and the attendance was larger than 33,736?`: ```sql
SELECT "2010" FROM "singles_performance_timeline" WHERE "2011"='grand slam tournaments';
## Task Generate a SQL query to answer the following question: `Which Tournament in 2010 also has Grand Slam tournaments in 2011` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" 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 `Which Tournament in 2010 also has Grand Slam tournaments in 2011`: ```sql
SELECT AVG("attendance") FROM "game_log" WHERE "opponent"='new york mets' AND "record"='51-33';
## Task Generate a SQL query to answer the following question: `What was the average attendance when the New York Mets were opponents with a record of 51-33?` ### 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" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the average attendance when the New York Mets were opponents with a record of 51-33?`: ```sql
SELECT "visiting_team" FROM "2001" WHERE "date"='october 18';
## Task Generate a SQL query to answer the following question: `What visiting team played on October 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 visiting team played on October 18?`: ```sql
SELECT "visiting_team" FROM "2001" WHERE "stadium"='3com park' AND "date"='october 7';
## Task Generate a SQL query to answer the following question: `What visiting team played at 3com park on October 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 visiting team played at 3com park on October 7?`: ```sql
SELECT "host_team" FROM "2001" WHERE "final_score"='13-10';
## Task Generate a SQL query to answer the following question: `Which host team won on a final scoreline of 13-10?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 `Which host team won on a final scoreline of 13-10?`: ```sql
SELECT "stadium" FROM "2001" WHERE "final_score"='27-34';
## Task Generate a SQL query to answer the following question: `In what stadium did a game result in a final scoreline reading 27-34?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 `In what stadium did a game result in a final scoreline reading 27-34?`: ```sql
SELECT "visiting_team" FROM "2001" WHERE "host_team"='jacksonville jaguars';
## Task Generate a SQL query to answer the following question: `In the game in which the Jacksonville Jaguars were hosts, what was the name of the visiting team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 `In the game in which the Jacksonville Jaguars were hosts, what was the name of the visiting team?`: ```sql
SELECT "visiting_team" FROM "2001" WHERE "final_score"='18-40';
## Task Generate a SQL query to answer the following question: `Which visiting team wound up with a final score of 18-40?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2001" ( "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 `Which visiting team wound up with a final score of 18-40?`: ```sql
SELECT SUM("attendance") FROM "schedule" WHERE "week"=16;
## Task Generate a SQL query to answer the following question: `Name the sum of attendacne for 16 weeks` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the sum of attendacne for 16 weeks`: ```sql
SELECT "result" FROM "schedule" WHERE "week"<7 AND "game_site"='los angeles memorial coliseum';
## Task Generate a SQL query to answer the following question: `Name the result for week less than 7 and game sites of los angeles memorial coliseum` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the result for week less than 7 and game sites of los angeles memorial coliseum`: ```sql
SELECT "result" FROM "schedule" WHERE "week"=7;
## Task Generate a SQL query to answer the following question: `Name the result for week 7` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the result for week 7`: ```sql
SELECT COUNT("loss") FROM "rushing_sortable_options" WHERE "avg_g"='3.6' AND "gain">51;
## Task Generate a SQL query to answer the following question: `How many yards lost by the player with more gained than 51 and average/g of 3.6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rushing_sortable_options" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" text ); ### SQL Given the database schema, here is the SQL query that answers `How many yards lost by the player with more gained than 51 and average/g of 3.6?`: ```sql
SELECT SUM("gain") FROM "rushing_sortable_options" WHERE "avg_g"='26.8' AND "loss"<13;
## Task Generate a SQL query to answer the following question: `What are the gains for the player with average of 26.8 and lost yard fewer than 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rushing_sortable_options" ( "name" text, "gain" real, "loss" real, "long" real, "avg_g" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the gains for the player with average of 26.8 and lost yard fewer than 13?`: ```sql
SELECT "date" FROM "singles" WHERE "opponent_in_the_final"='flavio cipolla';
## Task Generate a SQL query to answer the following question: `When did Mathieu play against Flavio Cipolla?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Mathieu play against Flavio Cipolla?`: ```sql
SELECT "tournament" FROM "singles" WHERE "score_in_the_final"='6–3, 6–2';
## Task Generate a SQL query to answer the following question: `Which tournament had a final score of 6–3, 6–2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which tournament had a final score of 6–3, 6–2?`: ```sql
SELECT "surface" FROM "singles" WHERE "opponent_in_the_final"='antonio veić';
## Task Generate a SQL query to answer the following question: `On which surface did Mathieu play against Antonio Veić?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `On which surface did Mathieu play against Antonio Veić?`: ```sql
SELECT "date" FROM "singles" WHERE "opponent_in_the_final"='antonio veić';
## Task Generate a SQL query to answer the following question: `When did Mathieu play against Antonio Veić?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Mathieu play against Antonio Veić?`: ```sql
SELECT "date" FROM "singles" WHERE "opponent_in_the_final"='andrey golubev';
## Task Generate a SQL query to answer the following question: `When did Mathieu play against Andrey Golubev?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Mathieu play against Andrey Golubev?`: ```sql
SELECT "opened" FROM "locations" WHERE "drop_height"='272feet';
## Task Generate a SQL query to answer the following question: `What opened with a drop height of 272feet?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "locations" ( "park" text, "tower_height" text, "drop_height" text, "speed" text, "model" text, "opened" text, "height_requirement" text ); ### SQL Given the database schema, here is the SQL query that answers `What opened with a drop height of 272feet?`: ```sql
SELECT "speed" FROM "locations" WHERE "model"='giant drop' AND "drop_height"='200feet';
## Task Generate a SQL query to answer the following question: `What was the speed of 200feet Giant Drop attraction?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "locations" ( "park" text, "tower_height" text, "drop_height" text, "speed" text, "model" text, "opened" text, "height_requirement" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the speed of 200feet Giant Drop attraction?`: ```sql
SELECT "park" FROM "locations" WHERE "opened"='1999';
## Task Generate a SQL query to answer the following question: `What park opened in 1999?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "locations" ( "park" text, "tower_height" text, "drop_height" text, "speed" text, "model" text, "opened" text, "height_requirement" text ); ### SQL Given the database schema, here is the SQL query that answers `What park opened in 1999?`: ```sql
SELECT "record" FROM "december" WHERE "home"='detroit' AND "decision"='denis';
## Task Generate a SQL query to answer the following question: `Name the record for detroit and decision of denis` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "december" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the record for detroit and decision of denis`: ```sql
SELECT AVG("attendance") FROM "december" WHERE "visitor"='dallas';
## Task Generate a SQL query to answer the following question: `Name the average attendance with dallas visitor` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "december" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the average attendance with dallas visitor`: ```sql
SELECT "to_par" FROM "second_round" WHERE "player"='tom kite';
## Task Generate a SQL query to answer the following question: `How close to par was Tom Kite when he played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `How close to par was Tom Kite when he played?`: ```sql
SELECT "country" FROM "second_round" WHERE "score"='71-72=143';
## Task Generate a SQL query to answer the following question: `Which of the countries showed a score of 71-72=143?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the countries showed a score of 71-72=143?`: ```sql
SELECT "country" FROM "second_round" WHERE "place"='t9' AND "score"='72-72=144' AND "player"='tom watson';
## Task Generate a SQL query to answer the following question: `Which country watch Tom Watson at t9 score 72-72=144?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country watch Tom Watson at t9 score 72-72=144?`: ```sql
SELECT "score" FROM "second_round" WHERE "to_par"='e';
## Task Generate a SQL query to answer the following question: `What was the final score when the player was an e to par?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the final score when the player was an e to par?`: ```sql
SELECT "team" FROM "college_statistics" WHERE "attempts"='307';
## Task Generate a SQL query to answer the following question: `What is the name of the team that has 307 attempts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "college_statistics" ( "year" text, "team" text, "attempts" text, "completions" text, "completion_pct" text, "yards" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the team that has 307 attempts?`: ```sql
SELECT "team" FROM "college_statistics" WHERE "attempts"='1,317';
## Task Generate a SQL query to answer the following question: `What is the name of the team that has 1,317 attempts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "college_statistics" ( "year" text, "team" text, "attempts" text, "completions" text, "completion_pct" text, "yards" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the team that has 1,317 attempts?`: ```sql
SELECT "year" FROM "college_statistics" WHERE "yards"='2,242';
## Task Generate a SQL query to answer the following question: `What year was 2,242 yards achieved?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "college_statistics" ( "year" text, "team" text, "attempts" text, "completions" text, "completion_pct" text, "yards" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was 2,242 yards achieved?`: ```sql
SELECT "team" FROM "college_statistics" WHERE "completion_pct"='59.8%';
## Task Generate a SQL query to answer the following question: `Which team has a 59.8% completion rate?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "college_statistics" ( "year" text, "team" text, "attempts" text, "completions" text, "completion_pct" text, "yards" text ); ### SQL Given the database schema, here is the SQL query that answers `Which team has a 59.8% completion rate?`: ```sql
SELECT COUNT("year") FROM "complete_formula_one_world_championship_" WHERE "engine"='maserati straight-6';
## Task Generate a SQL query to answer the following question: `Which year has has a Engine of maserati straight-6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Which year has has a Engine of maserati straight-6?`: ```sql
SELECT "points" FROM "complete_formula_one_world_championship_" WHERE "chassis"='lancia d50' AND "year"=1954;
## Task Generate a SQL query to answer the following question: `What is the Point of Chassis of Lancia d50 in 1954` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Point of Chassis of Lancia d50 in 1954`: ```sql
SELECT "8_00" FROM "tuesday" WHERE "9_00"='chuck';
## Task Generate a SQL query to answer the following question: `What is on at 8:00 before the 9:00 showing of Chuck?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text ); ### SQL Given the database schema, here is the SQL query that answers `What is on at 8:00 before the 9:00 showing of Chuck?`: ```sql
SELECT "9_00" FROM "tuesday" WHERE "7_00"='the insider';
## Task Generate a SQL query to answer the following question: `What show comes on at 9:00 on the channel that shows the Insider at 7:00?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text ); ### SQL Given the database schema, here is the SQL query that answers `What show comes on at 9:00 on the channel that shows the Insider at 7:00?`: ```sql
SELECT "7_30" FROM "tuesday" WHERE "8_00"='the biggest loser';
## Task Generate a SQL query to answer the following question: `On the channel with The Biggest loser at 8:00, what's on at 7:30?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text ); ### SQL Given the database schema, here is the SQL query that answers `On the channel with The Biggest loser at 8:00, what's on at 7:30?`: ```sql
SELECT "7_30" FROM "tuesday" WHERE "9_00"='the tudors';
## Task Generate a SQL query to answer the following question: `What's on at 7:30 before the 9:00 showing of the Tudors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text ); ### SQL Given the database schema, here is the SQL query that answers `What's on at 7:30 before the 9:00 showing of the Tudors?`: ```sql
SELECT "9_00" FROM "tuesday" WHERE "7_30"='gossip girl';
## Task Generate a SQL query to answer the following question: `If Gossip Girl is on at 7:30, what shows at 9:00?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text ); ### SQL Given the database schema, here is the SQL query that answers `If Gossip Girl is on at 7:30, what shows at 9:00?`: ```sql
SELECT SUM("matches") FROM "best_average_in_a_career" WHERE "high_score"='299' AND "innings"<412;
## Task Generate a SQL query to answer the following question: `What is the match total for a score over 299 and under 412 innings?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_average_in_a_career" ( "matches" real, "innings" real, "not_out" real, "high_score" text, "runs" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the match total for a score over 299 and under 412 innings?`: ```sql
SELECT MAX("runs") FROM "best_average_in_a_career" WHERE "high_score"='385' AND "innings"<407;
## Task Generate a SQL query to answer the following question: `What is the high run total associated with a high score of 385 and under 407 innings?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_average_in_a_career" ( "matches" real, "innings" real, "not_out" real, "high_score" text, "runs" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the high run total associated with a high score of 385 and under 407 innings?`: ```sql
SELECT "2nd_leg" FROM "second_round" WHERE "1st_leg"='1-1' AND "team_1"='djoliba ac';
## Task Generate a SQL query to answer the following question: `Which 2nd leg has a 1st leg of 1-1 and is Team 1 djoliba ac?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_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 `Which 2nd leg has a 1st leg of 1-1 and is Team 1 djoliba ac?`: ```sql