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 \"connecticut\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Which incumbent was first elected in 1987?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"connecticut\" WHERE \"first_elected\"=1987;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: From which country is the player who made less than $216?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"money\"<216;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"money\">216 AND \"score\"='74-70-71-69=284';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which player placed in t5 and had a score of 72-71-73-78=294?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"place\"='t5' AND \"score\"='72-71-73-78=294';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recordings\" (\n \"pianist\" text,\n \"conductor\" text,\n \"record_company\" text,\n \"year_of_recording\" real,\n \"format\" text\n);\n\nQuestion: What is the year that a record was recorded with Libor Pesek as conductor?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year_of_recording\") FROM \"recordings\" WHERE \"conductor\"='libor pesek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recordings\" (\n \"pianist\" text,\n \"conductor\" text,\n \"record_company\" text,\n \"year_of_recording\" real,\n \"format\" text\n);\n\nQuestion: What record company did pianist Solomon Cutner record for?"
},
{
"role": "assistant",
"content": "SELECT \"record_company\" FROM \"recordings\" WHERE \"pianist\"='solomon cutner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recordings\" (\n \"pianist\" text,\n \"conductor\" text,\n \"record_company\" text,\n \"year_of_recording\" real,\n \"format\" text\n);\n\nQuestion: What record company did conductor Mikhail Snitko record for after 1996?"
},
{
"role": "assistant",
"content": "SELECT \"record_company\" FROM \"recordings\" WHERE \"year_of_recording\">1996 AND \"conductor\"='mikhail snitko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: Which event had a total of 28?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"qualification\" WHERE \"total\"='28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: Who was the shooter when the rank points was 8 and the event was WC Kerrville?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"rank_points\"='8' AND \"event\"='wc kerrville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What was the total when the score points was 12 and the rank points was 15?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"qualification\" WHERE \"score_points\"='12' AND \"rank_points\"='15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_goals\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score at the Champions League, when the result shows win?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"european_cup_goals\" WHERE \"competition\"='champions league' AND \"result\"='win';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_goals\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the competition when the opponent was the Randers?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"european_cup_goals\" WHERE \"opponent\"='randers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_goals\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the UEFA Cup, against Palermo?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"european_cup_goals\" WHERE \"competition\"='uefa cup' AND \"opponent\"='palermo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_goals\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date was the UEFA Cup against Panathinaikos?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"european_cup_goals\" WHERE \"competition\"='uefa cup' AND \"opponent\"='panathinaikos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attacks_against_israeli_diplomatic_missi\" (\n \"israeli_deaths\" real,\n \"other_deaths\" text,\n \"total_deaths\" text,\n \"israeli_and_or_foreigner_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: What is the total number of deaths of the attack with 0 Israelis or foreigners wounded, 0 other deaths, and a total casualty of 1?"
},
{
"role": "assistant",
"content": "SELECT \"total_deaths\" FROM \"attacks_against_israeli_diplomatic_missi\" WHERE \"israeli_and_or_foreigner_wounded\"='0' AND \"other_deaths\"='0' AND \"total_casualties\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attacks_against_israeli_diplomatic_missi\" (\n \"israeli_deaths\" real,\n \"other_deaths\" text,\n \"total_deaths\" text,\n \"israeli_and_or_foreigner_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many Israelis and or foreigners were wounded in the attack with more than 1 Israeli death?"
},
{
"role": "assistant",
"content": "SELECT \"israeli_and_or_foreigner_wounded\" FROM \"attacks_against_israeli_diplomatic_missi\" WHERE \"israeli_deaths\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attacks_against_israeli_diplomatic_missi\" (\n \"israeli_deaths\" real,\n \"other_deaths\" text,\n \"total_deaths\" text,\n \"israeli_and_or_foreigner_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many other deaths were in the attack with 242 Israelis and/or foreigners wounded?"
},
{
"role": "assistant",
"content": "SELECT \"other_deaths\" FROM \"attacks_against_israeli_diplomatic_missi\" WHERE \"israeli_and_or_foreigner_wounded\"='242';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attacks_against_israeli_diplomatic_missi\" (\n \"israeli_deaths\" real,\n \"other_deaths\" text,\n \"total_deaths\" text,\n \"israeli_and_or_foreigner_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: What is the total number of Israeli deaths in the attack with 0 total casulaties and 0 total deaths?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"israeli_deaths\") FROM \"attacks_against_israeli_diplomatic_missi\" WHERE \"total_casualties\"='0' AND \"total_deaths\"='0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What place did the golfer who had a score of 69-68-69-70=276 finish in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='69-68-69-70=276';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the to par score for Mike Weir?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='mike weir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What country was Jay Haas representing?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='jay haas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country has the t7 place, and player Peter Oosterhuis?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t7' AND \"player\"='peter oosterhuis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the score for Sandy Lyle?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='sandy lyle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"appearances_and_goals\" WHERE \"league_cup_goals\">0 AND \"total_goals\"<13 AND \"league_cup_apps\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\"=0 AND \"fa_cup_apps\"='0' AND \"position\"='df' AND \"total_apps\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"season\" text,\n \"date_released\" text,\n \"num_of_episodes\" real,\n \"num_of_discs\" real,\n \"special_features\" text\n);\n\nQuestion: What is the lowest # Of Episodes, when Date Released is \"15 December 2011\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num_of_episodes\") FROM \"dvd_releases\" WHERE \"date_released\"='15 december 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"season\" text,\n \"date_released\" text,\n \"num_of_episodes\" real,\n \"num_of_discs\" real,\n \"special_features\" text\n);\n\nQuestion: What Date Released, when # Of Discs is greater than 4?"
},
{
"role": "assistant",
"content": "SELECT \"date_released\" FROM \"dvd_releases\" WHERE \"num_of_discs\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dvd_releases\" (\n \"season\" text,\n \"date_released\" text,\n \"num_of_episodes\" real,\n \"num_of_discs\" real,\n \"special_features\" text\n);\n\nQuestion: What is Season, when # Of Episodes is \"10\", and when Date Released is \"1 April 2010\"?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"dvd_releases\" WHERE \"num_of_episodes\"=10 AND \"date_released\"='1 april 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when Sheffield United was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='sheffield united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the away team against Newton Heath?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"home_team\"='newton heath';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the home team when the tie is 11?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the sum of League Goals, when Position is \"DF\", when League Cup Apps is \"0\", when Total Apps is \"7\", and when FLT Goals is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_goals\") FROM \"appearances_goals\" WHERE \"position\"='df' AND \"league_cup_apps\"='0' AND \"total_apps\"='7' AND \"flt_goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the total number of FA Cup Goals, when FLT Goals is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fa_cup_goals\") FROM \"appearances_goals\" WHERE \"flt_goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the lowest FA Cup Goals, when Total Goals is greater than 0, when League Goals is \"4\", when FA Cup Apps is \"1\", and when League Cup Goals is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fa_cup_goals\") FROM \"appearances_goals\" WHERE \"total_goals\">0 AND \"league_goals\"=4 AND \"fa_cup_apps\"='1' AND \"league_cup_goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_1997\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 1:30PM with 12:30 local programs, and Pinky and the Brain shows at 4:00pm?"
},
{
"role": "assistant",
"content": "SELECT \"1_30_pm\" FROM \"fall_1997\" WHERE \"12_30_pm\"='local programs' AND \"4_00_pm\"='pinky and the brain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_1997\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 4L00pm, with 1:00pm is All My Children?"
},
{
"role": "assistant",
"content": "SELECT \"4_00_pm\" FROM \"fall_1997\" WHERE \"1_00_pm\"='all my children';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_1997\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 11:00AM that shows Power Rangers: Turbo at 4:00pm?"
},
{
"role": "assistant",
"content": "SELECT \"11_00_am\" FROM \"fall_1997\" WHERE \"4_00_pm\"='power rangers: turbo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_1997\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 7:00am, when the 1:00 is just local programs?"
},
{
"role": "assistant",
"content": "SELECT \"7_00_am\" FROM \"fall_1997\" WHERE \"1_00_pm\"='local programs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fall_1997\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 8:00am, that has Another World playing at 2:00pm?"
},
{
"role": "assistant",
"content": "SELECT \"8_00_am\" FROM \"fall_1997\" WHERE \"2_00_pm\"='another world';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: How many points for Newman/Haas Racing with fewer than 40 laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"race\" WHERE \"team\"='newman/haas racing' AND \"laps\"<40;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which driver has fewer than 2 points, larger grid that 4 and is on American Spirit Team Johansson?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"points\"<2 AND \"grid\">4 AND \"team\"='american spirit team johansson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bcs_standings\" (\n \"week_8_oct_26\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_final_dec_7\" text\n);\n\nQuestion: What is the week 11 nov 16 standing with wisconsin (10-1) on week 13 Nov 30?"
},
{
"role": "assistant",
"content": "SELECT \"week_11_nov_16\" FROM \"bcs_standings\" WHERE \"week_13_nov_30\"='wisconsin (10-1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bcs_standings\" (\n \"week_8_oct_26\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_final_dec_7\" text\n);\n\nQuestion: What is the week 13 Nov 30 standing with USC (7-3) on week 11 Nov 16?"
},
{
"role": "assistant",
"content": "SELECT \"week_13_nov_30\" FROM \"bcs_standings\" WHERE \"week_11_nov_16\"='usc (7-3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bcs_standings\" (\n \"week_8_oct_26\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_final_dec_7\" text\n);\n\nQuestion: What is the week 8 Oct 26 standing with georgia tech (8-2) on week 12 Nov 23?"
},
{
"role": "assistant",
"content": "SELECT \"week_8_oct_26\" FROM \"bcs_standings\" WHERE \"week_12_nov_23\"='georgia tech (8-2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bcs_standings\" (\n \"week_8_oct_26\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_final_dec_7\" text\n);\n\nQuestion: What is the week 14 (final) dec 7 standing with Florida (6-1) on week 8 Oct 26?"
},
{
"role": "assistant",
"content": "SELECT \"week_14_final_dec_7\" FROM \"bcs_standings\" WHERE \"week_8_oct_26\"='florida (6-1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What player is associated with soenderjyske.dk?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"source\"='soenderjyske.dk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the transfer fee for Gravgaard?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"type\"='transfer' AND \"name\"='gravgaard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classical_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What's the result when there's more than 41 moves with an opening of c42 petrov's defence in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"classical_games\" WHERE \"moves\">41 AND \"year\"=2007 AND \"opening\"='c42 petrov''s defence';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classical_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What's the total number of moves with a result of \u00bd\u2013\u00bd and a black of Anand before 1999?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"moves\") FROM \"classical_games\" WHERE \"result\"='\u00bd\u2013\u00bd' AND \"year\"<1999 AND \"black\"='anand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classical_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What's the black with 24 moves in the dortmund tournament?"
},
{
"role": "assistant",
"content": "SELECT \"black\" FROM \"classical_games\" WHERE \"moves\"=24 AND \"tournament\"='dortmund';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classical_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What's the opening when white is Anand with fewer than 61 moves for a result of \u00bd\u2013\u00bd?"
},
{
"role": "assistant",
"content": "SELECT \"opening\" FROM \"classical_games\" WHERE \"white\"='anand' AND \"moves\"<61 AND \"result\"='\u00bd\u2013\u00bd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classical_games\" (\n \"white\" text,\n \"black\" text,\n \"year\" real,\n \"result\" text,\n \"moves\" real,\n \"tournament\" text,\n \"opening\" text\n);\n\nQuestion: What's the white for a black of Anand, a result of \u00bd\u2013\u00bd, 39 moves, and an opening of d37 queen's gambit declined?"
},
{
"role": "assistant",
"content": "SELECT \"white\" FROM \"classical_games\" WHERE \"black\"='anand' AND \"result\"='\u00bd\u2013\u00bd' AND \"moves\"=39 AND \"opening\"='d37 queen''s gambit declined';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest draw that has We The Lovers for the english translation, with a place greater than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draw\") FROM \"results\" WHERE \"english_translation\"='we the lovers' AND \"place\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: How many draws have french as the language, with a place less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draw\") FROM \"results\" WHERE \"language\"='french' AND \"place\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"name_of_ship\" text,\n \"flag\" text,\n \"tonnage\" real,\n \"fate\" text\n);\n\nQuestion: What is the Fate of the HMS Manistee (f 104) with a Tonnage of 4,671 or more?"
},
{
"role": "assistant",
"content": "SELECT \"fate\" FROM \"ships_attacked\" WHERE \"tonnage\">'4,671' AND \"name_of_ship\"='hms manistee (f 104)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"name_of_ship\" text,\n \"flag\" text,\n \"tonnage\" real,\n \"fate\" text\n);\n\nQuestion: What is the Tonnage of the ship from Canada?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tonnage\") FROM \"ships_attacked\" WHERE \"flag\"='canada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: In what place did the golfer representing Zimbabwe finish?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"country\"='zimbabwe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: In what place did Des Smyth, who scored less than 71, finish?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"<71 AND \"player\"='des smyth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What is the spaceport location that houses the LC34 complex and uses the Saturn IB launcher?"
},
{
"role": "assistant",
"content": "SELECT \"spaceport\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"launcher\"='saturn ib' AND \"launch_complex\"='lc34';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: Which spacecraft were launched by the Titan II?"
},
{
"role": "assistant",
"content": "SELECT \"spacecraft\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"launcher\"='titan ii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: What was the launcher vehicle for Apollo-Soyuz?"
},
{
"role": "assistant",
"content": "SELECT \"launcher\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"spacecraft\"='apollo-soyuz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spaceports_with_achieved_vertical_launch\" (\n \"spaceport\" text,\n \"launch_complex\" text,\n \"launcher\" text,\n \"spacecraft\" text,\n \"flights\" text,\n \"years\" text\n);\n\nQuestion: Which complex used the Soyuz (r) launcher to facilitate 14 orbital flights?"
},
{
"role": "assistant",
"content": "SELECT \"launch_complex\" FROM \"spaceports_with_achieved_vertical_launch\" WHERE \"launcher\"='soyuz (r)' AND \"flights\"='14 orbital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2008 when the tournament is year end ranking?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='year end ranking';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2012 when the tournament is cincinnati masters?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='cincinnati masters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2008 when 2012 is 3r and 2009 is 2r?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2012\"='3r' AND \"2009\"='2r';"
}
]
|
[
{
"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 \"winners\" text,\n \"location\" text,\n \"event_director\" text,\n \"winner_s_prize\" text\n);\n\nQuestion: What is the Winner's Prize at the 2009 Providence, RI Championship?"
},
{
"role": "assistant",
"content": "SELECT \"winner_s_prize\" FROM \"past_winners\" WHERE \"location\"='providence, ri' AND \"year\"=2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How tall is the structure built in 1907?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"year\"=1907;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: Which building has more than 34 floors?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"tallest_buildings\" WHERE \"floors\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which rank has 0 bronze and 2 silver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"performances_by_nation\" WHERE \"bronze\"=0 AND \"silver\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much silver does the rank have that has gold smaller than 4, and a total of 1 and a rank larger than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"performances_by_nation\" WHERE \"gold\"<4 AND \"total\"=1 AND \"rank\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which rank has a more than 0 silver, 4 bronze, and a total smaller than 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"performances_by_nation\" WHERE \"silver\">0 AND \"bronze\"=4 AND \"total\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much gold does the tank have that has 3 silver and more than 3 bronze?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"performances_by_nation\" WHERE \"silver\"=3 AND \"bronze\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number that 0 silver?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"performances_by_nation\" WHERE \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Which Score has a To par larger than 17, and a Player of mike brady?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"to_par\">17 AND \"player\"='mike brady';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Which Place that has Money of 150, and a Player of bobby cruickshank?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"money\"=150 AND \"player\"='bobby cruickshank';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Which Place has a To par smaller than 15, and a Score of 74-74-74-75=297?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"to_par\"<15 AND \"score\"='74-74-74-75=297';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score when the tie number is 8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score when the tie number is 6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the tie number for Middlesbrough?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='middlesbrough';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1967\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What status has 15/04/1967 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1967\" WHERE \"date\"='15/04/1967';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1967\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What venue has Scotland as the opposing teams?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1967\" WHERE \"opposing_teams\"='scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1967\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What status has France as the opposing teams?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1967\" WHERE \"opposing_teams\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: What kind of Week 4 has a Week 9 of all housemates?"
},
{
"role": "assistant",
"content": "SELECT \"week_4\" FROM \"nominations\" WHERE \"week_9\"='all housemates';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: Which Week 3 has a Week 9 of ejected (day 3)?"
},
{
"role": "assistant",
"content": "SELECT \"week_3\" FROM \"nominations\" WHERE \"week_9\"='ejected (day 3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3"
},
{
"role": "assistant",
"content": "SELECT \"week_1\" FROM \"nominations\" WHERE \"week_8\"='not eligible' AND \"week_9\"='no nominations' AND \"week_3\"='cyril';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: What kind of Week 9 has a Week 1 of no nominations, and a Week 6 of not eligible, and a Week 2 of not eligible, and a Week 10 FINAL of evicted (day 57)?"
},
{
"role": "assistant",
"content": "SELECT \"week_9\" FROM \"nominations\" WHERE \"week_1\"='no nominations' AND \"week_6\"='not eligible' AND \"week_2\"='not eligible' AND \"week_10_final\"='evicted (day 57)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: What kind of Week 7 has a Week 5 of evicted (day 15)?"
},
{
"role": "assistant",
"content": "SELECT \"week_7\" FROM \"nominations\" WHERE \"week_5\"='evicted (day 15)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10_final\" text\n);\n\nQuestion: What kind of Week 6 has a Week 2 of see notes 2 , 3 , 4?"
},
{
"role": "assistant",
"content": "SELECT \"week_6\" FROM \"nominations\" WHERE \"week_2\"='see notes 2 , 3 , 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"geelong_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Against has more than 11 wins, and a Geelong FL of st josephs?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2012_ladder\" WHERE \"wins\">11 AND \"geelong_fl\"='st josephs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"postseason\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text\n);\n\nQuestion: What is the Attendance of the game with a Loss of Hiller (3\u20132)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"postseason\" WHERE \"loss\"='hiller (3\u20132)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who is the away team that tottenham hotspur played?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='tottenham hotspur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the game with away team chelsea on 29 january 1983?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"date\"='29 january 1983' AND \"away_team\"='chelsea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was the game that home team torquay united played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"home_team\"='torquay united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who is the team that played away team watford?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='watford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was the game when home team crystal palace played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"home_team\"='crystal palace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Retief Goosen from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='retief goosen';"
}
]
|
[
{
"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 \"legs_won\" real,\n \"legs_lost\" real,\n \"lwat\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the number of high checkout with fewer than 13 legs won, a 180s lower than 2 and an LWAT of more than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"high_checkout\") FROM \"statistics\" WHERE \"legs_won\"<13 AND \"180s\"<2 AND \"lwat\">1;"
}
]
|
[
{
"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 \"legs_won\" real,\n \"legs_lost\" real,\n \"lwat\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: What is the total 140+ with a high checkout of 74 and a 100+ higher than 17?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"140\") FROM \"statistics\" WHERE \"high_checkout\"=74 AND \"100\">17;"
}
]
|
[
{
"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 \"legs_won\" real,\n \"legs_lost\" real,\n \"lwat\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" real\n);\n\nQuestion: How many played are there with a 3-dart average of more than 90.8, an LWAT higher than 5 and fewer than 17 legs lost?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"statistics\" WHERE \"3_dart_average\">90.8 AND \"lwat\">5 AND \"legs_lost\"<17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Player is in Place 1?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"place\"='1';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.