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 \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many Games have a Drawn larger than 0, and a Lost of 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"games\") FROM \"first_round\" WHERE \"drawn\">0 AND \"lost\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Drawn larger than 0, and a Lost larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"first_round\" WHERE \"drawn\">0 AND \"lost\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Drawn has a Lost larger than 0, and Points smaller than 11, and Games smaller than 7?" }, { "role": "assistant", "content": "SELECT AVG(\"drawn\") FROM \"first_round\" WHERE \"lost\">0 AND \"points\"<11 AND \"games\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electoral_effect\" (\n \"party\" text,\n \"votes_cast\" real,\n \"percentage\" real,\n \"seats_won\" real,\n \"percent_of_seats\" real\n);\n\nQuestion: What is the percentage of the liberal party with less than 25 percent of seats?" }, { "role": "assistant", "content": "SELECT COUNT(\"percentage\") FROM \"electoral_effect\" WHERE \"party\"='liberal' AND \"percent_of_seats\"<25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"electoral_effect\" (\n \"party\" text,\n \"votes_cast\" real,\n \"percentage\" real,\n \"seats_won\" real,\n \"percent_of_seats\" real\n);\n\nQuestion: Which party won less than 21 seats, has 0 percent of seats, and 69757 votes cast?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"electoral_effect\" WHERE \"seats_won\"<21 AND \"percent_of_seats\"=0 AND \"votes_cast\"=69757;" } ]
[ { "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: Can you tell me the Date that has the Game of 2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"playoffs\" WHERE \"game\"=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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When the date is July 8, and the score is 8-12, who is the opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='july 8' AND \"score\"='8-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When the Loss is Johnson (4-12), what is the date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='johnson (4-12)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What date is associated with the Loss of Farrell (6-13)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='farrell (6-13)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponent has the score of 0-3?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='0-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 Total of kyrgyzstan with a Silver smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medals_table\" WHERE \"nation\"='kyrgyzstan' AND \"silver\"<0;" } ]
[ { "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 Total that has a number of Nation and a Gold smaller than 16?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medals_table\" WHERE \"nation\"='total' AND \"gold\"<16;" } ]
[ { "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 Rank has a Silver larger than 1 and a Total larger than 13?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"silver\">1 AND \"total\">13;" } ]
[ { "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: How many Silvers that have a Rank of 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medals_table\" WHERE \"rank\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"member_schools\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"2013_2014_size\" real,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What was the previous conference for the school that joined in 2000 with a millers mascot?" }, { "role": "assistant", "content": "SELECT \"previous_conference\" FROM \"member_schools\" WHERE \"year_joined\"=2000 AND \"mascot\"='millers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the name of the college that is from a round greater than 3 with Gillis Wilson playing?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"round\">3 AND \"player\"='gillis wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is average round of Auburn College?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"college\"='auburn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: Which Top 10 is the lowest one that has Winnings of $405,300, and an Avg Start smaller than 30?" }, { "role": "assistant", "content": "SELECT MIN(\"top_10\") FROM \"nascar_sprint_cup_series\" WHERE \"winnings\"='$405,300' AND \"avg_start\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: How many Wins have a Top 5 smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"top_5\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: Which Top 10 has a Top 5 larger than 1, and a Year of 2003, and Poles larger than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"top_10\") FROM \"nascar_sprint_cup_series\" WHERE \"top_5\">1 AND \"year\"=2003 AND \"poles\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: How many Top 10s have Wins larger than 0, and Poles larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_10\") FROM \"nascar_sprint_cup_series\" WHERE \"wins\">0 AND \"poles\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"amateur_and_junior_clubs\" (\n \"club\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What is the Established date of the Ontario Provincial Junior A Hockey League with more than 1 Championship?" }, { "role": "assistant", "content": "SELECT COUNT(\"established\") FROM \"amateur_and_junior_clubs\" WHERE \"league\"='ontario provincial junior a hockey' AND \"championships\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"amateur_and_junior_clubs\" (\n \"club\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What Venue has more than 1 Championship and was Established after 1957?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"amateur_and_junior_clubs\" WHERE \"championships\"=1 AND \"established\">1957;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"amateur_and_junior_clubs\" (\n \"club\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: With less than 1 Championship, what es the Established date of the Niagara Rugby Union League?" }, { "role": "assistant", "content": "SELECT SUM(\"established\") FROM \"amateur_and_junior_clubs\" WHERE \"championships\"<1 AND \"league\"='niagara rugby union';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"amateur_and_junior_clubs\" (\n \"club\" text,\n \"league\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" real\n);\n\nQuestion: What is the Established date of the Brian Timmis Stadium?" }, { "role": "assistant", "content": "SELECT COUNT(\"established\") FROM \"amateur_and_junior_clubs\" WHERE \"venue\"='brian timmis stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: What is the junior type with an intake of 60 and a DCSF number less than 3386 with the smallest Ofsted number?" }, { "role": "assistant", "content": "SELECT MIN(\"ofsted_number\") FROM \"west\" WHERE \"intake\"=60 AND \"type\"='junior' AND \"dcsf_number\"<3386;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has a Game smaller than 19, and Points smaller than 19, and a Score of 4\u20136?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"game\"<19 AND \"points\"<19 AND \"score\"='4\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many games have a Record of 7\u20136\u20133, and Points smaller than 17?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"record\"='7\u20136\u20133' AND \"points\"<17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have an Opponent of vancouver canucks, and a November smaller than 11?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"opponent\"='vancouver canucks' AND \"november\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: which Record is on March of 12" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"march\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the number of March that has 25-10-9 record and a Game more than 44?" }, { "role": "assistant", "content": "SELECT COUNT(\"march\") FROM \"schedule_and_results\" WHERE \"record\"='25-10-9' AND \"game\">44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which Game has a Record of 27-11-10?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"schedule_and_results\" WHERE \"record\"='27-11-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bulgaria\" (\n \"line\" text,\n \"speed\" text,\n \"length\" text,\n \"construction_begun\" text,\n \"expected_start_of_revenue_services\" real\n);\n\nQuestion: What is the Speed when Construction begun in 2010, and an Expected start of revenue services of 2015?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"bulgaria\" WHERE \"construction_begun\"='2010' AND \"expected_start_of_revenue_services\"=2015;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bulgaria\" (\n \"line\" text,\n \"speed\" text,\n \"length\" text,\n \"construction_begun\" text,\n \"expected_start_of_revenue_services\" real\n);\n\nQuestion: What is the length when the expected start of revenue is more than 2017?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"bulgaria\" WHERE \"expected_start_of_revenue_services\">2017;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"roy_barnes\" text,\n \"thurbert_baker\" text,\n \"du_bose_porter\" text,\n \"david_poythress\" text,\n \"undecided\" text\n);\n\nQuestion: What was the undecided with Roy Barnes at 47%?" }, { "role": "assistant", "content": "SELECT \"undecided\" FROM \"democratic_primary\" WHERE \"roy_barnes\"='47%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"roy_barnes\" text,\n \"thurbert_baker\" text,\n \"du_bose_porter\" text,\n \"david_poythress\" text,\n \"undecided\" text\n);\n\nQuestion: What is the DuBose Porter with Roy Barnes at 54%?" }, { "role": "assistant", "content": "SELECT \"du_bose_porter\" FROM \"democratic_primary\" WHERE \"roy_barnes\"='54%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_12_2008_2009\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What series episode has deli meats under segment B?" }, { "role": "assistant", "content": "SELECT \"series_ep\" FROM \"season_12_2008_2009\" WHERE \"segment_b\"='deli meats';" } ]
[ { "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 \"min_capacity_m_ah\" text,\n \"typ_capacity_m_ah\" text,\n \"capacity_after_first_day\" text,\n \"after_1_year\" text,\n \"after_2_years\" text,\n \"after_3_years\" text,\n \"after_5_years\" text\n);\n\nQuestion: Which After 1 year has an After 3 years of 80%?" }, { "role": "assistant", "content": "SELECT \"after_1_year\" FROM \"comparison_table\" WHERE \"after_3_years\"='80%';" } ]
[ { "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 position does Alexei Lazarenko have?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='alexei lazarenko';" } ]
[ { "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 college did Jamie Butt go to?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"player\"='jamie butt';" } ]
[ { "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 school did Alexander Korobolin go to?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"player\"='alexander korobolin';" } ]
[ { "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: Who has a round less than 9 and a position of G?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"position\"='g' AND \"round\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Name the sum of cuts with wins less than 2, top-25 more than 7 and top-10 less than 2" }, { "role": "assistant", "content": "SELECT SUM(\"cuts_made\") FROM \"summary\" WHERE \"wins\"<2 AND \"top_25\">7 AND \"top_10\"<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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the score that led to an 11-16 record?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='11-16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: Who took the loss on May 20?" }, { "role": "assistant", "content": "SELECT \"loss\" 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 \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance of the game that lasted 3:55?" }, { "role": "assistant", "content": "SELECT \"att\" FROM \"game_log\" WHERE \"time\"='3:55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game in which Holt (4-4) took the loss?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='holt (4-4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"barry_bonds_73_home_runs\" (\n \"number\" text,\n \"date\" text,\n \"pitcher\" text,\n \"team\" text,\n \"inning\" text,\n \"length\" text\n);\n\nQuestion: What was the date when the pitcher was Jason Marquis and the length was 410'?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"barry_bonds_73_home_runs\" WHERE \"pitcher\"='jason marquis' AND \"length\"='410''';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"barry_bonds_73_home_runs\" (\n \"number\" text,\n \"date\" text,\n \"pitcher\" text,\n \"team\" text,\n \"inning\" text,\n \"length\" text\n);\n\nQuestion: What number home run was in the 8th inning and went 410'?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"barry_bonds_73_home_runs\" WHERE \"inning\"='8th' AND \"length\"='410''';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_north_atlantic_tropical_cyclone_sta\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: Which Max 1-min wind mph (km/h) that has Dates active on september22\u2013 september28?" }, { "role": "assistant", "content": "SELECT \"max_1_min_wind_mph_km_h\" FROM \"1940_north_atlantic_tropical_cyclone_sta\" WHERE \"dates_active\"='september22\u2013 september28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_north_atlantic_tropical_cyclone_sta\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: Which Min press has none Death and seven Storm names?" }, { "role": "assistant", "content": "SELECT \"min_press_mbar\" FROM \"1940_north_atlantic_tropical_cyclone_sta\" WHERE \"deaths\"='none' AND \"storm_name\"='seven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_north_atlantic_tropical_cyclone_sta\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: What is the cost of 972 Min Press caused 52 death?" }, { "role": "assistant", "content": "SELECT \"damage_millions_usd\" FROM \"1940_north_atlantic_tropical_cyclone_sta\" WHERE \"min_press_mbar\"='972' AND \"deaths\"='52';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1940_north_atlantic_tropical_cyclone_sta\" (\n \"storm_name\" text,\n \"dates_active\" text,\n \"max_1_min_wind_mph_km_h\" text,\n \"min_press_mbar\" text,\n \"damage_millions_usd\" text,\n \"deaths\" text\n);\n\nQuestion: What is the active Date that has a 65 (100) Max 1-min wind?" }, { "role": "assistant", "content": "SELECT \"dates_active\" FROM \"1940_north_atlantic_tropical_cyclone_sta\" WHERE \"max_1_min_wind_mph_km_h\"='65 (100)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AA with a Class AAAA of Sulphur Springs and Duncanville as the class AAAAA?" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"team\" WHERE \"class_aaaa\"='sulphur springs' AND \"class_aaaaa\"='duncanville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AA in the 2010-11 school year with a class AAA of Giddings?" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"team\" WHERE \"class_aaa\"='giddings' AND \"school_year\"='2010-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AA of the school year 2009-10 with a class AAA of Giddings?" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"team\" WHERE \"class_aaa\"='giddings' AND \"school_year\"='2009-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the class AAAAA of the school year 1993-94 with a class AAA of Mont Belvieu Barbers Hill?" }, { "role": "assistant", "content": "SELECT \"class_aaaaa\" FROM \"team\" WHERE \"class_aaa\"='mont belvieu barbers hill' AND \"school_year\"='1993-94';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the school year with a class AA of Rosebud-Lott, a class AAAAA of Duncanville, and a class AAA of Mont Belvieu Barbers Hill?" }, { "role": "assistant", "content": "SELECT \"school_year\" FROM \"team\" WHERE \"class_aa\"='rosebud-lott' AND \"class_aaaaa\"='duncanville' AND \"class_aaa\"='mont belvieu barbers hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the class AAA of the 1993-94 school year with a class AAAAA of Duncanville?" }, { "role": "assistant", "content": "SELECT \"class_aaa\" FROM \"team\" WHERE \"class_aaaaa\"='duncanville' AND \"school_year\"='1993-94';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pittsburgh_penguins_4_boston_bruins_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visiting team on May 7?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"pittsburgh_penguins_4_boston_bruins_2\" WHERE \"date\"='may 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"annual_passenger_statistics_for_helsinki\" (\n \"year\" real,\n \"domestic_passengers\" real,\n \"international_passengers\" real,\n \"total_passengers\" real,\n \"change\" text\n);\n\nQuestion: what year has 13,426,901 passengers and more than 10,726,551 international passengers?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"annual_passenger_statistics_for_helsinki\" WHERE \"total_passengers\"='13,426,901' AND \"international_passengers\">'10,726,551';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"annual_passenger_statistics_for_helsinki\" (\n \"year\" real,\n \"domestic_passengers\" real,\n \"international_passengers\" real,\n \"total_passengers\" real,\n \"change\" text\n);\n\nQuestion: what total number of passengers is domestic and larger than 2,803,907 and a year after 1999?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_passengers\") FROM \"annual_passenger_statistics_for_helsinki\" WHERE \"domestic_passengers\"='2,803,907' AND \"year\">1999;" } ]
[ { "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\" real,\n \"best\" real\n);\n\nQuestion: Who had a Qualifying 2 time over 58.669 for Team Australia?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\">58.669 AND \"team\"='team australia';" } ]
[ { "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\" real,\n \"best\" real\n);\n\nQuestion: Which qualifying 1 time has a best under 58.669 and a qualifying 2 time under 57.897?" }, { "role": "assistant", "content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"best\"<58.669 AND \"qual_2\"<57.897;" } ]
[ { "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\" real,\n \"best\" real\n);\n\nQuestion: Which team has a qualifying 2 time under 59.612 and a best of 59.14?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_2\"<59.612 AND \"best\"=59.14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Lungchang has a Halang of \u0292\u026f\u00b2, and a Rera of \u0292o\u00b2?" }, { "role": "assistant", "content": "SELECT \"lungchang\" FROM \"language\" WHERE \"halang\"='\u0292\u026f\u00b2' AND \"rera\"='\u0292o\u00b2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Tikhak has a Yonguk of wu\u00b9ti\u00b9?" }, { "role": "assistant", "content": "SELECT \"tikhak\" FROM \"language\" WHERE \"yonguk\"='wu\u00b9ti\u00b9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Yonguk has a Halang of ran\u00b9?" }, { "role": "assistant", "content": "SELECT \"yonguk\" FROM \"language\" WHERE \"halang\"='ran\u00b9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Halang has a Rera of \u0292o\u00b2?" }, { "role": "assistant", "content": "SELECT \"halang\" FROM \"language\" WHERE \"rera\"='\u0292o\u00b2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Muklom has a Halang of w\u026f\u00b9c\u02b0i\u00b9?" }, { "role": "assistant", "content": "SELECT \"muklom\" FROM \"language\" WHERE \"halang\"='w\u026f\u00b9c\u02b0i\u00b9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"gloss\" text,\n \"cholim\" text,\n \"lungchang\" text,\n \"rera\" text,\n \"tikhak\" text,\n \"yonguk\" text,\n \"muklom\" text,\n \"hakhun\" text,\n \"halang\" text\n);\n\nQuestion: Which Hakhun has a Tikhak of \u0292u\u00b2?" }, { "role": "assistant", "content": "SELECT \"hakhun\" FROM \"language\" WHERE \"tikhak\"='\u0292u\u00b2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: What is the location of Tamagaki station with an l stop?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"stations\" WHERE \"stop\"='l' AND \"station\"='tamagaki';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: What is the station with a number greater than 9 and a distance of 16.4 km?" }, { "role": "assistant", "content": "SELECT \"station\" FROM \"stations\" WHERE \"number\">9 AND \"distance_km\"=16.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: What is the Japanese name of the station with a number 3?" }, { "role": "assistant", "content": "SELECT \"japanese\" FROM \"stations\" WHERE \"number\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: What is the number of the station in Suzuka that is smaller than 11.1 km and has an l stop?" }, { "role": "assistant", "content": "SELECT SUM(\"number\") FROM \"stations\" WHERE \"location\"='suzuka' AND \"distance_km\"<11.1 AND \"stop\"='l';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: What is the distance of Kawage station?" }, { "role": "assistant", "content": "SELECT SUM(\"distance_km\") FROM \"stations\" WHERE \"station\"='kawage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"number\" real,\n \"station\" text,\n \"japanese\" text,\n \"distance_km\" real,\n \"stop\" text,\n \"location\" text\n);\n\nQuestion: Which station has a number less than 5 and an l stop?" }, { "role": "assistant", "content": "SELECT \"station\" FROM \"stations\" WHERE \"number\"<5 AND \"stop\"='l';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Name the visitor for detroit on february 24" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"february\" WHERE \"home\"='detroit' AND \"date\"='february 24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_3_titles_2_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the highest listed year for the partner of Marcel Granollers and a hard surface?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"doubles_5_3_titles_2_runners_up\" WHERE \"partner\"='marcel granollers' AND \"surface\"='hard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_3_titles_2_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the listed surface for the Championship of Toronto that had a runner-up outcome?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_5_3_titles_2_runners_up\" WHERE \"outcome\"='runner-up' AND \"championship\"='toronto';" } ]
[ { "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 \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What time was the game during week 5?" }, { "role": "assistant", "content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"week\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spin_offs\" (\n \"series\" text,\n \"premiere_date\" text,\n \"no_of_seasons\" real,\n \"city\" text,\n \"starring\" text\n);\n\nQuestion: Which City has a Series of Tamra's oc wedding?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"spin_offs\" WHERE \"series\"='tamra''s oc wedding';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sherbrooke_boroughs\" (\n \"borough\" text,\n \"components\" text,\n \"population\" real,\n \"number_of_borough_councilors\" real,\n \"number_of_municipal_councilors\" real\n);\n\nQuestion: What is the average number of borough councilors from Brompton?" }, { "role": "assistant", "content": "SELECT AVG(\"number_of_borough_councilors\") FROM \"list_of_sherbrooke_boroughs\" WHERE \"borough\"='brompton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_sherbrooke_boroughs\" (\n \"borough\" text,\n \"components\" text,\n \"population\" real,\n \"number_of_borough_councilors\" real,\n \"number_of_municipal_councilors\" real\n);\n\nQuestion: Which components have a borough of Lennoxville and borough councilors under 4?" }, { "role": "assistant", "content": "SELECT \"components\" FROM \"list_of_sherbrooke_boroughs\" WHERE \"number_of_borough_councilors\"<4 AND \"borough\"='lennoxville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"constituents\" (\n \"date\" real,\n \"2_january_2007\" text,\n \"19_october_2009\" text,\n \"5_november_2010\" text,\n \"16_december_2011\" text,\n \"30_march_2012\" text\n);\n\nQuestion: 5 November 2010 of dragon oil 4.02% has what average Date?" }, { "role": "assistant", "content": "SELECT AVG(\"date\") FROM \"constituents\" WHERE \"5_november_2010\"='dragon oil 4.02%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average number of points for a difference of 55 and an against less than 47?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"difference\"='55' AND \"against\"<47;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest lost that has an against greater than 60, points less than 61 and an 18 drawn?" }, { "role": "assistant", "content": "SELECT MAX(\"lost\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"against\">60 AND \"points\"<61 AND \"drawn\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Name of the Historic House of the 18th Century?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"midlothian\" WHERE \"type\"='historic house' AND \"date\"='18th century';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Type of castle from the 14th Century which Condition is preserved?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"midlothian\" WHERE \"date\"='14th century' AND \"condition\"='preserved';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Name of the private Castle of the 16th century which is occupied?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"midlothian\" WHERE \"ownership\"='private' AND \"condition\"='occupied' AND \"date\"='16th century';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Date of the castle with a Historic Scotland Ownership?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"midlothian\" WHERE \"ownership\"='historic scotland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Date of the Fortified House?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"midlothian\" WHERE \"type\"='fortified house';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"midlothian\" (\n \"name\" text,\n \"type\" text,\n \"date\" text,\n \"condition\" text,\n \"ownership\" text\n);\n\nQuestion: What is the Date of the Courtyard Castle?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"midlothian\" WHERE \"type\"='courtyard castle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_1\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the highest lost that has 6 for points?" }, { "role": "assistant", "content": "SELECT MAX(\"lost\") FROM \"group_1\" WHERE \"points\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_1\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: How many losses have points less than 3, with a drawn greater than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"lost\") FROM \"group_1\" WHERE \"points\"<3 AND \"drawn\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_15\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Margin of victory has a Runner(s)-up of buddy gardner?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_15\" WHERE \"runner_s_up\"='buddy gardner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_15\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Date has a Winning score of \u201314 (66-64-68-68=266)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pga_tour_wins_15\" WHERE \"winning_score\"='\u201314 (66-64-68-68=266)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_15\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Tournament has a Winning score of e (72-69-71-68=280)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_15\" WHERE \"winning_score\"='e (72-69-71-68=280)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_15\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Margin of victory has a Runner(s)-up of dave barr?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_15\" WHERE \"runner_s_up\"='dave barr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_15\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Margin of victory has a Runner(s)-up of mark o'meara?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_15\" WHERE \"runner_s_up\"='mark o''meara';" } ]