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 \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the heat with a time of 3:45.57 in lane 3?"
},
{
"role": "assistant",
"content": "SELECT \"heat\" FROM \"heats\" WHERE \"lane\"=3 AND \"time\"='3:45.57';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who are the Rowers with a Time of 6:39.49?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"heat_3\" WHERE \"time\"='6:39.49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the Country of the rowers with a Rank of 4?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heat_3\" WHERE \"rank\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: What counties mascot are the Red Ramblers?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='red ramblers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA class when the county was 83 vermillion?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='83 vermillion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: What is the enrollment number for Rockville?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='rockville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Result of the game on October 20, 1963 with an Attendance of 60,671 or greater?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'60,671' AND \"date\"='october 20, 1963';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Attendance of the game against Minnesota Vikings?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='minnesota vikings';"
}
]
|
[
{
"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: what is the average score for s\u00f8ren kjeldsen?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"score\") FROM \"first_round\" WHERE \"player\"='s\u00f8ren kjeldsen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the against of South Warrnambool when the draw is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"1946_ladder\" WHERE \"club\"='south warrnambool' AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the smallest draw of Warrnambool when the against was less than 1299, more than 7 wins, and less than 2 losses?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"1946_ladder\" WHERE \"against\"<1299 AND \"wins\">7 AND \"club\"='warrnambool' AND \"losses\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the against when the draw was more than 0 and had 13 losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"1946_ladder\" WHERE \"losses\"=13 AND \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the against when there were more than 2 losses, more than 3 wins, and draws more than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"1946_ladder\" WHERE \"losses\">2 AND \"wins\">3 AND \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1946_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the highest amount of losses of Camperdown when the against was less than 945?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"1946_ladder\" WHERE \"club\"='camperdown' AND \"against\"<945;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: What is the venue later than 1983 with Men's Open of NSW and Men's 35 of QLD?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results_of_the_national_championships_19\" WHERE \"men_s_open\"='nsw' AND \"men_s_35s\"='qld' AND \"year\">1983;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: What is the venue earlier than 1995 with Men's Open of QLD and Men's 35 of QLD and Woman's Open of QLD?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results_of_the_national_championships_19\" WHERE \"men_s_35s\"='qld' AND \"men_s_open\"='qld' AND \"year\"<1995 AND \"women_s_open\"='qld';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: What is the Men's 35 in year before 1990 when Men's Open is NSW and the venue is Sydney?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_35s\" FROM \"results_of_the_national_championships_19\" WHERE \"year\"<1990 AND \"men_s_open\"='nsw' AND \"venue\"='sydney';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: In what year was the venue Gold Coast and the Men's 35s NSW?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"results_of_the_national_championships_19\" WHERE \"venue\"='gold coast' AND \"men_s_35s\"='nsw';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: What is the Men's Open when the venue is Perth?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_open\" FROM \"results_of_the_national_championships_19\" WHERE \"venue\"='perth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_the_national_championships_19\" (\n \"year\" real,\n \"venue\" text,\n \"men_s_open\" text,\n \"women_s_open\" text,\n \"men_s_35s\" text\n);\n\nQuestion: What is the year that the Men's 35 is NSW, Women's Open is QLD and the venue is Sydney?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"results_of_the_national_championships_19\" WHERE \"men_s_35s\"='nsw' AND \"venue\"='sydney' AND \"women_s_open\"='qld';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"played\" real,\n \"highest\" real,\n \"lowest\" real,\n \"total\" real,\n \"average\" real\n);\n\nQuestion: What is the average for the team with highest less than 13,500 and games played are fewer than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average\") FROM \"attendances\" WHERE \"highest\"<'13,500' AND \"played\"<5;"
}
]
|
[
{
"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\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the sum of league goals when the fa cup goals is more than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\">0;"
}
]
|
[
{
"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\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the average league cup goals when the league cup apps is 4, league goals is less than 4, fa cup apps is 1 and total apps is 35?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"league_cup_apps\"=4 AND \"league_goals\"<4 AND \"fa_cup_apps\"='1' AND \"total_apps\"='35';"
}
]
|
[
{
"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\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the average league cup goals when the position is df and total goals is more than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"league_cup_goals\") FROM \"appearances_and_goals\" WHERE \"position\"='df' AND \"total_goals\">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\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: what is the average fa cup goals when the fa cup apps is 0, total goals is less than 1 and position is df?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fa_cup_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\"='0' AND \"total_goals\"<1 AND \"position\"='df';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_recognition\" (\n \"index\" text,\n \"score\" text,\n \"palop_rank\" text,\n \"cplp_rank\" text,\n \"n_africa_rank\" text,\n \"world_rank\" text,\n \"year\" real\n);\n\nQuestion: What year had a score of 0.586?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"international_recognition\" WHERE \"score\"='0.586';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_recognition\" (\n \"index\" text,\n \"score\" text,\n \"palop_rank\" text,\n \"cplp_rank\" text,\n \"n_africa_rank\" text,\n \"world_rank\" text,\n \"year\" real\n);\n\nQuestion: What's the n Africa in 2012 with an N/A as the CPLP?"
},
{
"role": "assistant",
"content": "SELECT \"n_africa_rank\" FROM \"international_recognition\" WHERE \"year\"=2012 AND \"cplp_rank\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"miss_earth_titleholders\" (\n \"year\" real,\n \"finals_venue\" text,\n \"location\" text,\n \"pageant_date\" text,\n \"number_of_delegates\" text\n);\n\nQuestion: What was the final venue for 82 delegates?"
},
{
"role": "assistant",
"content": "SELECT \"finals_venue\" FROM \"miss_earth_titleholders\" WHERE \"number_of_delegates\"='82';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_selling_albums_in_the_uk\" (\n \"artist\" text,\n \"record_label\" text,\n \"released\" text,\n \"chart_peak\" real,\n \"number_of_times_certified_platinum\" text\n);\n\nQuestion: Which Artist has a Record label of vertigo?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"best_selling_albums_in_the_uk\" WHERE \"record_label\"='vertigo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_on_m40_corridor\" (\n \"place\" text,\n \"population\" real,\n \"ceremonial_county\" text,\n \"main_railway_station\" text,\n \"motorway_junction\" text\n);\n\nQuestion: Where is the ceremonial county for motorwy junction 1 and a population larger than 118,229?"
},
{
"role": "assistant",
"content": "SELECT \"ceremonial_county\" FROM \"settlements_on_m40_corridor\" WHERE \"population\">'118,229' AND \"motorway_junction\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"settlements_on_m40_corridor\" (\n \"place\" text,\n \"population\" real,\n \"ceremonial_county\" text,\n \"main_railway_station\" text,\n \"motorway_junction\" text\n);\n\nQuestion: What was the place that had a main railway station of banbury and a population bigger than 28,672?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"settlements_on_m40_corridor\" WHERE \"population\">'28,672' AND \"main_railway_station\"='banbury';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholar_survey_results\" (\n \"president\" text,\n \"schl_1948\" text,\n \"schl_1962\" text,\n \"m_b_1982\" text,\n \"ct_1982\" text,\n \"siena_1982\" text,\n \"siena_1990\" text,\n \"siena_1994\" text,\n \"r_mc_i_1996\" text,\n \"schl_1996\" text,\n \"c_span_1999\" text,\n \"wsj_2000\" text,\n \"siena_2002\" text,\n \"wsj_2005\" text,\n \"times_2008\" text,\n \"c_span_2009\" text,\n \"siena_2010\" text,\n \"uspc_2011\" text,\n \"aggr\" text\n);\n\nQuestion: Who is the president when c-span 2009 is 21?"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"scholar_survey_results\" WHERE \"c_span_2009\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholar_survey_results\" (\n \"president\" text,\n \"schl_1948\" text,\n \"schl_1962\" text,\n \"m_b_1982\" text,\n \"ct_1982\" text,\n \"siena_1982\" text,\n \"siena_1990\" text,\n \"siena_1994\" text,\n \"r_mc_i_1996\" text,\n \"schl_1996\" text,\n \"c_span_1999\" text,\n \"wsj_2000\" text,\n \"siena_2002\" text,\n \"wsj_2005\" text,\n \"times_2008\" text,\n \"c_span_2009\" text,\n \"siena_2010\" text,\n \"uspc_2011\" text,\n \"aggr\" text\n);\n\nQuestion: what is c-span 2009 when times 2008** is 08?"
},
{
"role": "assistant",
"content": "SELECT \"c_span_2009\" FROM \"scholar_survey_results\" WHERE \"times_2008\"='08';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scholar_survey_results\" (\n \"president\" text,\n \"schl_1948\" text,\n \"schl_1962\" text,\n \"m_b_1982\" text,\n \"ct_1982\" text,\n \"siena_1982\" text,\n \"siena_1990\" text,\n \"siena_1994\" text,\n \"r_mc_i_1996\" text,\n \"schl_1996\" text,\n \"c_span_1999\" text,\n \"wsj_2000\" text,\n \"siena_2002\" text,\n \"wsj_2005\" text,\n \"times_2008\" text,\n \"c_span_2009\" text,\n \"siena_2010\" text,\n \"uspc_2011\" text,\n \"aggr\" text\n);\n\nQuestion: what is siena 2002 when the president is andrew jackson?"
},
{
"role": "assistant",
"content": "SELECT \"siena_2002\" FROM \"scholar_survey_results\" WHERE \"president\"='andrew jackson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: Which Location has a Home Ground of Mong kok stadium?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"k\" WHERE \"home_ground\"='mong kok stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: Which club is in the First division?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"k\" WHERE \"league_division\"='first division';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What is the Home Ground with the Location n/a for the Club kcdrsc?"
},
{
"role": "assistant",
"content": "SELECT \"home_ground\" FROM \"k\" WHERE \"location\"='n/a' AND \"club\"='kcdrsc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What League/Division has a Location of n/a?"
},
{
"role": "assistant",
"content": "SELECT \"league_division\" FROM \"k\" WHERE \"location\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"k\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What Location is in the second division and has 4th, third division (promoted) as its Position in 2012-13?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"k\" WHERE \"league_division\"='second division' AND \"position_in_2012_13\"='4th, third division (promoted)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the rank of the team who raced at a time of 7:16.13?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"semifinal_a_b_2\" WHERE \"time\"='7:16.13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the total number of rank for the country of greece?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"semifinal_a_b_2\" WHERE \"country\"='greece';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What country were the athletes where ranked smaller than 5 with notes listed as fb?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"semifinal_a_b_2\" WHERE \"rank\"<5 AND \"notes\"='fb';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for the race with the United States?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_a_b_2\" WHERE \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2013_2014\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What shirt No has a Birth Date of April 12, 1986 (age27)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"shirt_no\") FROM \"team_roster_season_2013_2014\" WHERE \"birth_date\"='april 12, 1986 (age27)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2013_2014\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What position that has a Height larger than 179, and Player is Ezgi Arslan?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"team_roster_season_2013_2014\" WHERE \"height\">179 AND \"player\"='ezgi arslan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2013_2014\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the shirt no with a position of setter, a nationality of Italy, and height larger than 172?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"shirt_no\") FROM \"team_roster_season_2013_2014\" WHERE \"position\"='setter' AND \"nationality\"='italy' AND \"height\">172;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2013_2014\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What player that has a position of middle blocker, a Nationality of Turkey, and shirt no is 8?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"team_roster_season_2013_2014\" WHERE \"position\"='middle blocker' AND \"nationality\"='turkey' AND \"shirt_no\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2013_2014\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What player that has a Nationality of Turkey, a Height smaller than 183, a shirt no smaller than 19, and a birth date of June 27, 1993 (age20)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"team_roster_season_2013_2014\" WHERE \"nationality\"='turkey' AND \"height\"<183 AND \"shirt_no\"<19 AND \"birth_date\"='june 27, 1993 (age20)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canoe\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which nation won 29 gold medals?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"canoe\" WHERE \"gold\"=29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canoe\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest number of bronze medals won among the nations ranked 12 that won no gold medals and 1 medal overall?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"canoe\" WHERE \"total\"=1 AND \"rank\"='12' AND \"gold\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the FCC info for the translator with frequency over 89.3MHz and licensd in Portales, New Mexico?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\">89.3 AND \"city_of_license\"='portales, new mexico';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: Which ship was launched from Devonport, Devon?"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"see_also\" WHERE \"location\"='devonport, devon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What country was the Pegasus, build by Royal Dockyard, from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"see_also\" WHERE \"builder\"='royal dockyard' AND \"ship\"='pegasus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: Who was the builder of Gannet from the United Kingdom?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"country\"='united kingdom' AND \"ship\"='gannet';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: Who was the builder of Nor?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"ship\"='nor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: Who was the builder of Brage from Norway?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"see_also\" WHERE \"country\"='norway' AND \"ship\"='brage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"country\" text,\n \"builder\" text,\n \"location\" text,\n \"ship\" text,\n \"class_type\" text\n);\n\nQuestion: What country was Brage, built by karljohansverns verft, from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"see_also\" WHERE \"builder\"='karljohansverns verft' AND \"ship\"='brage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver has a Total of 11, and a Gold smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"total\"=11 AND \"gold\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver has a Total of 1, and a Rank of 12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"total\"=1 AND \"rank\"='12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Football Class has a School of wood memorial?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='wood memorial';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Football Class has a County of 77 sullivan, and a School of union dugger?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='77 sullivan' AND \"school\"='union dugger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Football Class has an Enrollment of 406?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"=406;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which Size has a County of 62 perry?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"size\") FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='62 perry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Class has a Size larger than 511?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"size\">511;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Class has a School of mitchell?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='mitchell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which County has a Size larger than 258, and a Mascot of commodores?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"size\">258 AND \"mascot\"='commodores';"
}
]
|
[
{
"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 her place in the lineup on match 2?"
},
{
"role": "assistant",
"content": "SELECT \"lineup\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"match\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game played on 2/17/1974?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='2/17/1974';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"home_attendance\" (\n \"date\" text,\n \"round\" text,\n \"attendance\" real,\n \"opposition\" text,\n \"stadium\" text\n);\n\nQuestion: Which stadium had the opposition of 79,122?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"home_attendance\" WHERE \"opposition\"='79,122';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes of the number 1 rank?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"semifinal_a_b_2\" WHERE \"rank\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What's the rank if the time was 5:54.57 and FB in notes?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"semifinal_a_b_2\" WHERE \"notes\"='fb' AND \"time\"='5:54.57';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who are the rowers with the time of 5:54.57?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"semifinal_a_b_2\" WHERE \"time\"='5:54.57';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes of the United States?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"semifinal_a_b_2\" WHERE \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the gold for a bronze larger than 1, with a total smaller than 10, and a silver of 3?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medals_table\" WHERE \"bronze\">1 AND \"total\"<10 AND \"silver\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average total when the silver is larger than 2, and a gold larger than 1, and a nation of total?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medals_table\" WHERE \"silver\">2 AND \"gold\">1 AND \"nation\"='total';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When the rank is 11, and bronze a smaller than 1 what is the lowest total?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medals_table\" WHERE \"rank\"='11' AND \"bronze\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What was the A Score when the B Score was 9.05, and position was larger than 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"a_score\") FROM \"qualified_competitors\" WHERE \"b_score\"=9.05 AND \"position\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total when the B Score was 9.15 for Cheng Fei ( chn )?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"qualified_competitors\" WHERE \"b_score\"=9.15 AND \"gymnast\"='cheng fei ( chn )';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What was their position when the score of B was less than 9.05, a total was 15.275, and A Score larger than 6.4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"qualified_competitors\" WHERE \"b_score\"<9.05 AND \"total\"=15.275 AND \"a_score\">6.4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is their position when the b score is more than 8.975 for Ekaterina Kramarenko ( rus )?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"qualified_competitors\" WHERE \"b_score\">8.975 AND \"gymnast\"='ekaterina kramarenko ( rus )';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What year had Third-Person Shooter?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"joystiq\" WHERE \"genre\"='third-person shooter';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What year was Portal?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"joystiq\" WHERE \"game\"='portal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who was the developer(s) of the genre Adventure?"
},
{
"role": "assistant",
"content": "SELECT \"developer_s\" FROM \"joystiq\" WHERE \"genre\"='adventure';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What's the platform of the genre RPG?"
},
{
"role": "assistant",
"content": "SELECT \"platform_s\" FROM \"joystiq\" WHERE \"genre\"='rpg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What's the genre of developer(s) Lionhead Studios?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"joystiq\" WHERE \"developer_s\"='lionhead studios';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"joystiq\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What's year was the genre Adventure?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"joystiq\" WHERE \"genre\"='adventure';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"cardinalatial_order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: When was Cardinal-Deacon of S. Giorgio in Velabro elevated?"
},
{
"role": "assistant",
"content": "SELECT \"elevated\" FROM \"cardinal_electors\" WHERE \"cardinalatial_order_and_title\"='cardinal-deacon of s. giorgio in velabro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"cardinalatial_order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Cardinalatial order and title that Pedro Mart\u00ednez de Luna y Gotor elevated?"
},
{
"role": "assistant",
"content": "SELECT \"cardinalatial_order_and_title\" FROM \"cardinal_electors\" WHERE \"elector\"='pedro mart\u00ednez de luna y gotor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"cardinalatial_order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the nationality of the elector withe the Cardinalatial order and title of Cardinal-Priest of Ss. XII Apostoli?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"cardinal_electors\" WHERE \"cardinalatial_order_and_title\"='cardinal-priest of ss. xii apostoli';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What Tournament had Jack Nicklaus as Runner(s)-up?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pga_tour_wins_7\" WHERE \"runner_s_up\"='jack nicklaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Date of the Tournament with a Winning score of \u22129 (65-71-68-67=271)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_7\" WHERE \"winning_score\"='\u22129 (65-71-68-67=271)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Winning Score of the Tournament with Jack Nicklaus as Runner(s)-up?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_7\" WHERE \"runner_s_up\"='jack nicklaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Runner(s)-up of the Kemper Open Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_7\" WHERE \"tournament\"='kemper open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text\n);\n\nQuestion: What week has December 19, 2004 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='december 19, 2004';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text\n);\n\nQuestion: What is the highest week that has espn 8:30pm as the TV time?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"tv_time\"='espn 8:30pm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"tv_time\" text\n);\n\nQuestion: What result has miami dolphins as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='miami dolphins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the Time of the swimmer from Chinese Taipei in Heat 3?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"heats\" WHERE \"heat\"=3 AND \"lane\">3 AND \"nationality\"='chinese taipei';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"dolphins_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What's the Dolphin Points when the attendance was less than 69,313 and had an opponent of the Buffalo Bills?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"dolphins_points\") FROM \"schedule\" WHERE \"opponent\"='buffalo bills' AND \"attendance\"<'69,313';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"dolphins_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What's the game with an attendance of 71,962?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule\" WHERE \"attendance\"='71,962';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations_table\" (\n \"week_1\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_6\" text,\n \"week_7\" text,\n \"week_8\" text,\n \"week_9\" text,\n \"week_10\" text,\n \"final_week_12\" text\n);\n\nQuestion: What was the week 12 standing for the housemate that nominated Deepak P Rahul in week 1 and Amit Carol in week 3?"
},
{
"role": "assistant",
"content": "SELECT \"final_week_12\" FROM \"nominations_table\" WHERE \"week_1\"='deepak p rahul' AND \"week_3\"='amit carol';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.