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 \"1990s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: What Time elapsed has 14 February 2011 as the Closest approach?"
},
{
"role": "assistant",
"content": "SELECT \"time_elapsed\" FROM \"1990s\" WHERE \"closest_approach\"='14 february 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: What Launched has Time elapsed of 1991 days (5 yr, 5 mo, 12 d)?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"1990s\" WHERE \"time_elapsed\"='1991 days (5 yr, 5 mo, 12 d)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: With a Launched of 3 July 1998 what is the Closest approach?"
},
{
"role": "assistant",
"content": "SELECT \"closest_approach\" FROM \"1990s\" WHERE \"launched\"='3 july 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: What Launched has both a Spacecraft of Ulysses and 491 days (1 yr, 4 mo, 3 d) as Time elapsed?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"1990s\" WHERE \"spacecraft\"='ulysses' AND \"time_elapsed\"='491 days (1 yr, 4 mo, 3 d)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: What percentage is Karen Handel at in the poll in which Eric Johnson is 13% and undecided is 22%?"
},
{
"role": "assistant",
"content": "SELECT \"karen_handel\" FROM \"republican_primary\" WHERE \"eric_johnson\"='13%' AND \"undecided\"='22%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: In what poll is Nathan Deal at 13% and John Oxendine at 28%?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"republican_primary\" WHERE \"nathan_deal\"='13%' AND \"john_oxendine\"='28%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: What is Eric Johnson at in the poll where Karen Handel is at 12%?"
},
{
"role": "assistant",
"content": "SELECT \"eric_johnson\" FROM \"republican_primary\" WHERE \"karen_handel\"='12%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: In what poll is John Oxendine at 32%?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"republican_primary\" WHERE \"john_oxendine\"='32%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: What is John Oxendine at in the poll where Karen Handel is at 38%?"
},
{
"role": "assistant",
"content": "SELECT \"john_oxendine\" FROM \"republican_primary\" WHERE \"karen_handel\"='38%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"republican_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"john_oxendine\" text,\n \"karen_handel\" text,\n \"nathan_deal\" text,\n \"eric_johnson\" text,\n \"ray_mc_berry\" text,\n \"undecided\" text\n);\n\nQuestion: What is Karen Handel polling at in the Insideradvantage poll where John Oxendine is at 15%?"
},
{
"role": "assistant",
"content": "SELECT \"karen_handel\" FROM \"republican_primary\" WHERE \"poll_source\"='insideradvantage' AND \"john_oxendine\"='15%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: What was the 1991 score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"year\"='1991';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: Where was the 1966 competition with a winner of Gary Cowan held?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"winner\"='gary cowan' AND \"year\"='1966';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"country\" text,\n \"score\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the runner-up of the competition played at Minikahda Club?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"venue\"='minikahda club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_chamber_lobbying_2002_2012\" (\n \"year\" real,\n \"us_cham_rank\" real,\n \"us_cham_spending\" text,\n \"next_highest_spender\" text,\n \"next_highest_amount\" text\n);\n\nQuestion: Which Year is the highest one that has a Next Highest Spender of aarp, and a US Cham Spending of $39,805,000, and a US Cham Rank larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"us_chamber_lobbying_2002_2012\" WHERE \"next_highest_spender\"='aarp' AND \"us_cham_spending\"='$39,805,000' AND \"us_cham_rank\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_chamber_lobbying_2002_2012\" (\n \"year\" real,\n \"us_cham_rank\" real,\n \"us_cham_spending\" text,\n \"next_highest_spender\" text,\n \"next_highest_amount\" text\n);\n\nQuestion: Which US Cham Rank is the lowest one that has a Next Highest Spender of national assn of realtors, and a Year smaller than 2012?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"us_cham_rank\") FROM \"us_chamber_lobbying_2002_2012\" WHERE \"next_highest_spender\"='national assn of realtors' AND \"year\"<2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_chamber_lobbying_2002_2012\" (\n \"year\" real,\n \"us_cham_rank\" real,\n \"us_cham_spending\" text,\n \"next_highest_spender\" text,\n \"next_highest_amount\" text\n);\n\nQuestion: Which Year is the lowest one that has a US Cham Rank smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"us_chamber_lobbying_2002_2012\" WHERE \"us_cham_rank\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_111\" (\n \"date\" text,\n \"tournament_name\" text,\n \"location\" text,\n \"partner\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the Score in Final of the Eckerd Open Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"women_s_doubles_111\" WHERE \"tournament_name\"='eckerd open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_111\" (\n \"date\" text,\n \"tournament_name\" text,\n \"location\" text,\n \"partner\" text,\n \"score_in_final\" text\n);\n\nQuestion: Who was the Partner in the United Airlines Tournament (1)?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"women_s_doubles_111\" WHERE \"tournament_name\"='united airlines tournament (1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_111\" (\n \"date\" text,\n \"tournament_name\" text,\n \"location\" text,\n \"partner\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the Score in Final on February 19, 1989?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"women_s_doubles_111\" WHERE \"date\"='february 19, 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"festivali_i_k_ng_s_46\" (\n \"draw\" real,\n \"singer\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What are the Points when the Place is 9?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"festivali_i_k_ng_s_46\" WHERE \"place\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"festivali_i_k_ng_s_46\" (\n \"draw\" real,\n \"singer\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the total for the place when the singer is Mariza Ikonomi when points are larger than 20?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"place\") FROM \"festivali_i_k_ng_s_46\" WHERE \"singer\"='mariza ikonomi' AND \"points\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"season\" text,\n \"total_td_s\" real,\n \"total_tc_s\" real,\n \"total_stc_s\" real,\n \"strongest_storm\" text,\n \"deaths\" text\n);\n\nQuestion: What is the average total TCs of the season where the strongest storm was Zoe and the season was totals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_tc_s\") FROM \"2000s\" WHERE \"strongest_storm\"='zoe' AND \"season\"='totals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: With a Suited Match of 13:1, what is the Double Non-Suited Match?"
},
{
"role": "assistant",
"content": "SELECT \"double_non_suited_match\" FROM \"match_the_dealer\" WHERE \"suited_match\"='13:1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: What's the Suited Match with a 2.99% House Edge?"
},
{
"role": "assistant",
"content": "SELECT \"suited_match\" FROM \"match_the_dealer\" WHERE \"house_edge\"='2.99%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: With a house edge of 3.53% and a Non-Suited Matched of 3:1, name the Double Non-Suited Match."
},
{
"role": "assistant",
"content": "SELECT \"double_non_suited_match\" FROM \"match_the_dealer\" WHERE \"non_suited_match\"='3:1' AND \"house_edge\"='3.53%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: Name the Non-Suited Match that has greater than 6 Number of Decks."
},
{
"role": "assistant",
"content": "SELECT \"non_suited_match\" FROM \"match_the_dealer\" WHERE \"number_of_decks\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: Name the Suited & Non-Suited Match with a 2.99% for House Edge."
},
{
"role": "assistant",
"content": "SELECT \"suited_non_suited_match\" FROM \"match_the_dealer\" WHERE \"house_edge\"='2.99%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_the_dealer\" (\n \"number_of_decks\" real,\n \"non_suited_match\" text,\n \"double_non_suited_match\" text,\n \"suited_match\" text,\n \"suited_non_suited_match\" text,\n \"double_suited_match\" text,\n \"house_edge\" text\n);\n\nQuestion: With a House Edge of 3.63% and a Non-Suited Match of 4:1, what is the Double Non-Suited Match?"
},
{
"role": "assistant",
"content": "SELECT \"double_non_suited_match\" FROM \"match_the_dealer\" WHERE \"non_suited_match\"='4:1' AND \"house_edge\"='3.63%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: Wins smaller than 0 had what sum of year?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: Class of 125cc, and a Year smaller than 1966 had what lowest wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='125cc' AND \"year\"<1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: Class of 500cc, and a Wins smaller than 0 had what average year?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='500cc' AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What are the highest laps Kazuki Nakajima did with a Grid larger than 19?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"driver\"='kazuki nakajima' AND \"grid\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Constructor has a Grid of 17?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drives a BMW Sauber with a Grid larger than 2 and a Time/Retired of +15.037?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">2 AND \"constructor\"='bmw sauber' AND \"time_retired\"='+15.037';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_film_projects\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"length\" text,\n \"participation_as\" text\n);\n\nQuestion: Participation as of actor, film editor has what average year?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"other_film_projects\" WHERE \"participation_as\"='actor, film editor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_history\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"purse_hi\" text,\n \"finish\" text,\n \"time\" text,\n \"last_1_4\" real,\n \"odds\" text,\n \"driver\" text\n);\n\nQuestion: What were the odds for the finish of 1/4h?"
},
{
"role": "assistant",
"content": "SELECT \"odds\" FROM \"race_history\" WHERE \"finish\"='1/4h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_history\" (\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"purse_hi\" text,\n \"finish\" text,\n \"time\" text,\n \"last_1_4\" real,\n \"odds\" text,\n \"driver\" text\n);\n\nQuestion: What is the lowest last quarter with a time of 1:53.2 and odds of *1.30?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"last_1_4\") FROM \"race_history\" WHERE \"time\"='1:53.2' AND \"odds\"='*1.30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of Gold when the total is 11 with more than 2 silver?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\"=11 AND \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total rank with more than 0 silver and less than 2 medals total?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"medal_table\" WHERE \"total\"<2 AND \"silver\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the value of bronze with less than 2 in total?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"total\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What number of rank has more than 2 medals in total with less than 4 bronze?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"medal_table\" WHERE \"total\">2 AND \"bronze\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"approved_and_proposed\" (\n \"rank\" real,\n \"building\" text,\n \"city\" text,\n \"height_m_ft\" text,\n \"floors\" real,\n \"status\" text\n);\n\nQuestion: what is a building that is proposed and will have 32 floors?"
},
{
"role": "assistant",
"content": "SELECT \"building\" FROM \"approved_and_proposed\" WHERE \"status\"='proposed' AND \"floors\"=32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" real\n);\n\nQuestion: What is the best time for marcus marshall?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"best\") FROM \"qualifying_results\" WHERE \"name\"='marcus marshall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" real\n);\n\nQuestion: What is the best time for a rusport driver with a qual 2 time of 1:10.166?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"best\") FROM \"qualifying_results\" WHERE \"team\"='rusport' AND \"qual_2\"='1:10.166';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" real\n);\n\nQuestion: What team had a qual 2 time of 58.385?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_2\"='58.385';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_20th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the total for University of Dublin, having a panel of 0 for agricultural, was nominated by Taoiseach more than 0, and an industrial and commercial panel less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"university_of_dublin\") FROM \"composition_of_the_20th_seanad\" WHERE \"agricultural_panel\"=0 AND \"nominated_by_the_taoiseach\">0 AND \"industrial_and_commercial_panel\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_20th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the average for the agricultural panel that has a National University of Ireland less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"agricultural_panel\") FROM \"composition_of_the_20th_seanad\" WHERE \"national_university_of_ireland\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_20th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number for the University of Dublin, having and administrative panel of 3, and a Cultural and Educational panel less than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"university_of_dublin\") FROM \"composition_of_the_20th_seanad\" WHERE \"administrative_panel\"=3 AND \"cultural_and_educational_panel\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the record at Memorial Stadium on September 19, 1965?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"game_site\"='memorial stadium' AND \"date\"='september 19, 1965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the largest attendance at Memorial Stadium on December 12, 1965?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"game_site\"='memorial stadium' AND \"date\"='december 12, 1965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_leaders\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Extra points is the highest one that has a Player of herman everhardus, and a Field goals larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"extra_points\") FROM \"scoring_leaders\" WHERE \"player\"='herman everhardus' AND \"field_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_leaders\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Extra points has Points smaller than 12, and a Player of chuck bernard, and Touchdowns larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"extra_points\") FROM \"scoring_leaders\" WHERE \"points\"<12 AND \"player\"='chuck bernard' AND \"touchdowns\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_leaders\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many Field goals have Touchdowns smaller than 3, and a Player of willis ward, and an Extra points smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"field_goals\") FROM \"scoring_leaders\" WHERE \"touchdowns\"<3 AND \"player\"='willis ward' AND \"extra_points\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scoring_leaders\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Whicih Extra points are the average ones that have Points smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"extra_points\") FROM \"scoring_leaders\" WHERE \"points\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which position is round 7?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which college has a position of goaltender?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"position\"='goaltender';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Darryl Fedorak's highest round?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"player\"='darryl fedorak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What nationality has a higher round than 8?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"name\" text,\n \"born_died\" text,\n \"notable_for\" text,\n \"connection_with_australia\" text,\n \"connection_with_america\" text\n);\n\nQuestion: What is the connection with Australia when the connection with America shows born in the u.s.; mother is u.s. citizen?"
},
{
"role": "assistant",
"content": "SELECT \"connection_with_australia\" FROM \"music\" WHERE \"connection_with_america\"='born in the u.s.; mother is u.s. citizen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"name\" text,\n \"born_died\" text,\n \"notable_for\" text,\n \"connection_with_australia\" text,\n \"connection_with_america\" text\n);\n\nQuestion: What is the person born in Australia, rick springfield notable for?"
},
{
"role": "assistant",
"content": "SELECT \"notable_for\" FROM \"music\" WHERE \"connection_with_australia\"='born in australia' AND \"name\"='rick springfield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"name\" text,\n \"born_died\" text,\n \"notable_for\" text,\n \"connection_with_australia\" text,\n \"connection_with_america\" text\n);\n\nQuestion: What is the Born\u2013Died for the person whose family moved to Australia at age 6?"
},
{
"role": "assistant",
"content": "SELECT \"born_died\" FROM \"music\" WHERE \"connection_with_australia\"='family moved to australia at age 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" real,\n \"name\" text,\n \"developer\" text,\n \"clock\" text,\n \"process\" text,\n \"cores_per_die_dies_per_module\" text\n);\n\nQuestion: What is the latest date with Cores per die / Dies per module of 2 / 1, and a Clock of 1.4-1.6ghz?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"date\") FROM \"2000s\" WHERE \"cores_per_die_dies_per_module\"='2 / 1' AND \"clock\"='1.4-1.6ghz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" real,\n \"name\" text,\n \"developer\" text,\n \"clock\" text,\n \"process\" text,\n \"cores_per_die_dies_per_module\" text\n);\n\nQuestion: Which process has a date later than 2000 and a Clock of 1.4-1.6ghz?"
},
{
"role": "assistant",
"content": "SELECT \"process\" FROM \"2000s\" WHERE \"date\">2000 AND \"clock\"='1.4-1.6ghz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"date\" real,\n \"name\" text,\n \"developer\" text,\n \"clock\" text,\n \"process\" text,\n \"cores_per_die_dies_per_module\" text\n);\n\nQuestion: Which date has a Clock of 0.8-1.6ghz?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2000s\" WHERE \"clock\"='0.8-1.6ghz';"
}
] |
[
{
"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 record on May 21?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 21';"
}
] |
[
{
"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: On what date was the attendance 24,976?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='24,976';"
}
] |
[
{
"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: On what date was the record 21-26?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='21-26';"
}
] |
[
{
"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: How many were in attendance with a loss of Prokopec (2-7)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='prokopec (2-7)';"
}
] |
[
{
"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: Who was the opponent on May 20?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='may 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the tournament on Apr 6?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"tournament_results\" WHERE \"date\"='apr 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the 1st prize of the tournament in Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"1st_prize\" FROM \"tournament_results\" WHERE \"location\"='scotland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the location of the Sea Pines Heritage Classic tournament?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"tournament\"='sea pines heritage classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the score of the Tournament Players Championship?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"tournament_results\" WHERE \"tournament\"='tournament players championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the 1st prize at the U.S. Open?"
},
{
"role": "assistant",
"content": "SELECT \"1st_prize\" FROM \"tournament_results\" WHERE \"tournament\"='u.s. open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the average first prize of the tournament with a score of 279 (\u20139)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"1st_prize\") FROM \"tournament_results\" WHERE \"score\"='279 (\u20139)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the lowest first prize of the Mercedes Championships tournament in California?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1st_prize\") FROM \"tournament_results\" WHERE \"location\"='california' AND \"tournament\"='mercedes championships';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1999\" text\n);\n\nQuestion: What is the average capacity for the venue where the team kommunalnik played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"teams_and_venues\" WHERE \"team\"='kommunalnik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1999\" text\n);\n\nQuestion: What is the position of the team that played at the venue, Central, Gomel?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1999\" FROM \"teams_and_venues\" WHERE \"venue\"='central, gomel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1999\" text\n);\n\nQuestion: What is the position of the team that played at the venue with more than 6,500 capacity?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1999\" FROM \"teams_and_venues\" WHERE \"capacity\">'6,500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points_for_the_2007_08_season\" (\n \"name\" text,\n \"pld\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real,\n \"pims\" real\n);\n\nQuestion: What is the smallest number of assists with 70 Pims and less than 19 goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"assists\") FROM \"points_for_the_2007_08_season\" WHERE \"pims\"=70 AND \"goals\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points_for_the_2007_08_season\" (\n \"name\" text,\n \"pld\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real,\n \"pims\" real\n);\n\nQuestion: What is the smallest number of assists for Ben Duggan with less than 7 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"assists\") FROM \"points_for_the_2007_08_season\" WHERE \"name\"='ben duggan' AND \"points\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_1\" (\n \"year\" text,\n \"national_champion\" text,\n \"runner_up\" text,\n \"location\" text,\n \"host\" text\n);\n\nQuestion: In what Year was Rhode Island the National Champion?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"division_1\" WHERE \"national_champion\"='rhode island';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_1\" (\n \"year\" text,\n \"national_champion\" text,\n \"runner_up\" text,\n \"location\" text,\n \"host\" text\n);\n\nQuestion: What was the Runner-up in the Monroe County Sports Commission?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"division_1\" WHERE \"host\"='monroe county sports commission';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_1\" (\n \"year\" text,\n \"national_champion\" text,\n \"runner_up\" text,\n \"location\" text,\n \"host\" text\n);\n\nQuestion: At what Location was the Runner-up TBD?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"division_1\" WHERE \"runner_up\"='tbd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_1\" (\n \"year\" text,\n \"national_champion\" text,\n \"runner_up\" text,\n \"location\" text,\n \"host\" text\n);\n\nQuestion: At what Location did Robert Morris University (Illinois) Host the Lindenwood National Chamption?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"division_1\" WHERE \"host\"='robert morris university (illinois)' AND \"national_champion\"='lindenwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_1\" (\n \"year\" text,\n \"national_champion\" text,\n \"runner_up\" text,\n \"location\" text,\n \"host\" text\n);\n\nQuestion: What was the Runner-up with Ohio as the National Champion in Tucson, AZ?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"division_1\" WHERE \"national_champion\"='ohio' AND \"location\"='tucson, az';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_table\" (\n \"model\" text,\n \"processor\" text,\n \"memory\" text,\n \"storage\" text,\n \"graphics\" text,\n \"vram\" text,\n \"display_resolution\" text,\n \"msrp\" text\n);\n\nQuestion: Which graphics spec has a VRAM spec of 512MB?"
},
{
"role": "assistant",
"content": "SELECT \"graphics\" FROM \"comparison_table\" WHERE \"vram\"='512mb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_table\" (\n \"model\" text,\n \"processor\" text,\n \"memory\" text,\n \"storage\" text,\n \"graphics\" text,\n \"vram\" text,\n \"display_resolution\" text,\n \"msrp\" text\n);\n\nQuestion: What is the MSRP for the laptop with storage of 128-512 GB SSD?"
},
{
"role": "assistant",
"content": "SELECT \"msrp\" FROM \"comparison_table\" WHERE \"storage\"='128-512 gb ssd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Name the opponent for game 5"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"game\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What status is shown for Cadeby?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"name\"='cadeby';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the Former local authority for Ecclesfield?"
},
{
"role": "assistant",
"content": "SELECT \"former_local_authority\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"name\"='ecclesfield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the Status of Mexborough?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"name\"='mexborough';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the Status for the District of doncaster, and a Former local authority of doncaster rural district, with a Population of 203?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"district\"='doncaster' AND \"former_local_authority\"='doncaster rural district' AND \"population\"=203;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score on December 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"date\"='december 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which skip has Oliver Dupont as a second?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"second\"='oliver dupont';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which second's third is Jean-Michel Arsenault?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"third\"='jean-michel arsenault';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which skip's third is Steffen Walstad?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"third\"='steffen walstad';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which skip's second is Martin Hejhal?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"second\"='martin hejhal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which skip's lead is Gordon McDougall?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"lead\"='gordon mcdougall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which second's skip is Chris Plys?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"skip\"='chris plys';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.