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 \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent with a Score that is 2\u20136, 6\u20134, 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_5_5_runners_up\" WHERE \"score\"='2\u20136, 6\u20134, 3\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome with a Date that is may 5, 2012?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_5_5_runners_up\" WHERE \"date\"='may 5, 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome with an Opponent that is jelena jankovi\u0107?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_5_5_runners_up\" WHERE \"opponent\"='jelena jankovi\u0107';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Tournament with a Score that is 2\u20136, 6\u20134, 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_5_5_runners_up\" WHERE \"score\"='2\u20136, 6\u20134, 3\u20136';"
}
] |
[
{
"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: Which week was on November 13, 1955 when the attendance was over 33,982?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='november 13, 1955' AND \"attendance\">'33,982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Japanese name of the Province with a Korean name of Chungcheong-Bukdo?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_name\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"korean_name\"='chungcheong-bukdo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Hanja/Kanji of the Province with a Kana of \u3061\u3085\u3046\u305b\u3044\u307b\u304f\u3069\u3046?"
},
{
"role": "assistant",
"content": "SELECT \"hanja_kanji\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"kana\"='\u3061\u3085\u3046\u305b\u3044\u307b\u304f\u3069\u3046';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Kana of the Province with a Korean name of Chungcheong-Namdo?"
},
{
"role": "assistant",
"content": "SELECT \"kana\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"korean_name\"='chungcheong-namdo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Hangul of the Province with a Kana of \u3078\u3044\u3042\u3093\u306a\u3093\u3069\u3046?"
},
{
"role": "assistant",
"content": "SELECT \"hangul\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"kana\"='\u3078\u3044\u3042\u3093\u306a\u3093\u3069\u3046';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Hangul of the Province with a Kana of \u3061\u3085\u3046\u305b\u3044\u306a\u3093\u3069\u3046?"
},
{
"role": "assistant",
"content": "SELECT \"hangul\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"kana\"='\u3061\u3085\u3046\u305b\u3044\u306a\u3093\u3069\u3046';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_under_japanese_colonial_rule\" (\n \"japanese_name\" text,\n \"kana\" text,\n \"hanja_kanji\" text,\n \"korean_name\" text,\n \"hangul\" text\n);\n\nQuestion: What is the Hanja/Kanji of the Province with a Korean name of Chungcheong-Bukdo?"
},
{
"role": "assistant",
"content": "SELECT \"hanja_kanji\" FROM \"provinces_under_japanese_colonial_rule\" WHERE \"korean_name\"='chungcheong-bukdo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"temperature\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" text,\n \"may\" text,\n \"jun\" text,\n \"jul\" text,\n \"aug\" text,\n \"sep\" text,\n \"oct\" text,\n \"nov\" text,\n \"dec\" text\n);\n\nQuestion: What were the Oct. temperatures for the city that had Nov. temperatures of 51/30?"
},
{
"role": "assistant",
"content": "SELECT \"oct\" FROM \"temperature\" WHERE \"nov\"='51/30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"temperature\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" text,\n \"may\" text,\n \"jun\" text,\n \"jul\" text,\n \"aug\" text,\n \"sep\" text,\n \"oct\" text,\n \"nov\" text,\n \"dec\" text\n);\n\nQuestion: What were the Feb temperatures in East Stroudsburg?"
},
{
"role": "assistant",
"content": "SELECT \"feb\" FROM \"temperature\" WHERE \"city\"='east stroudsburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"comp\" real,\n \"att\" real,\n \"comppct\" real,\n \"yards\" real,\n \"td_s\" real,\n \"int_s\" real,\n \"rating\" real\n);\n\nQuestion: What is the sum of completions that led to completion percentages of 65.4 and attempts under 451?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"comp\") FROM \"statistics\" WHERE \"comppct\"=65.4 AND \"att\"<451;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"comp\" real,\n \"att\" real,\n \"comppct\" real,\n \"yards\" real,\n \"td_s\" real,\n \"int_s\" real,\n \"rating\" real\n);\n\nQuestion: What is the highest number of touchdowns that had yards of 574 and completions over 54?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"td_s\") FROM \"statistics\" WHERE \"yards\"=574 AND \"comp\">54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What regular season did the team reach the conference semifinals in the playoffs?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"playoffs\"='conference semifinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: When the regular season of 2nd, Northeast and the year was less than 2008 what was the total number of Division?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division\") FROM \"year_by_year\" WHERE \"regular_season\"='2nd, northeast' AND \"year\"<2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What division was the regular season 5th, Northeast?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"year_by_year\" WHERE \"regular_season\"='5th, northeast';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: What was the result when Jam Hsiao was nominated in 2012?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards\" WHERE \"nomination\"='jam hsiao' AND \"year\"=2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Which award is in the category of best music video?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards\" WHERE \"category\"='best music video';"
}
] |
[
{
"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: Which Attendance has a Result of l 29\u201323?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 29\u201323';"
}
] |
[
{
"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: When has a Week of 1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=1;"
}
] |
[
{
"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: Which Week has an Opponent of at seattle seahawks?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"opponent\"='at seattle seahawks';"
}
] |
[
{
"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: Name the Result on october 15, 1995?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 15, 1995';"
}
] |
[
{
"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: Which Opponent has a Week larger than 2 on november 19, 1995?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">2 AND \"date\"='november 19, 1995';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"automatic_bids\" (\n \"school\" text,\n \"conference\" text,\n \"record_conf\" text,\n \"berth\" text,\n \"last_ncaa_appearance\" text\n);\n\nQuestion: What is the recorded conference that was a Wac Conference?"
},
{
"role": "assistant",
"content": "SELECT \"record_conf\" FROM \"automatic_bids\" WHERE \"conference\"='wac';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"automatic_bids\" (\n \"school\" text,\n \"conference\" text,\n \"record_conf\" text,\n \"berth\" text,\n \"last_ncaa_appearance\" text\n);\n\nQuestion: What conference has the Wichita State school?"
},
{
"role": "assistant",
"content": "SELECT \"conference\" FROM \"automatic_bids\" WHERE \"school\"='wichita state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements_competitions\" (\n \"competition\" text,\n \"place\" text,\n \"year\" real,\n \"horse\" text,\n \"rank\" text\n);\n\nQuestion: What is the rank for Burghley?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"achievements_competitions\" WHERE \"place\"='burghley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements_competitions\" (\n \"competition\" text,\n \"place\" text,\n \"year\" real,\n \"horse\" text,\n \"rank\" text\n);\n\nQuestion: What horse was at the Badminton Horse Trials?"
},
{
"role": "assistant",
"content": "SELECT \"horse\" FROM \"achievements_competitions\" WHERE \"competition\"='badminton horse trials';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What was Des Dickson's lowest rank for matches smaller than 285 and less than 219 goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"matches\"<285 AND \"name\"='des dickson' AND \"goals\"<219;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: How many goals on average had 644 matches and a rank bigger than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"matches\"=644 AND \"rank\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: How many ranks had 205 matches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"matches\"=205;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What was Jimmy Jones' rank when the matches were smaller than 285?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"name\"='jimmy jones' AND \"matches\"<285;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Which date had the Hornets as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"april\" WHERE \"home\"='hornets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the To par score corresponding to the winning score of 64-69-67-66=266?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"pga_tour_wins_8\" WHERE \"winning_score\"='64-69-67-66=266';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the To par score for the tournament with a margin of victory of 1 stroke?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"pga_tour_wins_8\" WHERE \"margin_of_victory\"='1 stroke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score for the tournament with a margin of victory of 7 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_8\" WHERE \"margin_of_victory\"='7 strokes';"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What day in December was the game that resulted in a record of 6-3-1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"december\") FROM \"schedule_and_results\" WHERE \"record\"='6-3-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many were in attendance against the Oakland Raiders after week 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"season_schedule\" WHERE \"opponent\"='oakland raiders' AND \"week\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance for the New York Jets?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"season_schedule\" WHERE \"opponent\"='new york jets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On what week were there 26,243 in attendance on September 21, 1969?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"season_schedule\" WHERE \"date\"='september 21, 1969' AND \"attendance\"<'26,243';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent at Pasir Gudang, Malaysia with a match larger than 2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_team\" FROM \"pre_season_friendlies\" WHERE \"match\">2 AND \"location\"='pasir gudang, malaysia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent at the match smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_team\" FROM \"pre_season_friendlies\" WHERE \"match\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where was the game when Police S.A. was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"pre_season_friendlies\" WHERE \"opponent_team\"='police s.a.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: Which League has a FA Cup larger than 0, and a Player of simon read, and a League Cup larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"fa_cup\">0 AND \"player\"='simon read' AND \"league_cup\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What kind of Total that has a League Cup larger than 3, and a League smaller than 16?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"league_cup\">3 AND \"league\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: Which League has a League Cup smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"league_cup\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: Which League has a Total smaller than 16, a Player of ken mckenna and a League Cup larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"total\"<16 AND \"player\"='ken mckenna' AND \"league_cup\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: Which FA Cup that has a League Cup larger than 3 and a League smaller than 16?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fa_cup\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"league_cup\">3 AND \"league\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldham\" (\n \"name\" text,\n \"location\" text,\n \"type\" text,\n \"completed\" text,\n \"list_entry_number\" real\n);\n\nQuestion: How many list entry numbers are located in Platting Road, Lydgate?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"list_entry_number\") FROM \"oldham\" WHERE \"location\"='platting road, lydgate';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldham\" (\n \"name\" text,\n \"location\" text,\n \"type\" text,\n \"completed\" text,\n \"list_entry_number\" real\n);\n\nQuestion: Which type has list entry number of 1356677?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"oldham\" WHERE \"list_entry_number\"=1356677;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldham\" (\n \"name\" text,\n \"location\" text,\n \"type\" text,\n \"completed\" text,\n \"list_entry_number\" real\n);\n\nQuestion: What is the completed date of the church with list entry number 1068071?"
},
{
"role": "assistant",
"content": "SELECT \"completed\" FROM \"oldham\" WHERE \"type\"='church' AND \"list_entry_number\"=1068071;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"scorers\" text\n);\n\nQuestion: Who were the scorers in the game against neuch\u00e2tel xamax played on 10 December 1985?"
},
{
"role": "assistant",
"content": "SELECT \"scorers\" FROM \"uefa_cup\" WHERE \"opponent\"='neuch\u00e2tel xamax' AND \"date\"='10 december 1985';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"scorers\" text\n);\n\nQuestion: What date was the game played in where hegarty was the scorer?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"uefa_cup\" WHERE \"scorers\"='hegarty';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airlines\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Who is the callsign that has ICAO of SCO?"
},
{
"role": "assistant",
"content": "SELECT \"callsign\" FROM \"see_also\" WHERE \"icao\"='sco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airlines\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Who is the commenced operations that has icao of slk?"
},
{
"role": "assistant",
"content": "SELECT \"commenced_operations\" FROM \"see_also\" WHERE \"icao\"='slk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"airlines\" text,\n \"iata\" text,\n \"icao\" text,\n \"callsign\" text,\n \"commenced_operations\" real\n);\n\nQuestion: Who is the call sign that has a commenced operation before 1976?"
},
{
"role": "assistant",
"content": "SELECT \"callsign\" FROM \"see_also\" WHERE \"commenced_operations\"<1976;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"others\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the HDTV of the Music Content Channel?"
},
{
"role": "assistant",
"content": "SELECT \"hdtv\" FROM \"others\" WHERE \"content\"='music';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"others\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the Television Service offering Cartomanzia?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"others\" WHERE \"content\"='cartomanzia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"others\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What Country's content is Televendite?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"others\" WHERE \"content\"='televendite';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"others\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What Country's Content is TV Locale?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"others\" WHERE \"content\"='tv locale';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds had a silver of more than 1, rank more than 1, total of more than 4 when the bronze was also more than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"silver\">1 AND \"rank\">1 AND \"total\">4 AND \"bronze\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 total of rank when gold is 2 and total is more than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"medals_table\" WHERE \"gold\"=2 AND \"total\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 total number of bronze when gold is less than 1 and silver is more than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medals_table\" WHERE \"gold\"<1 AND \"silver\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_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 total of rank when silver is more than 1, gold is 2, and total is more than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"medals_table\" WHERE \"silver\">1 AND \"gold\"=2 AND \"total\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the Wins with a Top-25 of 3, and a Top-5 larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"summary\" WHERE \"top_25\"=3 AND \"top_5\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Cuts made has a Top-5 smaller than 3, and a Top-25 smaller than 6, and an Events of 10?"
},
{
"role": "assistant",
"content": "SELECT \"cuts_made\" FROM \"summary\" WHERE \"top_5\"<3 AND \"top_25\"<6 AND \"events\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Tournament has a Cuts made smaller than 9, and an Events of 10?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"summary\" WHERE \"cuts_made\"<9 AND \"events\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the sum of Points for 250cc class, ranked 13th, later than 1955?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='250cc' AND \"rank\"='13th' AND \"year\">1955;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the Class for a year later than 1958, with 4 points?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"motorcycle_grand_prix_results\" WHERE \"year\">1958 AND \"points\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the average Year when there were more than 3 points, for MV Agusta and ranked 10th?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"points\">3 AND \"team\"='mv agusta' AND \"rank\"='10th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What Team has a Class of 350cc, with less than 13 points in 1959?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='350cc' AND \"points\"<13 AND \"year\"=1959;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: Which event was held at Manly Beach?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"tournaments\" WHERE \"location\"='manly beach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: What was the location of the Havaianas Beachley Classic, held in Australia?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tournaments\" WHERE \"country\"='australia' AND \"event\"='havaianas beachley classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"date\" text,\n \"location\" text,\n \"country\" text,\n \"event\" text,\n \"winner\" text,\n \"runner_up\" text\n);\n\nQuestion: Which event was held in Brazil?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"tournaments\" WHERE \"country\"='brazil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: The University of Colorado hosted what region?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"first_and_second_rounds\" WHERE \"host\"='university of colorado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Peterson Gym is in what city?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"venue\"='peterson gym';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: Mideast region host University of Tennessee is in what state?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"region\"='mideast' AND \"host\"='university of tennessee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What city is east region venue University Hall (University of Virginia) in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"region\"='east' AND \"venue\"='university hall (university of virginia)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What is the venue at Stanford University?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"host\"='stanford university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What is the venue in Seattle?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"city\"='seattle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date\" text,\n \"race_name\" text,\n \"location\" text,\n \"uci_rating\" real,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What team won the Tour de Santa Catarina?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"2007\" WHERE \"race_name\"='tour de santa catarina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date\" text,\n \"race_name\" text,\n \"location\" text,\n \"uci_rating\" real,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is Relax-Gam's average UCI Rating?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"uci_rating\") FROM \"2007\" WHERE \"team\"='relax-gam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"date\" text,\n \"race_name\" text,\n \"location\" text,\n \"uci_rating\" real,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is Vuelta a Ecuador's lowest UCI Rating?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"uci_rating\") FROM \"2007\" WHERE \"race_name\"='vuelta a ecuador';"
}
] |
[
{
"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 was the result of the game attended by 54,110?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='54,110';"
}
] |
[
{
"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 was the date of the game attended by 45,122?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='45,122';"
}
] |
[
{
"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 is the earliest week with a game attended by 60,233?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='60,233';"
}
] |
[
{
"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 is the latest week with a game with a result of l 12\u20137?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='l 12\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Runner(s)-up, when Tournament is MCI Classic?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_6\" WHERE \"tournament\"='mci classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Winning Score, when Date is Jul 27, 1997?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_6\" WHERE \"date\"='jul 27, 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_6\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Winning Score, when Runner(s)-up is Ted Purdy?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_6\" WHERE \"runner_s_up\"='ted purdy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"institutions\" (\n \"location\" text,\n \"control\" text,\n \"type\" text,\n \"enrollment\" real,\n \"founded\" real\n);\n\nQuestion: With 10,894 students enrolled, in what year was this private RU/VH institution located in Troy, New York founded?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"founded\") FROM \"institutions\" WHERE \"type\"='ru/vh' AND \"control\"='private' AND \"enrollment\">'10,894' AND \"location\"='troy, new york';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"institutions\" (\n \"location\" text,\n \"control\" text,\n \"type\" text,\n \"enrollment\" real,\n \"founded\" real\n);\n\nQuestion: What is the enrollment number for the public institution in Golden, Colorado founded after 1874?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"enrollment\") FROM \"institutions\" WHERE \"control\"='public' AND \"location\"='golden, colorado' AND \"founded\">1874;"
}
] |
[
{
"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: Which Team has a Year smaller than 2007, and a Class of gts?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\"<2007 AND \"class\"='gts';"
}
] |
[
{
"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: In what year Year has a Co-Drivers of j\u00e9r\u00f4me policand christopher campbell?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"24_hours_of_le_mans_results\" WHERE \"co_drivers\"='j\u00e9r\u00f4me policand christopher campbell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_services_for_sky_italia_costumers\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Language, when Content is Monoscopio?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"tv_services_for_sky_italia_costumers\" WHERE \"content\"='monoscopio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_services_for_sky_italia_costumers\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Television Service, when Content is Presentazione?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"tv_services_for_sky_italia_costumers\" WHERE \"content\"='presentazione';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_services_for_sky_italia_costumers\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Package/Option, when Television Service is Sky Inside?"
},
{
"role": "assistant",
"content": "SELECT \"package_option\" FROM \"tv_services_for_sky_italia_costumers\" WHERE \"television_service\"='sky inside';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tv_services_for_sky_italia_costumers\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Package/Option, when Television Service is Sky Inside?"
},
{
"role": "assistant",
"content": "SELECT \"package_option\" FROM \"tv_services_for_sky_italia_costumers\" WHERE \"television_service\"='sky inside';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: What is the lowest Draw, when the Song is \"The Innocent Days\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draw\") FROM \"references\" WHERE \"song\"='\\\"the innocent days\\\"';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.