chat_prompt
stringlengths 438
1.53k
|
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wairoa_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which years have a Decile smaller than 2, and an Area of mohaka?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"wairoa_district\" WHERE \"decile\"<2 AND \"area\"='mohaka';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wairoa_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which gender has an Authority of state, Years of 1\u20138, and a Decile smaller than 10, and a Roll of 36?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"wairoa_district\" WHERE \"authority\"='state' AND \"years\"='1\u20138' AND \"decile\"<10 AND \"roll\"=36;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wairoa_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which roll has an Area of mahia?"
},
{
"role": "assistant",
"content": "SELECT \"roll\" FROM \"wairoa_district\" WHERE \"area\"='mahia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wairoa_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which Decile has an Authority of state, a Roll smaller than 61, and an Area of kotemaori?"
},
{
"role": "assistant",
"content": "SELECT \"decile\" FROM \"wairoa_district\" WHERE \"authority\"='state' AND \"roll\"<61 AND \"area\"='kotemaori';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the highest League Cup with an FA Cup thats larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup\") FROM \"appearances\" WHERE \"fa_cup\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the total number of FA Cup with a Play-offs of 3, and the Name of Mitch Cook Category:Articles with hCards and has a Total thats less than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fa_cup\") FROM \"appearances\" WHERE \"play_offs\"=3 AND \"name\"='mitch cook category:articles with hcards' AND \"total\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the total of number of FA Cup that has a League small than 29 with Play-offs less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fa_cup\") FROM \"appearances\" WHERE \"league\"<29 AND \"play_offs\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the lowest Play-offs with a League of 4 and FA Cup larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"play_offs\") FROM \"appearances\" WHERE \"league\"=4 AND \"fa_cup\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"league\" real,\n \"play_offs\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What's the total number of League Cup with a Play-off larger than 2, and a Name of Mitch Cook Category:Articles with hCards?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league_cup\") FROM \"appearances\" WHERE \"play_offs\">2 AND \"name\"='mitch cook category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"episode_num\" real,\n \"title\" text,\n \"airdate\" text,\n \"viewers_millions\" real,\n \"channel_4_weekly_rank_a\" real\n);\n\nQuestion: What is the number for the Channel 4 weekly rank when there are more than 2.19 million viewers for the episode \"zero worship\" which was earlier than episode 34?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"channel_4_weekly_rank_a\") FROM \"united_kingdom\" WHERE \"viewers_millions\">2.19 AND \"title\"='\\\"zero worship\\\"' AND \"episode_num\"<34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"episode_num\" real,\n \"title\" text,\n \"airdate\" text,\n \"viewers_millions\" real,\n \"channel_4_weekly_rank_a\" real\n);\n\nQuestion: What is the average Channel 4 weekly rank for less than 2.19 million viewers on December 7, 2007?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"channel_4_weekly_rank_a\") FROM \"united_kingdom\" WHERE \"viewers_millions\"<2.19 AND \"airdate\"='december 7, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"episode_num\" real,\n \"title\" text,\n \"airdate\" text,\n \"viewers_millions\" real,\n \"channel_4_weekly_rank_a\" real\n);\n\nQuestion: What is the number of viewers in millions for the episode on October 10, 2008, and a Channel 4 weekly rank a smaller than 30?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"viewers_millions\") FROM \"united_kingdom\" WHERE \"airdate\"='october 10, 2008' AND \"channel_4_weekly_rank_a\"<30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ev_as\" (\n \"start_date_time\" text,\n \"duration\" text,\n \"end_time\" text,\n \"spacecraft\" text,\n \"crew\" text\n);\n\nQuestion: What is the duration of the flight with end time of 21:06?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"ev_as\" WHERE \"end_time\"='21:06';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ev_as\" (\n \"start_date_time\" text,\n \"duration\" text,\n \"end_time\" text,\n \"spacecraft\" text,\n \"crew\" text\n);\n\nQuestion: What is the spacecraft with end time of 4 September 04:51?"
},
{
"role": "assistant",
"content": "SELECT \"spacecraft\" FROM \"ev_as\" WHERE \"end_time\"='4 september 04:51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ev_as\" (\n \"start_date_time\" text,\n \"duration\" text,\n \"end_time\" text,\n \"spacecraft\" text,\n \"crew\" text\n);\n\nQuestion: What is the crew with the end time of 21:11?"
},
{
"role": "assistant",
"content": "SELECT \"crew\" FROM \"ev_as\" WHERE \"end_time\"='21:11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ev_as\" (\n \"start_date_time\" text,\n \"duration\" text,\n \"end_time\" text,\n \"spacecraft\" text,\n \"crew\" text\n);\n\nQuestion: What is the duration of the Expedition 20 ISS Zvezda?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"ev_as\" WHERE \"spacecraft\"='expedition 20 iss zvezda';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ev_as\" (\n \"start_date_time\" text,\n \"duration\" text,\n \"end_time\" text,\n \"spacecraft\" text,\n \"crew\" text\n);\n\nQuestion: Who was the crew for the duration of 12 minutes?"
},
{
"role": "assistant",
"content": "SELECT \"crew\" FROM \"ev_as\" WHERE \"duration\"='12 minutes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of year for connaught engineering and points less than 0"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"complete_world_championship_formula_one_\" WHERE \"entrant\"='connaught engineering' AND \"points\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"year\" text,\n \"record_a\" text,\n \"win_pct\" real,\n \"league_b\" text,\n \"division_c\" text,\n \"gb_d\" text,\n \"post_season_record_e\" text,\n \"post_season_win_pct\" text,\n \"mlb_affiliate_f\" text\n);\n\nQuestion: What is the average win percentage of a season with a GB of 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"win_pct\") FROM \"season_by_season_records\" WHERE \"gb_d\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the starting position of Joie Chitwood when he finished more than 200 laps?"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"laps\">200;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is Chitwood's lowest completed number of laps with a qualifying time of 124.619?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='124.619';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1963_1998\" (\n \"date\" text,\n \"venue\" text,\n \"score_a\" text,\n \"competition\" text,\n \"att\" text\n);\n\nQuestion: Which venue was used on 12 September 1998?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1963_1998\" WHERE \"date\"='12 september 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1963_1998\" (\n \"date\" text,\n \"venue\" text,\n \"score_a\" text,\n \"competition\" text,\n \"att\" text\n);\n\nQuestion: What is the score [A] of the match at Vanuatu (n) on 5 September 1998?"
},
{
"role": "assistant",
"content": "SELECT \"score_a\" FROM \"1963_1998\" WHERE \"venue\"='vanuatu (n)' AND \"date\"='5 september 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1963_1998\" (\n \"date\" text,\n \"venue\" text,\n \"score_a\" text,\n \"competition\" text,\n \"att\" text\n);\n\nQuestion: What is the score [A] of the match on 19 September 1998?"
},
{
"role": "assistant",
"content": "SELECT \"score_a\" FROM \"1963_1998\" WHERE \"date\"='19 september 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the record was 32\u201319\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='32\u201319\u20137';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the record was 9\u20135\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='9\u20135\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team when the record was 36\u201321\u20138?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"record\"='36\u201321\u20138';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the Calgary Flames were the visiting team and there was a record of 1\u20132\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='calgary flames' AND \"record\"='1\u20132\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team when the record was 27\u201314\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"record\"='27\u201314\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: What was the lifespan of Representative Harry P. O'neill from the state of Pennsylvania?"
},
{
"role": "assistant",
"content": "SELECT \"lifespan\" FROM \"external_links\" WHERE \"state\"='pennsylvania' AND \"representative\"='harry p. o''neill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: What years did Representative Frank A. Oliver serve?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"external_links\" WHERE \"representative\"='frank a. oliver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: Name the record for october 11"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='october 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the score with record of 68-66"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='68-66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the record for august 28"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='august 28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was the score for Leo Diegel?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round\" WHERE \"player\"='leo diegel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the name of the player with a To par of \u20134?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"to_par\"='\u20134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for the game that was played with partner Tiya Rolle?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_20_10_10\" WHERE \"partner\"='tiya rolle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the final score for the game played on January 10, 2011 with partner Mashona Washington?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_20_10_10\" WHERE \"partner\"='mashona washington' AND \"date\"='january 10, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome for the game that was played on 07-Jun-2010?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_20_10_10\" WHERE \"date\"='07-jun-2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the score for the game that was played on 29-Jun-2009?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_20_10_10\" WHERE \"date\"='29-jun-2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_10_10\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface for the game that was played on 12-Apr-2005?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_20_10_10\" WHERE \"date\"='12-apr-2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"global_challenge_2004_5\" (\n \"overall_place\" text,\n \"yacht_name\" text,\n \"skipper\" text,\n \"points\" text,\n \"combined_elapsed_time\" text\n);\n\nQuestion: What points has james allen as the skipper?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"global_challenge_2004_5\" WHERE \"skipper\"='james allen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"global_challenge_2004_5\" (\n \"overall_place\" text,\n \"yacht_name\" text,\n \"skipper\" text,\n \"points\" text,\n \"combined_elapsed_time\" text\n);\n\nQuestion: What is the name of the yacht where 12 is the overall place?"
},
{
"role": "assistant",
"content": "SELECT \"yacht_name\" FROM \"global_challenge_2004_5\" WHERE \"overall_place\"='12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"global_challenge_2004_5\" (\n \"overall_place\" text,\n \"yacht_name\" text,\n \"skipper\" text,\n \"points\" text,\n \"combined_elapsed_time\" text\n);\n\nQuestion: Which skipper has a combine elapsed time of 174d 01h 11m 59s?"
},
{
"role": "assistant",
"content": "SELECT \"skipper\" FROM \"global_challenge_2004_5\" WHERE \"combined_elapsed_time\"='174d 01h 11m 59s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"global_challenge_2004_5\" (\n \"overall_place\" text,\n \"yacht_name\" text,\n \"skipper\" text,\n \"points\" text,\n \"combined_elapsed_time\" text\n);\n\nQuestion: Which skipper has barclays adventurer as the name of the yacht?"
},
{
"role": "assistant",
"content": "SELECT \"skipper\" FROM \"global_challenge_2004_5\" WHERE \"yacht_name\"='barclays adventurer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"global_challenge_2004_5\" (\n \"overall_place\" text,\n \"yacht_name\" text,\n \"skipper\" text,\n \"points\" text,\n \"combined_elapsed_time\" text\n);\n\nQuestion: What is the overall place that has 170d 11h 31m 10s as the combined elapsed time?"
},
{
"role": "assistant",
"content": "SELECT \"overall_place\" FROM \"global_challenge_2004_5\" WHERE \"combined_elapsed_time\"='170d 11h 31m 10s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_judges\" (\n \"state\" text,\n \"born_died\" text,\n \"chief_judge\" text,\n \"senior_status\" text,\n \"appointed_by\" text,\n \"reason_for_termination\" text\n);\n\nQuestion: What was the senior status for the judge who was terminated because of death, with a Chief Judge entry of \u2014?"
},
{
"role": "assistant",
"content": "SELECT \"senior_status\" FROM \"former_judges\" WHERE \"reason_for_termination\"='death' AND \"chief_judge\"='\u2014';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paralympic_men\" (\n \"classification\" text,\n \"fastest_time_s\" real,\n \"athlete\" text,\n \"country\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What is the location of Classification of T12?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"paralympic_men\" WHERE \"classification\"='t12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"paralympic_men\" (\n \"classification\" text,\n \"fastest_time_s\" real,\n \"athlete\" text,\n \"country\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What is the fastest time for athlete Jason Smyth?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_time_s\" FROM \"paralympic_men\" WHERE \"athlete\"='jason smyth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text,\n \"no_11\" text,\n \"no_12\" text,\n \"no_13\" text,\n \"no_14\" text,\n \"no_15\" text,\n \"final\" text\n);\n\nQuestion: What was the final of play No. 2, Alzira Ricardo B.?"
},
{
"role": "assistant",
"content": "SELECT \"final\" FROM \"nominations\" WHERE \"no_2\"='alzira ricardo b.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text,\n \"no_11\" text,\n \"no_12\" text,\n \"no_13\" text,\n \"no_14\" text,\n \"no_15\" text,\n \"final\" text\n);\n\nQuestion: What was the No. 10 team that has No. 8 of Diana?"
},
{
"role": "assistant",
"content": "SELECT \"no_10\" FROM \"nominations\" WHERE \"no_8\"='diana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of years for chassis of ensign n175"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='ensign n175';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Blue Jays lowest attendance when their record was 52-48?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"record\"='52-48';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the result when you play at home against Pride"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"home_away\"='home' AND \"opponent\"='pride';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the result of games played at frontier field"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"field\"='frontier field';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What days were games played at Hofstra Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"field\"='hofstra stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What Field was played at in an away game against the bayhawks?"
},
{
"role": "assistant",
"content": "SELECT \"field\" FROM \"schedule\" WHERE \"home_away\"='away' AND \"opponent\"='bayhawks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game played on February 18?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='february 18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team that played against the Boston Bruins on January 11?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"visitor\"='boston bruins' AND \"date\"='january 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: Name the sum of year for olimpija ljubljana with height less than 2.04"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year_born\") FROM \"fiba_euro_basket_2007_squads\" WHERE \"current_club\"='olimpija ljubljana' AND \"height\"<2.04;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: Name the position with height of 2.09"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"height\"=2.09;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance at the ballpark during the game where the Blue Jays had a record of 26-35 during the 1996 season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"record\"='26-35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What nominated work received a tony award in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"award\"='tony award' AND \"year\"=2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What result in the table is from the year 2012?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"year\"=2012;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2011 with 2010 of 2r"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"women_s_doubles\" WHERE \"2010\"='2r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2012 when 2011 is qf"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"women_s_doubles\" WHERE \"2011\"='qf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2012 for 2011 being 1r"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"women_s_doubles\" WHERE \"2011\"='1r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2012 for 2011 being qf"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"women_s_doubles\" WHERE \"2011\"='qf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2008 for 2012 f"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"women_s_doubles\" WHERE \"2012\"='f';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_results_and_forthcoming_fixtures\" (\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"scorers_for_chad\" text,\n \"competition\" text\n);\n\nQuestion: What is the location of the match on February 29, 2012?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"recent_results_and_forthcoming_fixtures\" WHERE \"date\"='february 29, 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recent_results_and_forthcoming_fixtures\" (\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"scorers_for_chad\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the match on November 15, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"recent_results_and_forthcoming_fixtures\" WHERE \"date\"='november 15, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race\" real,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: How many races were in the Mallala Motor Sport Park circuit?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"race\") FROM \"race_calendar\" WHERE \"circuit\"='mallala motor sport park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race\" real,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What was the first race in Launceston, Tasmania?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"race\") FROM \"race_calendar\" WHERE \"location_state\"='launceston, tasmania';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Name the 2nd leg for team 1 of hamburg"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"round_of_16\" WHERE \"team_1\"='hamburg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Name the role for mono studio and title of paradise canyon"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"1935\" WHERE \"studio\"='mono' AND \"title\"='paradise canyon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Name the title for marion burns leading lady and role of john mason"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1935\" WHERE \"leading_lady\"='marion burns' AND \"role\"='john mason';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Name the role for studio of rep with sheila mannors leading lady and title of westward ho"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"1935\" WHERE \"studio\"='rep' AND \"leading_lady\"='sheila mannors' AND \"title\"='westward ho';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Name the studio for john scott"
},
{
"role": "assistant",
"content": "SELECT \"studio\" FROM \"1935\" WHERE \"role\"='john scott';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emigration_of_jews_and_their_family_memb\" (\n \"year\" text,\n \"total_000s\" real,\n \"israel\" real,\n \"germany\" real,\n \"jews_halakha_in_israel\" text\n);\n\nQuestion: What is the amount of 000s from 1996?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_000s\") FROM \"emigration_of_jews_and_their_family_memb\" WHERE \"year\"='1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emigration_of_jews_and_their_family_memb\" (\n \"year\" text,\n \"total_000s\" real,\n \"israel\" real,\n \"germany\" real,\n \"jews_halakha_in_israel\" text\n);\n\nQuestion: What was the amount of 000s when Germany had 16.6?"
},
{
"role": "assistant",
"content": "SELECT \"total_000s\" FROM \"emigration_of_jews_and_their_family_memb\" WHERE \"germany\"=16.6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"period\" text,\n \"league\" real,\n \"concacaf\" real,\n \"libertadores\" real,\n \"merconorte\" real,\n \"inter_liga\" real,\n \"superliga\" real,\n \"matches\" real\n);\n\nQuestion: Name the average concacaf for merconorte larger than 0 and player of jared borgetti"
},
{
"role": "assistant",
"content": "SELECT AVG(\"concacaf\") FROM \"most_appearances\" WHERE \"merconorte\">0 AND \"player\"='jared borgetti' AND \"superliga\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"period\" text,\n \"league\" real,\n \"concacaf\" real,\n \"libertadores\" real,\n \"merconorte\" real,\n \"inter_liga\" real,\n \"superliga\" real,\n \"matches\" real\n);\n\nQuestion: Name the least merconorte for interliga of 2 and matches more than 260 with superliga more than 7"
},
{
"role": "assistant",
"content": "SELECT MIN(\"merconorte\") FROM \"most_appearances\" WHERE \"inter_liga\"=2 AND \"matches\">260 AND \"superliga\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the outcome for the match that ended in a score of 5\u20137, 6\u20134, [10\u20137]?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_8_4\" WHERE \"score_in_final\"='5\u20137, 6\u20134, [10\u20137]';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the surface of the match that ended in a score of 5\u20137, 6\u20134, [10\u20137]?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_8_4\" WHERE \"score_in_final\"='5\u20137, 6\u20134, [10\u20137]';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8_4\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: Who were the opponents in the match or matches that ended in a score of W/O?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_final\" FROM \"doubles_8_4\" WHERE \"score_in_final\"='w/o';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What kind of Chassis supports a Maserati Straight-6 engine with Points greater than 0 and built in the year 1955?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='maserati straight-6' AND \"points\">0 AND \"year\"=1955;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What kind of Chassis supports an Equipe Gordini Entrant?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='equipe gordini';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What kind of Entrant has a Maserati Straight-6 Engine, built in the year 1958 or early, and has a Maserati 250f Chassis with points less than 4?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='maserati straight-6' AND \"year\"<1958 AND \"chassis\"='maserati 250f' AND \"points\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average year for Maserati Straight-4 Engines?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='maserati straight-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Name the sum of ERP W for class of d and frequency mhz of 98.7"
},
{
"role": "assistant",
"content": "SELECT SUM(\"erp_w\") FROM \"translators\" WHERE \"class\"='d' AND \"frequency_m_hz\"=98.7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Name the ERP W with a frequency mhz more than 93.3 and city license of washington, georgia"
},
{
"role": "assistant",
"content": "SELECT \"erp_w\" FROM \"translators\" WHERE \"frequency_m_hz\">93.3 AND \"city_of_license\"='washington, georgia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which record has a result of loss in the Hero's 3 event?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"event\"='hero''s 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which event led to a 4-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which location led to a 10-3 record?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='10-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: In the match against Masahiro Oishi, what was the record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='masahiro oishi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_round\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"league_round\" WHERE \"drawn\"<2 AND \"played\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_round\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the fewest drawn matches for teams with 2 points and fewer than 6 losses?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"league_round\" WHERE \"points\"=2 AND \"lost\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_round\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the most number of losses for Quetta Zorawar?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"league_round\" WHERE \"team\"='quetta zorawar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_round\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of the drawn values for teams with 2 losses?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"league_round\" WHERE \"lost\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greatest_winning_margins\" (\n \"rank\" text,\n \"margin\" text,\n \"club\" text,\n \"opponent\" text,\n \"year\" text,\n \"round\" text,\n \"venue\" text\n);\n\nQuestion: which round has a margin of 178?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"greatest_winning_margins\" WHERE \"margin\"='178';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.