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 \"series_15\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the first broadcast for tina malone and joe wilkinson"
},
{
"role": "assistant",
"content": "SELECT \"first_broadcast\" FROM \"series_15\" WHERE \"seans_team\"='Tina Malone and Joe Wilkinson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_15\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the number of jons team for 15x10"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"jons_team\") FROM \"series_15\" WHERE \"episode\"='15x10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_15\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the scores for chris ramsey and carol vorderman"
},
{
"role": "assistant",
"content": "SELECT \"scores\" FROM \"series_15\" WHERE \"seans_team\"='Chris Ramsey and Carol Vorderman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_15\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the total number of jons team for 15x07"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"jons_team\") FROM \"series_15\" WHERE \"episode\"='15x07';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name all of Jason's teams that appeared on episode 6x02?"
},
{
"role": "assistant",
"content": "SELECT \"jasons_team\" FROM \"series_6\" WHERE \"episode\"='6x02';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: In how many episodes were Vanessa Feltz and Lee Mack the team for Sean? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode\") FROM \"series_6\" WHERE \"seans_team\"='Vanessa Feltz and Lee Mack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the episode(s) that featured Duncan James and Johnny Vegas as Jason's team."
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"series_6\" WHERE \"jasons_team\"='Duncan James and Johnny Vegas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_3\" text,\n \"race_total_pts\" real\n);\n\nQuestion: What round does Duncan Tappy drive in?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sf_round\") FROM \"2009_season\" WHERE \"driver\"='Duncan Tappy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_3\" text,\n \"race_total_pts\" real\n);\n\nQuestion: How many racing points did England get?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"race_total_pts\") FROM \"2009_season\" WHERE \"country\"='England';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_3\" text,\n \"race_total_pts\" real\n);\n\nQuestion: How many are the Race 2 points when Race 1 was 12?"
},
{
"role": "assistant",
"content": "SELECT \"race_2_pts\" FROM \"2009_season\" WHERE \"race_1_pts\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23294081_11\" (\n \"no\" real,\n \"num\" real,\n \"original_airdate\" text,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many millions of people in the US saw the episode number 226?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_millions\" FROM \"table1_23294081_11\" WHERE \"no\"=226;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23294081_11\" (\n \"no\" real,\n \"num\" real,\n \"original_airdate\" text,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the highest episode number?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"no\") FROM \"table1_23294081_11\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23294081_11\" (\n \"no\" real,\n \"num\" real,\n \"original_airdate\" text,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who was performer 1 in the episode number 7 where Heather Anne Campbell was performer 2?"
},
{
"role": "assistant",
"content": "SELECT \"performer_1\" FROM \"table1_23294081_11\" WHERE \"performer_2\"='Heather Anne Campbell' AND \"num\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23294081_11\" (\n \"no\" real,\n \"num\" real,\n \"original_airdate\" text,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the number of the episode seen by 2.99 millions of people in the US, where performer 2 was Heather Anne Campbell?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num\") FROM \"table1_23294081_11\" WHERE \"performer_2\"='Heather Anne Campbell' AND \"u_s_viewers_millions\"='2.99';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the episode for vic reeves and claudia winkleman"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"series_7\" WHERE \"seans_team\"='Vic Reeves and Claudia Winkleman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the number of scores for episode 7x05"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scores\") FROM \"series_7\" WHERE \"episode\"='7x05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the seans team being 13 november 2008"
},
{
"role": "assistant",
"content": "SELECT \"seans_team\" FROM \"series_7\" WHERE \"first_broadcast\"='13 November 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the total number of seans team being 7x04"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"seans_team\") FROM \"series_7\" WHERE \"episode\"='7x04';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_7\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"seans_team\" text,\n \"jasons_team\" text,\n \"scores\" text\n);\n\nQuestion: Name the total number of scores for 7x10"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scores\") FROM \"series_7\" WHERE \"episode\"='7x10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_total_pts\" real\n);\n\nQuestion: How many dates have a total points for race of 180?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"2008_season\" WHERE \"race_total_pts\"=180;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_total_pts\" real\n);\n\nQuestion: What is every points value for race 1 if the total race points is 180?"
},
{
"role": "assistant",
"content": "SELECT \"race_1_pts\" FROM \"2008_season\" WHERE \"race_total_pts\"=180;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_total_pts\" real\n);\n\nQuestion: What is the lowest number of total race points for the country of Belgium?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"race_total_pts\") FROM \"2008_season\" WHERE \"country\"='Belgium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_total_pts\" real\n);\n\nQuestion: Who is every driver for the location of Estoril Circuit?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"2008_season\" WHERE \"location\"='Estoril Circuit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_season\" (\n \"sf_round\" real,\n \"country\" text,\n \"location\" text,\n \"date\" text,\n \"driver\" text,\n \"race_1_pts\" real,\n \"race_2_pts\" real,\n \"race_total_pts\" real\n);\n\nQuestion: What is the highest value for SF round for the country of England?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sf_round\") FROM \"2008_season\" WHERE \"country\"='England';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_2_titles_4_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the surface for the year 2001?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_6_2_titles_4_runner_ups\" WHERE \"year\"=2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score on October 29?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='October 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many opponents were there with the record of 3-2-2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponent\") FROM \"game_log\" WHERE \"record\"='3-2-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the record on October 17?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='October 17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What date did they play agains the New York Rangers?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='New York Rangers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many points were there scored on October 27?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"date\"='October 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many different scores are there for the game with 10-3-4 record?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"game_log\" WHERE \"record\"='10-3-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: When was the game with 13-5-6 record played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='13-5-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the minimal number of points scored in any game?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"game_log\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many different games against Florida Panthers were played in Verizon Center?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"opponent\"='Florida Panthers' AND \"location\"='Verizon Center';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the record in the November 7 game?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='November 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 \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many times was there a record of 49-15-11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"record\"='49-15-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 \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many scores had a date of March 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"game_log\" WHERE \"date\"='March 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performances_18_10\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text,\n \"outcome\" text\n);\n\nQuestion: If the date is 7-21-2006, who was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_performances_18_10\" WHERE \"date\"='7-21-2006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performances_18_10\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text,\n \"outcome\" text\n);\n\nQuestion: If the opponent is Kristian Pless, who was it against?"
},
{
"role": "assistant",
"content": "SELECT \"against\" FROM \"singles_performances_18_10\" WHERE \"opponent\"='Kristian Pless';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" real,\n \"location\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who is the winning team when max busnelli is the winning driver?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_calendar\" WHERE \"winning_driver\"='Max Busnelli';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" real,\n \"location\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: In which location is aci vallelunga circuit?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"race_calendar\" WHERE \"circuit\"='ACI Vallelunga Circuit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"round\" real,\n \"location\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who held the pole position in misano world circuit?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"race_calendar\" WHERE \"circuit\"='Misano World Circuit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: List the results for all games which involved the detroit red wings."
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='Detroit Red Wings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Calculate the highest points where the win,loss, tie ratio is 28-12-6"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"record\"='28-12-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: what are the previous performance details for games involving the montreal canadiens?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='Montreal Canadiens';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2331549_1\" (\n \"year\" real,\n \"host_city\" text,\n \"host_school\" text,\n \"champion\" text,\n \"second_place\" text,\n \"third_place\" text\n);\n\nQuestion: Which years did Michigan state university come in third place?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"table1_2331549_1\" WHERE \"third_place\"='Michigan State University';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2331549_1\" (\n \"year\" real,\n \"host_city\" text,\n \"host_school\" text,\n \"champion\" text,\n \"second_place\" text,\n \"third_place\" text\n);\n\nQuestion: Who were the champions in years where michigan technological university was in third place?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"table1_2331549_1\" WHERE \"third_place\"='Michigan Technological University';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2331549_1\" (\n \"year\" real,\n \"host_city\" text,\n \"host_school\" text,\n \"champion\" text,\n \"second_place\" text,\n \"third_place\" text\n);\n\nQuestion: What was the host city in years where the host school was \u00e9cole de technologie sup\u00e9rieure?"
},
{
"role": "assistant",
"content": "SELECT \"host_city\" FROM \"table1_2331549_1\" WHERE \"host_school\"='\u00c9cole de technologie sup\u00e9rieure';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2331549_1\" (\n \"year\" real,\n \"host_city\" text,\n \"host_school\" text,\n \"champion\" text,\n \"second_place\" text,\n \"third_place\" text\n);\n\nQuestion: Who came in second place when the champion was south dakota school of mines & technology?"
},
{
"role": "assistant",
"content": "SELECT \"second_place\" FROM \"table1_2331549_1\" WHERE \"champion\"='South Dakota School of Mines & Technology';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_runs\" (\n \"rank\" real,\n \"runs\" real,\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"average\" text\n);\n\nQuestion: If the average is 45.65, what is the total number of innings?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"innings\") FROM \"most_career_runs\" WHERE \"average\"='45.65';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_runs\" (\n \"rank\" real,\n \"runs\" real,\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"average\" text\n);\n\nQuestion: What is the name of the player if the innings is 82?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_career_runs\" WHERE \"innings\"=82;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_runs\" (\n \"rank\" real,\n \"runs\" real,\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"average\" text\n);\n\nQuestion: If the innings is 68, what is the average?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"most_career_runs\" WHERE \"innings\"=68;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_runs\" (\n \"rank\" real,\n \"runs\" real,\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"average\" text\n);\n\nQuestion: If the runs is 5028, what is the matches maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"most_career_runs\" WHERE \"runs\"=5028;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: Name the least dismissals for sammy carter"
},
{
"role": "assistant",
"content": "SELECT MIN(\"dismissals\") FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"player\"='Sammy Carter';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: Name the number of dismissals for adam gilchrist"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"dismissals\") FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"player\"='Adam Gilchrist';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_test_career_wicketkee\" (\n \"rank\" real,\n \"dismissals\" real,\n \"player\" text,\n \"caught\" real,\n \"stumped\" real,\n \"matches\" real,\n \"innings\" real\n);\n\nQuestion: Name the least dismissals for 4 rank"
},
{
"role": "assistant",
"content": "SELECT MAX(\"dismissals\") FROM \"most_dismissals_in_test_career_wicketkee\" WHERE \"rank\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many top 10 finishes did Ken Bouchard get in the year he won $17,695?"
},
{
"role": "assistant",
"content": "SELECT \"top_10\" FROM \"nascar_nationwide_series\" WHERE \"winnings\"='$17,695';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What year did Ken Bouchard finish in 78th place?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"nascar_nationwide_series\" WHERE \"position\"='78th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many seasons did Ken Bouchard finish in 38th place?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"nascar_nationwide_series\" WHERE \"position\"='38th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What is the greatest number of wins Ken Bouchard had in a season?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"nascar_nationwide_series\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many races in 2012 season have 0 podiums?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"races\") FROM \"career_summary\" WHERE \"season\"=2012 AND \"podiums\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many seasons have motopark team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"career_summary\" WHERE \"team\"='Motopark';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which team has nc position for 2010 season?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"career_summary\" WHERE \"position\"='NC' AND \"season\"=2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many points have a series of british formula renault 2.0 winter cup and f/laps of 0?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"career_summary\" WHERE \"series\"='British Formula Renault 2.0 Winter Cup' AND \"f_laps\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wnit_player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: If the amount of rebounds is 0, what is the maximum minutes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"minutes\") FROM \"wnit_player_stats\" WHERE \"rebounds\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wnit_player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: What is the points total number if the assists is 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"wnit_player_stats\" WHERE \"assists\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wnit_player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: If the field goals is 26, what are the players names?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"wnit_player_stats\" WHERE \"field_goals\"=26;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wnit_player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: If the player is Jasmine Wynne, what is the minimum number of steals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"steals\") FROM \"wnit_player_stats\" WHERE \"player\"='Jasmine Wynne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wnit_player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: What is the blocks total number if the points is 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"blocks\") FROM \"wnit_player_stats\" WHERE \"points\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many steals did jasmine wynne have?"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"player_stats\" WHERE \"player\"='Jasmine Wynne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many games did janae stokes play?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"games_played\") FROM \"player_stats\" WHERE \"player\"='Janae Stokes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes\" real,\n \"field_goals\" real,\n \"three_pointers\" real,\n \"free_throws\" real,\n \"rebounds\" real,\n \"assists\" real,\n \"blocks\" real,\n \"steals\" real,\n \"points\" real\n);\n\nQuestion: How many rebounds did crystal ayers have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rebounds\") FROM \"player_stats\" WHERE \"player\"='Crystal Ayers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"orangemen_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: What was the Orangemen record during game 3?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"game\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"orangemen_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: What was the record for the Orangemen when they played against Army?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"opponent\"='Army';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"orangemen_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many points did the Orangemen score in game 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"orangemen_points\") FROM \"schedule\" WHERE \"game\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"orangemen_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: Who did the Orangemen play against when their record was 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"record\"='5-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"movies\" (\n \"year\" real,\n \"title_of_movie\" text,\n \"name_of_role\" text,\n \"nature_of_role\" text,\n \"co_artists\" text,\n \"location\" text\n);\n\nQuestion: Name the location for 2007"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"movies\" WHERE \"year\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: Display the lowest score for candidate Mir-Hossein Mousavi when candidate Mohsen Rezaee scored 44809 votes"
},
{
"role": "assistant",
"content": "SELECT MIN(\"mir_hossein_mousavi\") FROM \"provincial_results\" WHERE \"mohsen_rezaee\"=44809;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: What is the highest score for candidate Mohsen Rezaee when candidate mir-hossein mousavi scored 837858 votes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mohsen_rezaee\") FROM \"provincial_results\" WHERE \"mir_hossein_mousavi\"=837858;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: List all the total scores for the election which had 3072 invalid votes"
},
{
"role": "assistant",
"content": "SELECT \"total_votes\" FROM \"provincial_results\" WHERE \"spoiled_ballots\"=3072;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: What was the highest score of candidate mir-hossein mousavi in the location known as azarbaijan, west?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mir_hossein_mousavi\") FROM \"provincial_results\" WHERE \"province\"='Azarbaijan, West';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: List all the results for mahmoud ahmadinejad when candidate mir-hossein mousavi obtained 218481 votes."
},
{
"role": "assistant",
"content": "SELECT \"mahmoud_ahmadinejad\" FROM \"provincial_results\" WHERE \"mir_hossein_mousavi\"=218481;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provincial_results\" (\n \"province\" text,\n \"mahmoud_ahmadinejad\" real,\n \"mehdi_karroubi\" real,\n \"mir_hossein_mousavi\" real,\n \"mohsen_rezaee\" real,\n \"spoiled_ballots\" real,\n \"total_votes\" real\n);\n\nQuestion: What was the highest number of votes for mir-hossein mousavi when the number of invalid votes is 5683"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mir_hossein_mousavi\") FROM \"provincial_results\" WHERE \"spoiled_ballots\"=5683;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"finishing_date\" text,\n \"rally_name\" text,\n \"rally_base\" text,\n \"surface\" text,\n \"support_category\" text\n);\n\nQuestion: Name surface for 8 round"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"calendar\" WHERE \"round\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"finishing_date\" text,\n \"rally_name\" text,\n \"rally_base\" text,\n \"surface\" text,\n \"support_category\" text\n);\n\nQuestion: Name the rally base for 5 round"
},
{
"role": "assistant",
"content": "SELECT \"rally_base\" FROM \"calendar\" WHERE \"round\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"finishing_date\" text,\n \"rally_name\" text,\n \"rally_base\" text,\n \"surface\" text,\n \"support_category\" text\n);\n\nQuestion: Name the rally base for rallye de france alsace"
},
{
"role": "assistant",
"content": "SELECT \"rally_base\" FROM \"calendar\" WHERE \"rally_name\"='Rallye de France Alsace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers\" (\n \"pos\" real,\n \"driver\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"power_stage_wins\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest position for a driver with 2 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pos\") FROM \"drivers\" WHERE \"points\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers\" (\n \"pos\" real,\n \"driver\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"power_stage_wins\" real,\n \"points\" real\n);\n\nQuestion: What driver(s) had over 65 stag wins?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"drivers\" WHERE \"stage_wins\"=65;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"pos\" real,\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"power_stage_wins\" real,\n \"points\" real\n);\n\nQuestion: What is the power stage wins total number if the wins is 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"power_stage_wins\") FROM \"constructors\" WHERE \"wins\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"pos\" real,\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"power_stage_wins\" real,\n \"points\" real\n);\n\nQuestion: If finishes is 10, what is the POS minimum?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pos\") FROM \"constructors\" WHERE \"finishes\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"constructors\" (\n \"pos\" real,\n \"constructor\" text,\n \"chassis\" text,\n \"starts\" real,\n \"finishes\" real,\n \"wins\" real,\n \"podiums\" real,\n \"stage_wins\" real,\n \"power_stage_wins\" real,\n \"points\" real\n);\n\nQuestion: What is the finishes maximum number?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"finishes\") FROM \"constructors\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ibc_tv_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: When relay is the station type and 5kw is the power kw what is the branding?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"ibc_tv_stations\" WHERE \"power_k_w\"='5kW' AND \"station_type\"='Relay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ibc_tv_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: When dxrt-tv is the callsign what is the power kw?"
},
{
"role": "assistant",
"content": "SELECT \"power_k_w\" FROM \"ibc_tv_stations\" WHERE \"callsign\"='DXRT-TV';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ibc_tv_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: When dxzb-tv is the call sign what is the power kw?"
},
{
"role": "assistant",
"content": "SELECT \"power_k_w\" FROM \"ibc_tv_stations\" WHERE \"callsign\"='DXZB-TV';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ibc_tv_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: When dxcc-tv is the call sign how many station types are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"station_type\") FROM \"ibc_tv_stations\" WHERE \"callsign\"='DXCC-TV';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ibc_tv_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"ch_num\" text,\n \"power_k_w\" text,\n \"station_type\" text,\n \"location_transmitter_site\" text\n);\n\nQuestion: When dwhr-tv is the call sign how many station types are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"station_type\") FROM \"ibc_tv_stations\" WHERE \"callsign\"='DWHR-TV';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_three\" (\n \"num\" real,\n \"title\" text,\n \"original_airdate\" text,\n \"timeslot\" text,\n \"viewers_millions\" text,\n \"nightly_rank\" real,\n \"weekly_rank\" real\n);\n\nQuestion: What date did Episode 22 originally air?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"original_airdate\") FROM \"series_three\" WHERE \"num\"=22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_three\" (\n \"num\" real,\n \"title\" text,\n \"original_airdate\" text,\n \"timeslot\" text,\n \"viewers_millions\" text,\n \"nightly_rank\" real,\n \"weekly_rank\" real\n);\n\nQuestion: What episode premier received 0.680 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_three\" WHERE \"viewers_millions\"='0.680';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_three\" (\n \"num\" real,\n \"title\" text,\n \"original_airdate\" text,\n \"timeslot\" text,\n \"viewers_millions\" text,\n \"nightly_rank\" real,\n \"weekly_rank\" real\n);\n\nQuestion: When did \"The Intervention\" originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_three\" WHERE \"title\"='\\\"The Intervention\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_three\" (\n \"num\" real,\n \"title\" text,\n \"original_airdate\" text,\n \"timeslot\" text,\n \"viewers_millions\" text,\n \"nightly_rank\" real,\n \"weekly_rank\" real\n);\n\nQuestion: What timeslot received 0.673 viewers?"
},
{
"role": "assistant",
"content": "SELECT \"timeslot\" FROM \"series_three\" WHERE \"viewers_millions\"='0.673';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.