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 \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Who was the winner for the Rome to Teramo course?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"course\"='rome to teramo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Who was the winner of stage 11?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"stage\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the average Apps of indonesia with Goals smaller than 1000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"apps\") FROM \"club\" WHERE \"country\"='indonesia' AND \"goals\"<1000;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What division is Traktor Tashkent in 2005?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"club\" WHERE \"team\"='traktor tashkent' AND \"season\"='2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: How many apps does Uzbekistan have in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"apps\" FROM \"club\" WHERE \"country\"='uzbekistan' AND \"season\"='2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance at the game when the record was 74-77?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"record\"='74-77';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was score of the game when the record was 72-74?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='72-74';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode_no\" real,\n \"airdate\" text,\n \"total_viewers\" real,\n \"share\" text,\n \"bbc_one_weekly_ranking\" real\n);\n\nQuestion: What were the air-dates of the episodes before episode 4 that had a BBC One weekly ranking of 6?"
},
{
"role": "assistant",
"content": "SELECT \"airdate\" FROM \"series_3\" WHERE \"episode_no\"<4 AND \"bbc_one_weekly_ranking\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_3\" (\n \"episode_no\" real,\n \"airdate\" text,\n \"total_viewers\" real,\n \"share\" text,\n \"bbc_one_weekly_ranking\" real\n);\n\nQuestion: What was the total viewership for BBC One weekly rankings larger than 7, before episode 4?"
},
{
"role": "assistant",
"content": "SELECT \"total_viewers\" FROM \"series_3\" WHERE \"bbc_one_weekly_ranking\">7 AND \"episode_no\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the most rank with bronze of 0 and silver more than 1 and gold more than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"cultural_events\" WHERE \"bronze\"=0 AND \"silver\">1 AND \"gold\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cultural_events\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the average silver with total less than 1"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"cultural_events\" WHERE \"total\"<1;"
}
]
|
[
{
"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 \"festival\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Name the average year for result of nominated"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"awards\" WHERE \"result\"='nominated';"
}
]
|
[
{
"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 \"festival\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Name the nominated work for 1996 and festival of black maria film and video festival"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards\" WHERE \"year\"=1996 AND \"festival\"='black maria film and video festival';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"date\" text,\n \"team\" text,\n \"venue\" text,\n \"win_draw_lose\" text,\n \"score\" text\n);\n\nQuestion: What was the date of the away game that they lost to Accrington?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"league\" WHERE \"venue\"='away' AND \"win_draw_lose\"='lost' AND \"team\"='accrington';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"date\" text,\n \"team\" text,\n \"venue\" text,\n \"win_draw_lose\" text,\n \"score\" text\n);\n\nQuestion: What was the date of the home game against Accrington?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"league\" WHERE \"team\"='accrington' AND \"venue\"='home';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"date\" text,\n \"team\" text,\n \"venue\" text,\n \"win_draw_lose\" text,\n \"score\" text\n);\n\nQuestion: What was the result of the home game against Derby County?"
},
{
"role": "assistant",
"content": "SELECT \"win_draw_lose\" FROM \"league\" WHERE \"venue\"='home' AND \"team\"='derby county';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"for_the_x_window_system\" (\n \"name\" text,\n \"creator\" text,\n \"latest_stable_version\" text,\n \"standard_cost_usd\" text,\n \"software_license\" text\n);\n\nQuestion: What is the Standard cost (USD) by hans Oischinger Creator ?"
},
{
"role": "assistant",
"content": "SELECT \"standard_cost_usd\" FROM \"for_the_x_window_system\" WHERE \"creator\"='hans oischinger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"for_the_x_window_system\" (\n \"name\" text,\n \"creator\" text,\n \"latest_stable_version\" text,\n \"standard_cost_usd\" text,\n \"software_license\" text\n);\n\nQuestion: What is the Standard cost (USD) of Kwin team creator?"
},
{
"role": "assistant",
"content": "SELECT \"standard_cost_usd\" FROM \"for_the_x_window_system\" WHERE \"creator\"='kwin team';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"for_the_x_window_system\" (\n \"name\" text,\n \"creator\" text,\n \"latest_stable_version\" text,\n \"standard_cost_usd\" text,\n \"software_license\" text\n);\n\nQuestion: Who is the Creator that has a version of 0.5.2 (part of compiz fusion release)?"
},
{
"role": "assistant",
"content": "SELECT \"creator\" FROM \"for_the_x_window_system\" WHERE \"latest_stable_version\"='0.5.2 (part of compiz fusion release)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"for_the_x_window_system\" (\n \"name\" text,\n \"creator\" text,\n \"latest_stable_version\" text,\n \"standard_cost_usd\" text,\n \"software_license\" text\n);\n\nQuestion: Who is a Creator of hyriand?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"for_the_x_window_system\" WHERE \"creator\"='hyriand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What is the number of people who attended the game later than game 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"summary\" WHERE \"game\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_industry_association_of_americ\" (\n \"year\" real,\n \"date\" text,\n \"title\" text,\n \"format_s\" text,\n \"award_description_s\" text,\n \"result_s\" text\n);\n\nQuestion: Which title has a year later than 1986 with an album as the format?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"recording_industry_association_of_americ\" WHERE \"year\">1986 AND \"format_s\"='album';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_industry_association_of_americ\" (\n \"year\" real,\n \"date\" text,\n \"title\" text,\n \"format_s\" text,\n \"award_description_s\" text,\n \"result_s\" text\n);\n\nQuestion: Which is the average year with the date of February 24?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"recording_industry_association_of_americ\" WHERE \"date\"='february 24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_industry_association_of_americ\" (\n \"year\" real,\n \"date\" text,\n \"title\" text,\n \"format_s\" text,\n \"award_description_s\" text,\n \"result_s\" text\n);\n\nQuestion: Which award description has a year later than 1994 with a date of December 6?"
},
{
"role": "assistant",
"content": "SELECT \"award_description_s\" FROM \"recording_industry_association_of_americ\" WHERE \"year\">1994 AND \"date\"='december 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: How many goals have a Date of december 4, 2010, and a Score of 1-0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goal\") FROM \"international_goals\" WHERE \"date\"='december 4, 2010' AND \"score\"='1-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue has a Competition of 2008 myanmar grand royal challenge cup?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='2008 myanmar grand royal challenge cup';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which venue has a Goal of 4?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"goal\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the largest goal with a Score of 3-0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goal\") FROM \"international_goals\" WHERE \"score\"='3-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_12_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who did Bruno Soares and a partner face in the finals on a clay surface on August 1, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"doubles_24_12_12\" WHERE \"partnering\"='bruno soares' AND \"surface\"='clay' AND \"date\"='august 1, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_12_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What surface was played on that resulted in a score of 4\u20136, 6\u20132, [10\u20137]?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_24_12_12\" WHERE \"score\"='4\u20136, 6\u20132, [10\u20137]';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_12_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome on May 25, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_24_12_12\" WHERE \"date\"='may 25, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_12_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome on May 18, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_24_12_12\" WHERE \"date\"='may 18, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_thursday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: what is the place for Heath Slocum?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round_thursday\" WHERE \"player\"='heath slocum';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the attendance for august 29?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='august 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which loss has an Opponent of @ angels, and a Date of august 1?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='@ angels' AND \"date\"='august 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which score has an Attendance of 31,178?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='31,178';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which record has a Date of august 28?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='august 28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which loss has an Attendance of 23,952?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\"='23,952';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which opponent has a Loss of corcoran (4-4)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='corcoran (4-4)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the location of the gold medal match?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='gold medal match';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the lineup that resulted in 1-0 AET W?"
},
{
"role": "assistant",
"content": "SELECT \"lineup\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"result\"='1-0 aet w';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of match 25?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"match\"='25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the London 2012 Women's Olympic Football Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"location\"='london 2012 women''s olympic football tournament';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game that had a loss of Wegman (2-6)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='wegman (2-6)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record at the game that had a loss of Blyleven (4-5)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='blyleven (4-5)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monthly_normal_low_and_high_temperatures\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" 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: Name the city with july of 88 \u00b0f / 31.1 \u00b0c"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"monthly_normal_low_and_high_temperatures\" WHERE \"jul\"='88 \u00b0f / 31.1 \u00b0c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monthly_normal_low_and_high_temperatures\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" 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: Name the city with Feb of 66 \u00b0f / 18.9 \u00b0c"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"monthly_normal_low_and_high_temperatures\" WHERE \"feb\"='66 \u00b0f / 18.9 \u00b0c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monthly_normal_low_and_high_temperatures\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" 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: Name the city with september of 83 \u00b0f / 28.3 \u00b0c"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"monthly_normal_low_and_high_temperatures\" WHERE \"sep\"='83 \u00b0f / 28.3 \u00b0c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"monthly_normal_low_and_high_temperatures\" (\n \"city\" text,\n \"jan\" text,\n \"feb\" text,\n \"mar\" text,\n \"apr\" 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: Name the june when it has july of 84 \u00b0f / 28.9 \u00b0c"
},
{
"role": "assistant",
"content": "SELECT \"jun\" FROM \"monthly_normal_low_and_high_temperatures\" WHERE \"jul\"='84 \u00b0f / 28.9 \u00b0c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What Time has Date of May 9?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"game_log\" WHERE \"date\"='may 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_bay_of_plenty_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the lowest roll number of Katikati college?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"roll\") FROM \"western_bay_of_plenty_district\" WHERE \"name\"='katikati college';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_bay_of_plenty_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the highest roll number of the school in Te puna with a decile larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"roll\") FROM \"western_bay_of_plenty_district\" WHERE \"decile\">2 AND \"area\"='te puna';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_bay_of_plenty_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the roll number of Te Puke Intermediate, which has a decile of 4?"
},
{
"role": "assistant",
"content": "SELECT \"roll\" FROM \"western_bay_of_plenty_district\" WHERE \"decile\"=4 AND \"name\"='te puke intermediate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_bay_of_plenty_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the highest roll number of the school with a state authority and a decile smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"roll\") FROM \"western_bay_of_plenty_district\" WHERE \"authority\"='state' AND \"decile\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clausura_2004_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total value for Lost, when the value for Points is greater than 21, and when the value for Draw is 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"clausura_2004_standings\" WHERE \"points\">21 AND \"draw\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clausura_2004_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of Goals Scored, when the Team is San Salvador F.C., and when the Points are less than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_scored\") FROM \"clausura_2004_standings\" WHERE \"team\"='san salvador f.c.' AND \"points\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clausura_2004_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What are the total amount of Goals Conceded when the Points are less than 26, and when the value for Played is less than 18?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_conceded\") FROM \"clausura_2004_standings\" WHERE \"points\"<26 AND \"played\"<18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clausura_2004_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average value for Lost, when the value for Goals Scored is greater than 20, and when the value for Played is less than 18?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"clausura_2004_standings\" WHERE \"goals_scored\">20 AND \"played\"<18;"
}
]
|
[
{
"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: What is score of the game played in place t8 with Byron Nelson playing?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"place\"='t8' AND \"player\"='byron nelson';"
}
]
|
[
{
"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: What is the sum of Money of the game that was played in the United States with Sam Snead as a player?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"money\") FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"player\"='sam snead';"
}
]
|
[
{
"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: What is the Money ($) of the game with a score of 69-74-70-73=286?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"money\") FROM \"final_leaderboard\" WHERE \"score\"='69-74-70-73=286';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the mountains classification which has a young rider classification of francesco casagrande and integiro classification of not awarded with stage of 2"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"classification_leadership_by_stage\" WHERE \"young_rider_classification\"='francesco casagrande' AND \"intergiro_classification\"='not awarded' AND \"stage\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name the winner for adriano baffi and integiro classification of j\u00e1n svorada for stage of 13"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='adriano baffi' AND \"intergiro_classification\"='j\u00e1n svorada' AND \"stage\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Name trofeo fast team with young rider classification of francesco casagrande and stage of 10"
},
{
"role": "assistant",
"content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"young_rider_classification\"='francesco casagrande' AND \"stage\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"rank\" real,\n \"gymnast\" text,\n \"difficulty_score\" text,\n \"routine_score\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the total for a routine score of 26.6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"qualification\" WHERE \"routine_score\"=26.6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the january when april is courtney rachel culkin"
},
{
"role": "assistant",
"content": "SELECT \"january\" FROM \"2000_2009\" WHERE \"april\"='courtney rachel culkin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the october when november is buffy tyler"
},
{
"role": "assistant",
"content": "SELECT \"october\" FROM \"2000_2009\" WHERE \"november\"='buffy tyler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the october when the september is dalene kurtis"
},
{
"role": "assistant",
"content": "SELECT \"october\" FROM \"2000_2009\" WHERE \"september\"='dalene kurtis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the april for candice cassidy"
},
{
"role": "assistant",
"content": "SELECT \"april\" FROM \"2000_2009\" WHERE \"june\"='candice cassidy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"january\" text,\n \"february\" text,\n \"march\" text,\n \"april\" text,\n \"june\" text,\n \"july\" text,\n \"august\" text,\n \"september\" text,\n \"october\" text,\n \"november\" text,\n \"december\" text\n);\n\nQuestion: Name the october for july of kimberley stanfield"
},
{
"role": "assistant",
"content": "SELECT \"october\" FROM \"2000_2009\" WHERE \"july\"='kimberley stanfield';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: Which Representative was from Kentucky during the years of 1855\u20131859?"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"external_links\" WHERE \"state\"='kentucky' AND \"years\"='1855\u20131859';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: What was the lifespan of the Representative from the Republican Party during the years of 1953\u20131970?"
},
{
"role": "assistant",
"content": "SELECT \"lifespan\" FROM \"external_links\" WHERE \"party\"='republican' AND \"years\"='1953\u20131970';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: What years did the Representative from Iowa with a lifespan of 1880\u20131942 serve?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"external_links\" WHERE \"state\"='iowa' AND \"lifespan\"='1880\u20131942';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: Which Representative had a Lifespan of 1795\u20131866?"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"external_links\" WHERE \"lifespan\"='1795\u20131866';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: When did the Chiefs have their first bye?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"season_schedule\" WHERE \"attendance\"='bye';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: What is the position played for the player drafted in round 2?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"january_draft\" WHERE \"round\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the name of the player that played position 3b?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"january_draft\" WHERE \"position\"='3b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the school for Ivey armstrong?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"january_draft\" WHERE \"name\"='ivey armstrong';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january_draft\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: what is the position for the player from university of alabama?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"january_draft\" WHERE \"school\"='university of alabama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city_town\" text,\n \"july_av_t\" text,\n \"rain\" text,\n \"days_with_rain_year_summer\" text,\n \"days_with_frost\" real,\n \"sunlight_hours\" real\n);\n\nQuestion: How many days with frost were there in the City/Town of Lugo have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"days_with_frost\") FROM \"climate\" WHERE \"city_town\"='lugo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city_town\" text,\n \"july_av_t\" text,\n \"rain\" text,\n \"days_with_rain_year_summer\" text,\n \"days_with_frost\" real,\n \"sunlight_hours\" real\n);\n\nQuestion: What is the lowest number of sunlight hours, and number of days with frost, more than 30, for the city of Ourense?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"sunlight_hours\") FROM \"climate\" WHERE \"city_town\"='ourense' AND \"days_with_frost\">30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"climate\" (\n \"city_town\" text,\n \"july_av_t\" text,\n \"rain\" text,\n \"days_with_rain_year_summer\" text,\n \"days_with_frost\" real,\n \"sunlight_hours\" real\n);\n\nQuestion: What is the largest amount of sunlight hours for the City of Pontevedra?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sunlight_hours\") FROM \"climate\" WHERE \"city_town\"='pontevedra';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: for the rank of 3 for the united states, what is the average lane?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lane\") FROM \"semifinal_2\" WHERE \"nationality\"='united states' AND \"rank\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: for the rank more than 1 and nationality of netherlands, what is the lane?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lane\") FROM \"semifinal_2\" WHERE \"nationality\"='netherlands' AND \"rank\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: for the time of 49.04 and lane less than 3, what is the nationality?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"lane\"<3 AND \"time\"=49.04;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: for the rank of 8 and lane less than 3 what is the name?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"semifinal_2\" WHERE \"lane\"<3 AND \"rank\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What play has a loss of 2?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2007_2008_table\" WHERE \"lost\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What try bonus has a club of caerphilly rfc?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2007_2008_table\" WHERE \"club\"='caerphilly rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What club has a play of 22, and losing bonus of 7?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2007_2008_table\" WHERE \"played\"='22' AND \"losing_bonus\"='7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_2008_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What point against has tries against of 77, and a lost of 16?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2007_2008_table\" WHERE \"tries_against\"='77' AND \"lost\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"began_play\" text,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: The nll participate in what sport?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"professional_sports\" WHERE \"league\"='nll';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"began_play\" text,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: When did the Club of western new york flash begin to play?"
},
{
"role": "assistant",
"content": "SELECT \"began_play\" FROM \"professional_sports\" WHERE \"club\"='western new york flash';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"began_play\" text,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: Which club plays soccer in the nwsl?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"professional_sports\" WHERE \"sport\"='soccer' AND \"league\"='nwsl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"professional_sports\" (\n \"club\" text,\n \"sport\" text,\n \"began_play\" text,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: When did the Rochester Rhinos begin to play?"
},
{
"role": "assistant",
"content": "SELECT \"began_play\" FROM \"professional_sports\" WHERE \"club\"='rochester rhinos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"podiums_on_all_three_grands_tours\" (\n \"name\" text,\n \"tour\" real,\n \"giro\" real,\n \"vuelta\" real,\n \"total\" real\n);\n\nQuestion: The sun of total that has a tour of 7 and a Giro smaller than 3 is 12."
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"podiums_on_all_three_grands_tours\" WHERE \"tour\"=7 AND \"giro\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rotorua_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: What genders did Lynmore Primary School take?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"rotorua_district\" WHERE \"name\"='lynmore primary school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rotorua_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text\n);\n\nQuestion: Which area served coed genders at Kaharoa school and had a Decile of 9?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"rotorua_district\" WHERE \"gender\"='coed' AND \"decile\"='9' AND \"name\"='kaharoa school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lower_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What was the gender for the integrated authority with a roll of 142?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"lower_hutt_city\" WHERE \"authority\"='integrated' AND \"roll\"=142;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lower_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What was the Authority for Avalon School with a roll less than 358?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"lower_hutt_city\" WHERE \"area\"='avalon' AND \"roll\"<358 AND \"name\"='avalon school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lower_hutt_city\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Who is the authority for the coed Eastbourne school?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"lower_hutt_city\" WHERE \"area\"='eastbourne' AND \"gender\"='coed';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.