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