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 \"royal_league_2005\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"round\" text\n);\n\nQuestion: What was the Score of the Semifinal 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"royal_league_2005\" WHERE \"round\"='semifinal 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What are the ends for the player with a transfer fee of loan?"
},
{
"role": "assistant",
"content": "SELECT \"ends\" FROM \"squad_information\" WHERE \"transfer_fee\"='loan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the transfer fee for the MLI player with fewer than 63 goals in a year more recent than 2006?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"squad_information\" WHERE \"since\"='2006' AND \"goals\"<63 AND \"nat\"='mli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What is the royal house for Wu at the state of cai?"
},
{
"role": "assistant",
"content": "SELECT \"royal_house\" FROM \"vassal_states\" WHERE \"name\"='wu' AND \"state\"='cai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What is the state where the title is listed as count?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"title\"='count';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What is the state for the royal house of ying?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"royal_house\"='ying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_titles_13\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Opponent in the final has a Score in the final of 6\u20132, 6\u20133, 2\u20136, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"career_titles_13\" WHERE \"score_in_the_final\"='6\u20132, 6\u20133, 2\u20136, 7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_titles_13\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many Dates have a Score in the final of 6\u20134, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"date\") FROM \"career_titles_13\" WHERE \"score_in_the_final\"='6\u20134, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_titles_13\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Surface has an Outcome of runner-up, and a Score in the final of 4\u20136, 6\u20137, 6\u20132, 2\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"career_titles_13\" WHERE \"outcome\"='runner-up' AND \"score_in_the_final\"='4\u20136, 6\u20137, 6\u20132, 2\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_titles_13\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Opponent in the final has an Outcome of winner, and a Date larger than 1992, and a Surface of clay, and a Score in the final of 3\u20136, 6\u20132, 6\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"career_titles_13\" WHERE \"outcome\"='winner' AND \"date\">1992 AND \"surface\"='clay' AND \"score_in_the_final\"='3\u20136, 6\u20132, 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_titles_13\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Surface has a Score in the final of 2\u20136, 6\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"career_titles_13\" WHERE \"score_in_the_final\"='2\u20136, 6\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What day in November has a record of 15-6-1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"november\") FROM \"schedule_and_results\" WHERE \"record\"='15-6-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What day in November has the game less than 12?"
},
{
"role": "assistant",
"content": "SELECT \"november\" FROM \"schedule_and_results\" WHERE \"game\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the earliest day in November with a record of 15-7-1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"november\") FROM \"schedule_and_results\" WHERE \"record\"='15-7-1';"
}
] |
[
{
"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: What is Finish, when Country is \"South Africa\"?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='south africa';"
}
] |
[
{
"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: What is Player, when Country is \"United States\", and when Year(s) Won is \"1976\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"country\"='united states' AND \"year_s_won\"='1976';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: Which first round has a first team of angers sco (d1)?"
},
{
"role": "assistant",
"content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"team_1\"='angers sco (d1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_a\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: In which stadium does Club Pro Patria play?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"girone_a\" WHERE \"club\"='pro patria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_a\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: What was the stadium in which the 2007-08 season placement was 8th in Serie c1/a?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"girone_a\" WHERE \"2007_08_season\"='8th in serie c1/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_a\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: Which club came in 14th in Serie c1/a in the 2007-08 season?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"girone_a\" WHERE \"2007_08_season\"='14th in serie c1/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_a\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: What was the result of the 2007-08 season for the city of Ferrara?"
},
{
"role": "assistant",
"content": "SELECT \"2007_08_season\" FROM \"girone_a\" WHERE \"city\"='ferrara';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"wickets\" real,\n \"economy_rate\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: How many matches were played that resulted in less than 59.1 overs and a 6.78 Economy rate?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"matches\") FROM \"most_wickets\" WHERE \"overs\"<59.1 AND \"economy_rate\">6.78;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"wickets\" real,\n \"economy_rate\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: What is the average of someone with more than 19 wickets and less than 16 matches?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average\") FROM \"most_wickets\" WHERE \"wickets\">19 AND \"matches\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"wickets\" real,\n \"economy_rate\" real,\n \"average\" real,\n \"strike_rate\" real,\n \"best_bowling\" text\n);\n\nQuestion: What were the total number of matches played when the Deccan Chargers had a strike rate of 15.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"most_wickets\" WHERE \"team\"='deccan chargers' AND \"strike_rate\">15.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: Who was the home team of the match on 21.10.07, which had bsc young boys (asl) as the geust?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_of_32\" WHERE \"date\"='21.10.07' AND \"geust\"='bsc young boys (asl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: What is the home of fc st. gallen (asl) geust?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_of_32\" WHERE \"geust\"='fc st. gallen (asl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: What is the home of the geust fc basel (asl)?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_of_32\" WHERE \"geust\"='fc basel (asl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: What is the home of fc thun (asl) geust?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_of_32\" WHERE \"geust\"='fc thun (asl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: What is the home of the match with a 0:2 result on 21.10.07?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_of_32\" WHERE \"result\"='0:2' AND \"date\"='21.10.07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"date\" text,\n \"time\" text,\n \"home\" text,\n \"geust\" text,\n \"result\" text\n);\n\nQuestion: What is the geust with a 0:1 result?"
},
{
"role": "assistant",
"content": "SELECT \"geust\" FROM \"round_of_32\" WHERE \"result\"='0:1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_standings\" (\n \"player\" text,\n \"qual\" text,\n \"baku\" text,\n \"sochi\" text,\n \"elista\" text,\n \"nalchik\" text,\n \"jermuk\" text,\n \"astrakhan\" text,\n \"played\" real\n);\n\nQuestion: What is the nalchik with 4 played, a rl qual., and 100 jermuk?"
},
{
"role": "assistant",
"content": "SELECT \"nalchik\" FROM \"grand_prix_standings\" WHERE \"played\"=4 AND \"qual\"='rl' AND \"jermuk\"='100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_standings\" (\n \"player\" text,\n \"qual\" text,\n \"baku\" text,\n \"sochi\" text,\n \"elista\" text,\n \"nalchik\" text,\n \"jermuk\" text,\n \"astrakhan\" text,\n \"played\" real\n);\n\nQuestion: What is the elista with 1 played and 153\u2153 baku?"
},
{
"role": "assistant",
"content": "SELECT \"elista\" FROM \"grand_prix_standings\" WHERE \"played\"=1 AND \"baku\"='153\u2153';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which river had 26 points?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"points\"=26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"similar_gauges\" (\n \"name\" text,\n \"opened\" text,\n \"closed\" text,\n \"length\" text,\n \"location\" text\n);\n\nQuestion: What year did the Caphouse Colliery railway close?"
},
{
"role": "assistant",
"content": "SELECT \"closed\" FROM \"similar_gauges\" WHERE \"name\"='caphouse colliery';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pct_foreign_born_by_borough_1970_2006\" (\n \"borough\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2006\" real\n);\n\nQuestion: What was the percentage in 2006 that had less than 9% in 1970?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2006\") FROM \"pct_foreign_born_by_borough_1970_2006\" WHERE \"1970\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pct_foreign_born_by_borough_1970_2006\" (\n \"borough\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2006\" real\n);\n\nQuestion: What was the percentage in 1980 that had less than 37.8% in 2006, more than 29.4% in 2000, and more than 18.2% in 1970?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1980\") FROM \"pct_foreign_born_by_borough_1970_2006\" WHERE \"2006\"<37.8 AND \"2000\">29.4 AND \"1970\">18.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pct_foreign_born_by_borough_1970_2006\" (\n \"borough\" text,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"2000\" real,\n \"2006\" real\n);\n\nQuestion: What was the percentage in 1980 in Brooklyn?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1980\") FROM \"pct_foreign_born_by_borough_1970_2006\" WHERE \"borough\"='brooklyn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is the result the R3 round?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"league_cup\" WHERE \"round\"='r3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"scorers\" text\n);\n\nQuestion: What is the result of the game against Ayr United?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"league_cup\" WHERE \"opponent\"='ayr united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score for the game in which the Edmonton Oilers were visitors?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='edmonton oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score of the game in which the Toronto Maple Leafs were visitors?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='toronto maple leafs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: When Jeb Barlow was picked in round smaller than 7, how many player in totals were picked?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"draft_picks\" WHERE \"player\"='jeb barlow' AND \"round\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What country is team ucla come from?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"school_club_team\"='ucla';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many rounds have picked smaller than 220, with Alford Turner as a player?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"pick\"<220 AND \"player\"='alford turner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the pick with Dean Sears and round larger than 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"draft_picks\" WHERE \"round\">6 AND \"player\"='dean sears';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the total pick with Bill Duffy?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"draft_picks\" WHERE \"player\"='bill duffy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the total round with pick of 109?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"pick\"=109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many picks for round 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"nfl_draft\" WHERE \"round\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was Tom Donchez pick number?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"nfl_draft\" WHERE \"player\"='tom donchez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is date when against is smaller than 6 and location was durban?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"matches\" WHERE \"against\"<6 AND \"venue\"='durban';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"artist\" text,\n \"song\" text,\n \"note\" text\n);\n\nQuestion: What was the note with a year after 2003?"
},
{
"role": "assistant",
"content": "SELECT \"note\" FROM \"discography\" WHERE \"year\">2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"artist\" text,\n \"song\" text,\n \"note\" text\n);\n\nQuestion: When was the note a vocals and the album north (original motion picture soundtrack)?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"discography\" WHERE \"note\"='vocals' AND \"album\"='north (original motion picture soundtrack)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"artist\" text,\n \"song\" text,\n \"note\" text\n);\n\nQuestion: Which album had the note tape [tape echo]?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"discography\" WHERE \"note\"='tape [tape echo]';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"year\" real,\n \"album\" text,\n \"artist\" text,\n \"song\" text,\n \"note\" text\n);\n\nQuestion: Which artist was 2003?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"discography\" WHERE \"year\"=2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_11\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the Title of the episode after Season 10 Directed by Erik Wiese and Eddie Trigueros after Seres 35?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_2_2009_11\" WHERE \"season_num\">10 AND \"series_num\">35 AND \"directed_by\"='erik wiese and eddie trigueros';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2_2009_11\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the Original airdate of the episode after Season 6 Directed by Erik Wiese?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"season_2_2009_11\" WHERE \"directed_by\"='erik wiese' AND \"season_num\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average of laps ridden by Toni Elias?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='toni elias';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How long did it take for the rider of a Yamaha with a grid less than 8 and laps less than 23?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"grid\"<8 AND \"laps\"<23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the fewest amount of laps when the grid was larger than 1 and 42:31.153?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"moto_gp_classification\" WHERE \"time\"='42:31.153' AND \"grid\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How long did it take to ride when the laps were 23 and the grid of 13?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"laps\"=23 AND \"grid\"=13;"
}
] |
[
{
"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 \"attendance\" real\n);\n\nQuestion: What was the result for the 71,164 in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'71,164';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" text\n);\n\nQuestion: Which rank is above floor 47?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"tallest_buildings\" WHERE \"floors\">47;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What class is the RML Team?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='rml';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Result has a Home team of portland, and a Date of may 31?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"home_team\"='portland' AND \"date\"='may 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Date has a Road team of portland, and a Game of game 5?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nba_finals\" WHERE \"road_team\"='portland' AND \"game\"='game 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Home team has a Road team of portland, and a Result of 104\u2013110?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"road_team\"='portland' AND \"result\"='104\u2013110';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Home team has a Game of game 5?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"game\"='game 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Date has a Home team of philadelphia, and a Result of 104\u2013110?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nba_finals\" WHERE \"home_team\"='philadelphia' AND \"result\"='104\u2013110';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Road team has a Home team of portland, and a Date of may 31?"
},
{
"role": "assistant",
"content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"home_team\"='portland' AND \"date\"='may 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: Which Tongan has a North Marquesan of /ha\u0294e/?"
},
{
"role": "assistant",
"content": "SELECT \"tongan\" FROM \"internal_correspondences\" WHERE \"north_marquesan\"='/ha\u0294e/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: What kind of North Marquesan has a Takuu of /\u027eani/?"
},
{
"role": "assistant",
"content": "SELECT \"north_marquesan\" FROM \"internal_correspondences\" WHERE \"takuu\"='/\u027eani/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: What kind of Takuu has a North Marquesan of /vehine/?"
},
{
"role": "assistant",
"content": "SELECT \"takuu\" FROM \"internal_correspondences\" WHERE \"north_marquesan\"='/vehine/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: What kind of Rarotongan has a Tahitian of /metua/?"
},
{
"role": "assistant",
"content": "SELECT \"rarotongan\" FROM \"internal_correspondences\" WHERE \"tahitian\"='/metua/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: What kind of Tongan has a North Marquesan of /ha\u0294e/?"
},
{
"role": "assistant",
"content": "SELECT \"tongan\" FROM \"internal_correspondences\" WHERE \"north_marquesan\"='/ha\u0294e/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"internal_correspondences\" (\n \"tongan\" text,\n \"niuean\" text,\n \"s_moan\" text,\n \"takuu\" text,\n \"tahitian\" text,\n \"rarotongan\" text,\n \"m_ori\" text,\n \"north_marquesan\" text,\n \"south_marquesan\" text,\n \"hawai_ian\" text,\n \"mangarevan\" text\n);\n\nQuestion: What kind of South Marquesan has a S\u0101moan of /matua/?"
},
{
"role": "assistant",
"content": "SELECT \"south_marquesan\" FROM \"internal_correspondences\" WHERE \"s_moan\"='/matua/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_125_most_prominent_peaks\" (\n \"peak\" text,\n \"location\" text,\n \"height_m\" real,\n \"prominence_m\" real,\n \"col_m\" real,\n \"parent\" text\n);\n\nQuestion: What is the maximum Col (m) when 3,046 is the Prominence (m)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"col_m\") FROM \"the_125_most_prominent_peaks\" WHERE \"prominence_m\"='3,046';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_125_most_prominent_peaks\" (\n \"peak\" text,\n \"location\" text,\n \"height_m\" real,\n \"prominence_m\" real,\n \"col_m\" real,\n \"parent\" text\n);\n\nQuestion: What is the total Col (m) when the Prominence (m) is less than 4,884, and India / Burma is the location?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"col_m\") FROM \"the_125_most_prominent_peaks\" WHERE \"prominence_m\"<'4,884' AND \"location\"='india / burma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_125_most_prominent_peaks\" (\n \"peak\" text,\n \"location\" text,\n \"height_m\" real,\n \"prominence_m\" real,\n \"col_m\" real,\n \"parent\" text\n);\n\nQuestion: Where is the peak Pico Basil\u00e9 located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"the_125_most_prominent_peaks\" WHERE \"peak\"='pico basil\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: what is the norwegian krag-J\u00f8rgensen M189 when the Japanese Type 38 Rifle is 5?"
},
{
"role": "assistant",
"content": "SELECT \"norwegian_krag_j_rgensen_m1894\" FROM \"comparison_with_contemporary_rifles\" WHERE \"japanese_type_38_rifle\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: What is the German Gewehr 98 when the Danish Krag-J\u00f8rgensen 1889 is 4.28kg?"
},
{
"role": "assistant",
"content": "SELECT \"german_gewehr_98\" FROM \"comparison_with_contemporary_rifles\" WHERE \"danish_krag_j_rgensen_1889\"='4.28kg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: What is the British Lee-Enfield (data for late model) when the Japanese Type 38 Rifle is 5?"
},
{
"role": "assistant",
"content": "SELECT \"british_lee_enfield_data_for_late_model\" FROM \"comparison_with_contemporary_rifles\" WHERE \"japanese_type_38_rifle\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: What is the Rifle when the German Gewehr 98 is 74cm?"
},
{
"role": "assistant",
"content": "SELECT \"rifle\" FROM \"comparison_with_contemporary_rifles\" WHERE \"german_gewehr_98\"='74cm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: What is the US Krag-J\u00f8rgensen M1892 when the Norwegian Krag-J\u00f8rgensen M1894 is 126.8cm?"
},
{
"role": "assistant",
"content": "SELECT \"us_krag_j_rgensen_m1892\" FROM \"comparison_with_contemporary_rifles\" WHERE \"norwegian_krag_j_rgensen_m1894\"='126.8cm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_contemporary_rifles\" (\n \"rifle\" text,\n \"danish_krag_j_rgensen_1889\" text,\n \"us_krag_j_rgensen_m1892\" text,\n \"norwegian_krag_j_rgensen_m1894\" text,\n \"japanese_type_38_rifle\" text,\n \"german_gewehr_98\" text,\n \"british_lee_enfield_data_for_late_model\" text\n);\n\nQuestion: What is the British Lee-Enfield (data for late model) when the Japanese Type 38 Rifle is 5?"
},
{
"role": "assistant",
"content": "SELECT \"british_lee_enfield_data_for_late_model\" FROM \"comparison_with_contemporary_rifles\" WHERE \"japanese_type_38_rifle\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"player\" text,\n \"team\" text,\n \"league\" text,\n \"position\" text\n);\n\nQuestion: What team has a national league in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"winners\" WHERE \"league\"='national' AND \"year\"=2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"player\" text,\n \"team\" text,\n \"league\" text,\n \"position\" text\n);\n\nQuestion: What is the league of the third baseman player before 1973?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"winners\" WHERE \"year\"<1973 AND \"position\"='third baseman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Original Title, when Film Title Used In Nomination is \"Monga\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='monga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Original Title is \"Ti\u0101nm\u01ce Ch\u00e1f\u00e1ng (\u5929\u99ac\u8336\u623f)\"?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"submissions\" WHERE \"original_title\"='ti\u0101nm\u01ce ch\u00e1f\u00e1ng (\u5929\u99ac\u8336\u623f)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Film Title Used In Nomination, when Original Title is \"B\u00e1ng-Kah (\u824b\u823a)\""
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"submissions\" WHERE \"original_title\"='b\u00e1ng-kah (\u824b\u823a)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Original Title, when Director is \"Ting Shan-Si\", and when Film Title Used In Nomination is \"The 800 Heroes\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"director\"='ting shan-si' AND \"film_title_used_in_nomination\"='the 800 heroes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Year (Ceremony), when Director is \"Wang Siu-Di\"?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"director\"='wang siu-di';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Film Title Used In Nomination is \"Kuei-Mei, A Woman\"?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='kuei-mei, a woman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1954_to_1972\" (\n \"issued\" real,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What was the issued serial for yellow on blue design issued in 1955?"
},
{
"role": "assistant",
"content": "SELECT \"serials_issued\" FROM \"1954_to_1972\" WHERE \"design\"='yellow on blue' AND \"issued\"=1955;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1954_to_1972\" (\n \"issued\" real,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What is the serial format for white on blue with a serial issued of ss-00-00 to zz-99-99?"
},
{
"role": "assistant",
"content": "SELECT \"serial_format\" FROM \"1954_to_1972\" WHERE \"design\"='white on blue' AND \"serials_issued\"='ss-00-00 to zz-99-99';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1954_to_1972\" (\n \"issued\" real,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What is the issued serial given in 1966?"
},
{
"role": "assistant",
"content": "SELECT \"serials_issued\" FROM \"1954_to_1972\" WHERE \"issued\"=1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1954_to_1972\" (\n \"issued\" real,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What serial format was issued in 1972?"
},
{
"role": "assistant",
"content": "SELECT \"serial_format\" FROM \"1954_to_1972\" WHERE \"issued\"=1972;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1954_to_1972\" (\n \"issued\" real,\n \"type\" text,\n \"design\" text,\n \"serial_format\" text,\n \"serials_issued\" text\n);\n\nQuestion: What type was issued in 1964?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"1954_to_1972\" WHERE \"issued\"=1964;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_tournaments_and_friendlies\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: At which tournament does Milan play against Hungary's league selection?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pre_season_tournaments_and_friendlies\" WHERE \"opponent_team\"='hungary''s league selection';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_tournaments_and_friendlies\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What was the final score on 1 August 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pre_season_tournaments_and_friendlies\" WHERE \"date\"='1 august 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_tournaments_and_friendlies\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where did Milan play against Napoli?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"pre_season_tournaments_and_friendlies\" WHERE \"opponent_team\"='napoli';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.