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 \"team\" (\n \"year\" real,\n \"location\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text\n);\n\nQuestion: What location is previous to 1994?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"team\" WHERE \"year\"<1994;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the men's doubles before 1979 when carol silman prina ben shushan won the women's doubles?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"year\"<1979 AND \"women_s_doubles\"='carol silman prina ben shushan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college(s) did the player(s) picked in round 4 with a pick number less than 98 play for?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"pick_num\"<98 AND \"round\"='round 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the pick number for the player(s) drafted in round 8?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"nfl_draft\" WHERE \"round\"='round 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"round\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position(s) did the player(s) with a pick number of 125 play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick_num\"=125;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_48_case_6\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"extra_points\") FROM \"michigan_48_case_6\" WHERE \"player\"='james lawrence' AND \"touchdowns\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_48_case_6\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What is the smallest amount of touchdowns when there is a total player and a number of field goals of more than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"touchdowns\") FROM \"michigan_48_case_6\" WHERE \"player\"='total' AND \"field_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1969\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On what Date were the Results\u00b9 4:0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1969\" WHERE \"results\"='4:0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1969\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On what Date were the Results\u00b9 5:1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1969\" WHERE \"results\"='5:1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1969\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On what Date were the Results\u00b9 4:0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1969\" WHERE \"results\"='4:0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_methods\" (\n \"name\" text,\n \"number_of_sequences_number_of_sequences\" text,\n \"alignment_alignment_predicts_an_alignment\" text,\n \"structure_structure_predicts_structure\" text,\n \"knots_knots_pseudoknot_prediction\" text,\n \"link\" text\n);\n\nQuestion: What is the pseudoknot prediction of the software named tfold?"
},
{
"role": "assistant",
"content": "SELECT \"knots_knots_pseudoknot_prediction\" FROM \"comparative_methods\" WHERE \"name\"='tfold';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_vocabulary_differences\" (\n \"rioplatense\" text,\n \"castilian\" text,\n \"andalusian\" text,\n \"mexican\" text,\n \"chilean\" text,\n \"english_us_uk\" text,\n \"italian\" text\n);\n\nQuestion: What Chilean word is used for the Castilian word ordenador?"
},
{
"role": "assistant",
"content": "SELECT \"chilean\" FROM \"selected_vocabulary_differences\" WHERE \"castilian\"='ordenador';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_vocabulary_differences\" (\n \"rioplatense\" text,\n \"castilian\" text,\n \"andalusian\" text,\n \"mexican\" text,\n \"chilean\" text,\n \"english_us_uk\" text,\n \"italian\" text\n);\n\nQuestion: What is the Italian word for the Mexican word frijol?"
},
{
"role": "assistant",
"content": "SELECT \"italian\" FROM \"selected_vocabulary_differences\" WHERE \"mexican\"='frijol';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_vocabulary_differences\" (\n \"rioplatense\" text,\n \"castilian\" text,\n \"andalusian\" text,\n \"mexican\" text,\n \"chilean\" text,\n \"english_us_uk\" text,\n \"italian\" text\n);\n\nQuestion: What word would a Castilian speaker use for the Italian word auto(mobile)?"
},
{
"role": "assistant",
"content": "SELECT \"castilian\" FROM \"selected_vocabulary_differences\" WHERE \"italian\"='auto(mobile)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_vocabulary_differences\" (\n \"rioplatense\" text,\n \"castilian\" text,\n \"andalusian\" text,\n \"mexican\" text,\n \"chilean\" text,\n \"english_us_uk\" text,\n \"italian\" text\n);\n\nQuestion: What word would a Castilian speaker use for the Italian word auto(mobile)?"
},
{
"role": "assistant",
"content": "SELECT \"castilian\" FROM \"selected_vocabulary_differences\" WHERE \"italian\"='auto(mobile)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_vocabulary_differences\" (\n \"rioplatense\" text,\n \"castilian\" text,\n \"andalusian\" text,\n \"mexican\" text,\n \"chilean\" text,\n \"english_us_uk\" text,\n \"italian\" text\n);\n\nQuestion: How would an Italian say the Andalusian word coche?"
},
{
"role": "assistant",
"content": "SELECT \"italian\" FROM \"selected_vocabulary_differences\" WHERE \"andalusian\"='coche';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Home has a Visitor of ny rangers, and a Series of flyers win 4\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"visitor\"='ny rangers' AND \"series\"='flyers win 4\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Score has a Series of flyers lead 3\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"series\"='flyers lead 3\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Decision has a Date of april 25?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"playoffs\" WHERE \"date\"='april 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Decision has a Date of april 30?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"playoffs\" WHERE \"date\"='april 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Which Home has a Series of series tied 3\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"series\"='series tied 3\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Events of 22, and a Rank smaller than 4 involved which of the lowest earnings ($)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"events\"=22 AND \"rank\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Player of corey pavin, and a Rank larger than 4 involved which highest earnings ($)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"earnings\") FROM \"leaders\" WHERE \"player\"='corey pavin' AND \"rank\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Events larger than 22, and a Earnings ( $ ) of 1,543,192, and a Rank smaller than 2 has the lowest wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"events\">22 AND \"earnings\"='1,543,192' AND \"rank\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Country of united states, and a Events of 22, and a Earnings ( $ ) larger than 1,340,079 has the highest rank?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"country\"='united states' AND \"events\"=22 AND \"earnings\">'1,340,079';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_2010\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the mascot with an enrollment (2010) less than 980, and heritage as the school?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment_2010\"<980 AND \"school\"='heritage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"arkansas\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: What is the class of the player with a weight of 242 pounds?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"arkansas\" WHERE \"weight\"=242;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"arkansas\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: How many games were played by the player at FB?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"arkansas\" WHERE \"position\"='fb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Name has a Round smaller than 5, and a Pick # larger than 13?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"round\"<5 AND \"pick_num\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick # has a Round smaller than 6, and an Overall larger than 13, and a College of penn state?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"round\"<6 AND \"overall\">13 AND \"college\"='penn state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Name has an Overall of 235?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\"=235;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"legislative_activity\" (\n \"congress\" text,\n \"bill_number_s\" text,\n \"date_introduced\" text,\n \"sponsor_s\" text,\n \"num_of_cosponsors\" real\n);\n\nQuestion: How many cosponsors have a Date introduced of may 22, 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"num_of_cosponsors\") FROM \"legislative_activity\" WHERE \"date_introduced\"='may 22, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"legislative_activity\" (\n \"congress\" text,\n \"bill_number_s\" text,\n \"date_introduced\" text,\n \"sponsor_s\" text,\n \"num_of_cosponsors\" real\n);\n\nQuestion: Which Congress has a # of cosponsors of 19?"
},
{
"role": "assistant",
"content": "SELECT \"congress\" FROM \"legislative_activity\" WHERE \"num_of_cosponsors\"=19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_international_caps_and_goals\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"goals\" real,\n \"competition\" text\n);\n\nQuestion: On what date was a friendly match held at Auckland?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"full_international_caps_and_goals\" WHERE \"competition\"='friendly match' AND \"venue\"='auckland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_international_caps_and_goals\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"goals\" real,\n \"competition\" text\n);\n\nQuestion: What were the goals at Sydney?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"full_international_caps_and_goals\" WHERE \"venue\"='sydney';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: How many sets lost have a sets won less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"sets_lost\") FROM \"statistics\" WHERE \"sets_won\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What shows for IATA for the City of sapporo?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"city\"='sapporo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO when the IATA shows cts?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"iata\"='cts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the Country when the IATA shows cju?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"iata\"='cju';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO when the IATA shows mfm?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"iata\"='mfm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO for Hong Kong?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"country\"='hong kong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the Airport when the ICAO shows rpvm?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"icao\"='rpvm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_records\" (\n \"season\" real,\n \"belonging_league\" text,\n \"matches\" real,\n \"points\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_difference\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"position\" real\n);\n\nQuestion: What is the lowest goals for value with fewer than 5 draws and under 70 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_for\") FROM \"club_records\" WHERE \"draw\"<5 AND \"points\"<70;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_records\" (\n \"season\" real,\n \"belonging_league\" text,\n \"matches\" real,\n \"points\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_difference\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"position\" real\n);\n\nQuestion: What is the lowest goals against value for a team with 83 points and a difference over 50?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_against\") FROM \"club_records\" WHERE \"points\"=83 AND \"goal_difference\">50;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_records\" (\n \"season\" real,\n \"belonging_league\" text,\n \"matches\" real,\n \"points\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_difference\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"position\" real\n);\n\nQuestion: What is the earliest season that has a position over 12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"club_records\" WHERE \"position\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_records\" (\n \"season\" real,\n \"belonging_league\" text,\n \"matches\" real,\n \"points\" real,\n \"draw\" real,\n \"lose\" real,\n \"goal_difference\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"position\" real\n);\n\nQuestion: What is the average goals for with a position under 12, draws over 1, and goals against under 28?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_for\") FROM \"club_records\" WHERE \"position\"<12 AND \"draw\">1 AND \"goals_against\"<28;"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the Opponent with a Result of l 17\u201324?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 17\u201324';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What Date has a Result of l 21\u201334?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 21\u201334';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What Game Site has a Week smaller than 11, and a Date of october 21, 1973?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"week\"<11 AND \"date\"='october 21, 1973';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the value of the lowest Week with a Record of 2\u20139?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"record\"='2\u20139';"
}
] |
[
{
"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: Who is the opponent for the game that occurred after week 13?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">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\" text\n);\n\nQuestion: What day did the play on week 6?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament had a 2009 result of 1R?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2009\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament had a 2010 result of QF and a 2012 result of SF?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2012\"='sf' AND \"2010\"='qf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament had a result in 2010 and 2012 of a?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_performance_timeline\" WHERE \"2012\"='a' AND \"2010\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who was third during round 6 in Rybinsk?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"individual_events\" WHERE \"venue\"='rybinsk' AND \"round\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who was third in round 14?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"individual_events\" WHERE \"round\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: What was the venue with a 3.3km c prologue discipline?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"individual_events\" WHERE \"discipline\"='3.3km c prologue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who was the winner on 28 December 2007?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"individual_events\" WHERE \"date\"='28 december 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who was third at the 0.8km f sprint discipline?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"individual_events\" WHERE \"discipline\"='0.8km f sprint';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_final_statistics\" (\n \"rank\" real,\n \"airport\" text,\n \"code_iata_icao\" text,\n \"total_cargo_metric_tonnes\" real,\n \"pct_change\" text\n);\n\nQuestion: What is the highest total cargo of an airport ranked larger than 19 with a code of BKK/VTBS?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_cargo_metric_tonnes\") FROM \"2007_final_statistics\" WHERE \"code_iata_icao\"='bkk/vtbs' AND \"rank\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_final_statistics\" (\n \"rank\" real,\n \"airport\" text,\n \"code_iata_icao\" text,\n \"total_cargo_metric_tonnes\" real,\n \"pct_change\" text\n);\n\nQuestion: What is the rank of the airport with the BKK/VTBS code?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"2007_final_statistics\" WHERE \"code_iata_icao\"='bkk/vtbs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings_table\" (\n \"rank\" real,\n \"matches_as_champion\" real,\n \"reigns_as_champion\" real,\n \"title_matches_won\" real,\n \"title_last_held\" text\n);\n\nQuestion: Which Matches has champion Rank of 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches_as_champion\") FROM \"rankings_table\" WHERE \"rank\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings_table\" (\n \"rank\" real,\n \"matches_as_champion\" real,\n \"reigns_as_champion\" real,\n \"title_matches_won\" real,\n \"title_last_held\" text\n);\n\nQuestion: Which Matches is on 24 march 1963 with a Rank larger than 44?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches_as_champion\") FROM \"rankings_table\" WHERE \"title_last_held\"='24 march 1963' AND \"rank\">44;"
}
] |
[
{
"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: what game was on may 24"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"nba_finals\" WHERE \"date\"='may 24';"
}
] |
[
{
"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: what game was on may 29"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"date\"='may 29';"
}
] |
[
{
"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: what team played on may 20 on the home side"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"date\"='may 20';"
}
] |
[
{
"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: what team played in game 2"
},
{
"role": "assistant",
"content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"game\"='game 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lineup\" (\n \"name\" text,\n \"size\" text,\n \"price\" text,\n \"quantity\" real,\n \"released\" text,\n \"nicotine\" real\n);\n\nQuestion: Which Raison Blue has the highest nicotine?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"nicotine\") FROM \"lineup\" WHERE \"name\"='raison blue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lineup\" (\n \"name\" text,\n \"size\" text,\n \"price\" text,\n \"quantity\" real,\n \"released\" text,\n \"nicotine\" real\n);\n\nQuestion: For Raison Blue with a nicotine larger than 0.30000000000000004, what's the lowest quantity?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"quantity\") FROM \"lineup\" WHERE \"name\"='raison blue' AND \"nicotine\">0.30000000000000004;"
}
] |
[
{
"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\" text,\n \"language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the fil Paljas?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"submissions\" WHERE \"film_title\"='paljas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: In what year was the rank less than 6 for Damac Heights?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"under_construction\" WHERE \"rank\"<6 AND \"name\"='damac heights';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the height for rank greater than 10 in Tameer Tower?"
},
{
"role": "assistant",
"content": "SELECT \"height_m_ft\" FROM \"under_construction\" WHERE \"rank\">10 AND \"name\"='tameer tower';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What was the earliest year with rank 20 and less than 60 floors?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"under_construction\" WHERE \"rank\"=20 AND \"floors\"<60;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the highest floors with rank greater than 1 in Conrad Dubai?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floors\") FROM \"under_construction\" WHERE \"rank\">1 AND \"name\"='conrad dubai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have a Driver of satrio hermanto?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"main_race\" WHERE \"driver\"='satrio hermanto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Time has a Grid of 19?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"main_race\" WHERE \"grid\"=19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid is the lowest one that has a Team of germany, and Laps smaller than 45?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"main_race\" WHERE \"team\"='germany' AND \"laps\"<45;"
}
] |
[
{
"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_num_overall\" text,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: WHich team draft the player who went to college in Washington?"
},
{
"role": "assistant",
"content": "SELECT \"nfl_team\" FROM \"nfl_draft\" WHERE \"college\"='washington';"
}
] |
[
{
"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_num_overall\" text,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position did the palyer drafted out of Washington play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"college\"='washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of Gold medals when there are 5 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest amount of bronze medals when the rank was larger than 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"rank\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the leowest number of Bronze medals for Jamaica who ranked less than 4 and had more than 0 silver medals and a total of less than 22 medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\">0 AND \"rank\"<4 AND \"nation\"='jamaica' AND \"total\"<22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_all_around\" (\n \"place\" real,\n \"nation\" text,\n \"5_hoops\" real,\n \"3_balls_2_ribbons\" real,\n \"total\" real\n);\n\nQuestion: Nation of bulgaria, and a Place larger than 1 had what highest 3 Balls, 2 Ribbons?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"3_balls_2_ribbons\") FROM \"groups_all_around\" WHERE \"nation\"='bulgaria' AND \"place\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_all_around\" (\n \"place\" real,\n \"nation\" text,\n \"5_hoops\" real,\n \"3_balls_2_ribbons\" real,\n \"total\" real\n);\n\nQuestion: 5 Hoops that has a Place larger than 7, and a Total larger than 38.525 had what sum?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"5_hoops\") FROM \"groups_all_around\" WHERE \"place\">7 AND \"total\">38.525;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_all_around\" (\n \"place\" real,\n \"nation\" text,\n \"5_hoops\" real,\n \"3_balls_2_ribbons\" real,\n \"total\" real\n);\n\nQuestion: 5 Hoops larger than 19.325, and a Total of 39.4, and a Place larger than 2 had what total number of 3 balls and 2 ribbons?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"3_balls_2_ribbons\") FROM \"groups_all_around\" WHERE \"5_hoops\">19.325 AND \"total\"=39.4 AND \"place\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_all_around\" (\n \"place\" real,\n \"nation\" text,\n \"5_hoops\" real,\n \"3_balls_2_ribbons\" real,\n \"total\" real\n);\n\nQuestion: Total of 38.55, and a 3 Balls, 2 Ribbons smaller than 19.4 had what lowest place?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"place\") FROM \"groups_all_around\" WHERE \"total\"=38.55 AND \"3_balls_2_ribbons\"<19.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what voice acter played tien"
},
{
"role": "assistant",
"content": "SELECT \"voice_actor_japanese\" FROM \"cast\" WHERE \"character_name\"='tien';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what character did Laara sadiq play"
},
{
"role": "assistant",
"content": "SELECT \"character_name\" FROM \"cast\" WHERE \"voice_actor_english_1998_pioneer\"='laara sadiq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what character did Masaharu satou play"
},
{
"role": "assistant",
"content": "SELECT \"character_name\" FROM \"cast\" WHERE \"voice_actor_japanese\"='masaharu satou';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what character did dave ward play"
},
{
"role": "assistant",
"content": "SELECT \"voice_actor_english_1998_pioneer\" FROM \"cast\" WHERE \"voice_actor_english_1997_saban\"='dave ward';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"character_name\" text,\n \"voice_actor_japanese\" text,\n \"voice_actor_english_1997_saban\" text,\n \"voice_actor_english_1998_pioneer\" text,\n \"voice_actor_english_2006_fu_nimation\" text\n);\n\nQuestion: what character did naoko watanabe play"
},
{
"role": "assistant",
"content": "SELECT \"character_name\" FROM \"cast\" WHERE \"voice_actor_japanese\"='naoko watanabe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titleholders\" (\n \"year\" real,\n \"country_territory\" text,\n \"miss_world\" text,\n \"national_title\" text,\n \"location\" text\n);\n\nQuestion: At what Location was Miss World 2009?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"titleholders\" WHERE \"year\"=2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the 1996 Emarate cup on March 25, 1996?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='1996 emarate cup' AND \"date\"='march 25, 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition was on August 11, 1996?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='august 11, 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition was in Dubai?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='dubai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the match in Bangkok?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"venue\"='bangkok';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the date of the match with a result of 4-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"result\"='4-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the match with a 4-0 result?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='4-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which name has an overall number of more than 164, when the pick number is more than 2, the position is running back, and the round is 16?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\">164 AND \"pick_num\">2 AND \"position\"='running back' AND \"round\"=16;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.