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 \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real,\n \"current_conference\" text\n);\n\nQuestion: Where is Southern Vermont College located?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"former_members\" WHERE \"institution\"='Southern Vermont College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real,\n \"current_conference\" text\n);\n\nQuestion: In what year did the school with enrollment of 650 leave?" }, { "role": "assistant", "content": "SELECT \"left\" FROM \"former_members\" WHERE \"enrollment\"=650;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What was the number of races in the season in which the team placed on the 14th position?" }, { "role": "assistant", "content": "SELECT MIN(\"races\") FROM \"career_summary\" WHERE \"position\"='14th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What is the lowest number of wins of a team?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"career_summary\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" real,\n \"position\" text\n);\n\nQuestion: What's the minimal number of wins of a team?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"career_summary\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Name the institution for statesmen" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"current_members\" WHERE \"nickname\"='Statesmen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Name the institution for yellowjackets" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"current_members\" WHERE \"nickname\"='Yellowjackets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Name the type for hobart college" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"current_members\" WHERE \"institution\"='Hobart College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Name the location for 1829" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"current_members\" WHERE \"founded\"=1829;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Name the location of statesmen" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"current_members\" WHERE \"nickname\"='Statesmen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_197446_1\" (\n \"office\" text,\n \"branch\" text,\n \"location\" text,\n \"elected\" real,\n \"term_began\" text,\n \"term_ended\" text\n);\n\nQuestion: What location was the congressional service of which the term ended in January 3, 2011?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"table1_197446_1\" WHERE \"term_ended\"='January 3, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_197446_1\" (\n \"office\" text,\n \"branch\" text,\n \"location\" text,\n \"elected\" real,\n \"term_began\" text,\n \"term_ended\" text\n);\n\nQuestion: What branch was involved when the term began in January 3, 1985?" }, { "role": "assistant", "content": "SELECT \"branch\" FROM \"table1_197446_1\" WHERE \"term_began\"='January 3, 1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_197446_1\" (\n \"office\" text,\n \"branch\" text,\n \"location\" text,\n \"elected\" real,\n \"term_began\" text,\n \"term_ended\" text\n);\n\nQuestion: What year was the congressional service elected for a term beginning on January 3, 1989?" }, { "role": "assistant", "content": "SELECT \"elected\" FROM \"table1_197446_1\" WHERE \"term_began\"='January 3, 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_197446_1\" (\n \"office\" text,\n \"branch\" text,\n \"location\" text,\n \"elected\" real,\n \"term_began\" text,\n \"term_ended\" text\n);\n\nQuestion: What group was in office when the term ended in January 3, 1993?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"table1_197446_1\" WHERE \"term_ended\"='January 3, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_197446_1\" (\n \"office\" text,\n \"branch\" text,\n \"location\" text,\n \"elected\" real,\n \"term_began\" text,\n \"term_ended\" text\n);\n\nQuestion: How many terms began when the term ended in January 3, 1989?" }, { "role": "assistant", "content": "SELECT COUNT(\"term_began\") FROM \"table1_197446_1\" WHERE \"term_ended\"='January 3, 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_22\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: How many different total points does the couple ranked at number 5 have?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"table1_19744915_22\" WHERE \"rank\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_22\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: What couple had vote percentage of 21.843%?" }, { "role": "assistant", "content": "SELECT \"couple\" FROM \"table1_19744915_22\" WHERE \"vote_percentage\"='21.843%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_22\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: How many judges points did the couple ranked at number 5 have?" }, { "role": "assistant", "content": "SELECT MAX(\"judges\") FROM \"table1_19744915_22\" WHERE \"rank\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_22\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: What couple had less than 2.0 points from the public?" }, { "role": "assistant", "content": "SELECT \"couple\" FROM \"table1_19744915_22\" WHERE \"public\"<2.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_17\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: What was the total result for couple Ellery and Frankie?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"table1_19744915_17\" WHERE \"couple\"='Ellery and Frankie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_17\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: If the vote percentage is 2.111%, what was the minimum rank?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"table1_19744915_17\" WHERE \"vote_percentage\"='2.111%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_17\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: If the total is 17, what was the maximum rank amount?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"table1_19744915_17\" WHERE \"total\"=17;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_17\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: For couple Todd and Susie, what was the vote percentage?" }, { "role": "assistant", "content": "SELECT \"vote_percentage\" FROM \"table1_19744915_17\" WHERE \"couple\"='Todd and Susie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_18\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: When 9 is the rank who are the couple?" }, { "role": "assistant", "content": "SELECT \"couple\" FROM \"table1_19744915_18\" WHERE \"rank\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_18\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: When roxanne and daniel are the couple what is the highest rank?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"table1_19744915_18\" WHERE \"couple\"='Roxanne and Daniel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_18\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: When ellery and frankie are the couple what is the highest total?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"table1_19744915_18\" WHERE \"couple\"='Ellery and Frankie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_18\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: When 8 is the public what are the results?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"table1_19744915_18\" WHERE \"public\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_18\" (\n \"rank\" real,\n \"couple\" text,\n \"judges\" real,\n \"public\" real,\n \"total\" real,\n \"vote_percentage\" text,\n \"result\" text\n);\n\nQuestion: When 8 is the public and the result is safe what is the highest rank?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"table1_19744915_18\" WHERE \"result\"='Safe' AND \"public\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19744915_4\" (\n \"order\" real,\n \"couple\" text,\n \"karen\" text,\n \"nicky\" text,\n \"jason\" text,\n \"ruthie\" text,\n \"robin\" text,\n \"total\" text,\n \"skating_song\" text,\n \"scoreboard\" text,\n \"public_vote\" text\n);\n\nQuestion: Name the karen when nicky is 2.5" }, { "role": "assistant", "content": "SELECT \"karen\" FROM \"table1_19744915_4\" WHERE \"nicky\"='2.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: What is the capacity for the school that has the Owl Athletic Complex baseball stadium?" }, { "role": "assistant", "content": "SELECT \"capacity\" FROM \"conference_facilities\" WHERE \"baseball_stadium\"='Owl Athletic Complex';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: What is the name of the softball stadium for the school that has Eastern Baseball Stadium?" }, { "role": "assistant", "content": "SELECT \"softball_stadium\" FROM \"conference_facilities\" WHERE \"baseball_stadium\"='Eastern Baseball Stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: What is the name of UMass Boston's softball stadium?" }, { "role": "assistant", "content": "SELECT \"softball_stadium\" FROM \"conference_facilities\" WHERE \"school\"='UMass Boston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: What is the name of Rhode Island College's softball stadium?" }, { "role": "assistant", "content": "SELECT \"softball_stadium\" FROM \"conference_facilities\" WHERE \"school\"='Rhode Island College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: How many basketball arenas are there that belong to a school with a capacity of 3,000?" }, { "role": "assistant", "content": "SELECT COUNT(\"basketball_arena\") FROM \"conference_facilities\" WHERE \"capacity\"='3,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_facilities\" (\n \"school\" text,\n \"baseball_stadium\" text,\n \"softball_stadium\" text,\n \"basketball_arena\" text,\n \"capacity\" text\n);\n\nQuestion: What is the name of the baseball stadium for the school with the Murray Center basketball arena?" }, { "role": "assistant", "content": "SELECT \"baseball_stadium\" FROM \"conference_facilities\" WHERE \"basketball_arena\"='The Murray Center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: Where is the Westfield State University located?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"associate_members\" WHERE \"institution\"='Westfield State University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: When was the school in Salem, Massachusetts located?" }, { "role": "assistant", "content": "SELECT \"founded\" FROM \"associate_members\" WHERE \"location\"='Salem, Massachusetts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: What's the nickname of Westfield State University's students?" }, { "role": "assistant", "content": "SELECT \"nickname\" FROM \"associate_members\" WHERE \"institution\"='Westfield State University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: What's Fitchburg State University's LEC sport?" }, { "role": "assistant", "content": "SELECT \"lec_sport\" FROM \"associate_members\" WHERE \"institution\"='Fitchburg State University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: Where is the school whose students are nicknamed falcons located?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"associate_members\" WHERE \"nickname\"='Falcons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"associate_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"primary_conference\" text,\n \"lec_sport\" text\n);\n\nQuestion: What's Salem State University's primary conference?" }, { "role": "assistant", "content": "SELECT \"primary_conference\" FROM \"associate_members\" WHERE \"institution\"='Salem State University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for north carolina 9" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"north_carolina\" WHERE \"district\"='North Carolina 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the total party for north carolina 7" }, { "role": "assistant", "content": "SELECT COUNT(\"party\") FROM \"north_carolina\" WHERE \"district\"='North Carolina 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for sue myrick (r) 69.0% jeff doctor (d) 31.0%" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"north_carolina\" WHERE \"candidates\"='Sue Myrick (R) 69.0% Jeff Doctor (D) 31.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the result for north carolina 7" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"north_carolina\" WHERE \"district\"='North Carolina 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Name the incumbent for north carolina 9" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"north_carolina\" WHERE \"district\"='North Carolina 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: What's Babson College's enrollment?" }, { "role": "assistant", "content": "SELECT MAX(\"enrollment\") FROM \"current_members\" WHERE \"institution\"='Babson College';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: When has Clark University joined the Conference?" }, { "role": "assistant", "content": "SELECT MAX(\"joined\") FROM \"current_members\" WHERE \"institution\"='Clark University';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: What's the type of the school in New London, Connecticut? " }, { "role": "assistant", "content": "SELECT \"type\" FROM \"current_members\" WHERE \"location\"='New London, Connecticut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: When was the school in Springfield, Massachusetts founded?" }, { "role": "assistant", "content": "SELECT MAX(\"founded\") FROM \"current_members\" WHERE \"location\"='Springfield, Massachusetts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: What school is located in Worcester, Massachusetts?" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"current_members\" WHERE \"location\"='Worcester, Massachusetts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19753079_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who are the candidates in Florida 13 district?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_19753079_12\" WHERE \"district\"='Florida 13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19753079_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many different pairs of candidates were there for the district first elected in 1988?" }, { "role": "assistant", "content": "SELECT COUNT(\"candidates\") FROM \"table1_19753079_12\" WHERE \"first_elected\"=1988;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19753079_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: Who were candidates in Florida 10 district?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"table1_19753079_12\" WHERE \"district\"='Florida 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19753079_12\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What party got elected in Florida 9 district?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"table1_19753079_12\" WHERE \"district\"='Florida 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19751479_4\" (\n \"rnd\" real,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text,\n \"results\" text\n);\n\nQuestion: What is the first round that had #67 the racer's group with the fastest lap?" }, { "role": "assistant", "content": "SELECT MIN(\"rnd\") FROM \"table1_19751479_4\" WHERE \"fastest_lap\"='#67 The Racer''s Group';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19751479_4\" (\n \"rnd\" real,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winner\" text,\n \"results\" text\n);\n\nQuestion: How many races had #99 gainsco/bob stallings racing in round 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"fastest_lap\") FROM \"table1_19751479_4\" WHERE \"rnd\"=10 AND \"pole_position\"='#99 GAINSCO/Bob Stallings Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What incumbent was first elected in 2009?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"california\" WHERE \"first_elected\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: How many were first elected in California 7?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"california\" WHERE \"district\"='California 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: What district did George Miller belong to?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"california\" WHERE \"incumbent\"='George Miller';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When mark critz (d) 50.8% tim burns (r) 49.2% are the candidates what is the party?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"pennsylvania\" WHERE \"candidates\"='Mark Critz (D) 50.8% Tim Burns (R) 49.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When chris carney is the incumbent what are the results?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"pennsylvania\" WHERE \"incumbent\"='Chris Carney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When 1994 is the first elected what is the district?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"pennsylvania\" WHERE \"first_elected\"=1994;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When pennsylvania 3 is the district who is the incumbent?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"pennsylvania\" WHERE \"district\"='Pennsylvania 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text,\n \"candidates\" text\n);\n\nQuestion: When 1984 is the first elected who are the candidates?" }, { "role": "assistant", "content": "SELECT \"candidates\" FROM \"pennsylvania\" WHERE \"first_elected\"=1984;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_21_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" real,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: What is Salva Ortega's result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"semi_final_2_21_february_2009\" WHERE \"artist\"='Salva Ortega';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_21_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" real,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: How many televotes are there for \"Lujuria\"?" }, { "role": "assistant", "content": "SELECT \"televotes\" FROM \"semi_final_2_21_february_2009\" WHERE \"song\"='\\\"Lujuria\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_21_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" real,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: How many televotes are there where there is 4 jury votes?" }, { "role": "assistant", "content": "SELECT \"televotes\" FROM \"semi_final_2_21_february_2009\" WHERE \"jury_votes\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_21_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" real,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: How many jury votes for the televote of 7?" }, { "role": "assistant", "content": "SELECT \"jury_votes\" FROM \"semi_final_2_21_february_2009\" WHERE \"televotes\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_1_14_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" text,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: What is the result for Normativa Vigente?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"semi_final_1_14_february_2009\" WHERE \"artist\"='Normativa Vigente';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_1_14_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" text,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: What song has 24 votes?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"semi_final_1_14_february_2009\" WHERE \"total_votes\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_1_14_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" text,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: What is the least total votes?" }, { "role": "assistant", "content": "SELECT MIN(\"total_votes\") FROM \"semi_final_1_14_february_2009\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_1_14_february_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"jury_votes\" text,\n \"televotes\" real,\n \"total_votes\" real,\n \"result\" text\n);\n\nQuestion: How many votes does Carlos Ferrer Eai have?" }, { "role": "assistant", "content": "SELECT \"total_votes\" FROM \"semi_final_1_14_february_2009\" WHERE \"artist\"='Carlos Ferrer EAI';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_singles\" (\n \"num\" real,\n \"player\" text,\n \"age\" real,\n \"australian_open\" real,\n \"french_open\" real,\n \"wimbledon\" real,\n \"us_open\" real\n);\n\nQuestion: How many players are on this list?" }, { "role": "assistant", "content": "SELECT MAX(\"num\") FROM \"men_s_singles\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_singles\" (\n \"num\" real,\n \"player\" text,\n \"age\" real,\n \"australian_open\" real,\n \"french_open\" real,\n \"wimbledon\" real,\n \"us_open\" real\n);\n\nQuestion: Who won the French Open in 1999?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"men_s_singles\" WHERE \"french_open\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_singles\" (\n \"num\" real,\n \"player\" text,\n \"age\" real,\n \"australian_open\" real,\n \"french_open\" real,\n \"wimbledon\" real,\n \"us_open\" real\n);\n\nQuestion: Who won the US Open in 1937?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"men_s_singles\" WHERE \"us_open\"=1937;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_singles\" (\n \"num\" real,\n \"player\" text,\n \"age\" real,\n \"australian_open\" real,\n \"french_open\" real,\n \"wimbledon\" real,\n \"us_open\" real\n);\n\nQuestion: How many times did Roy Emerson win the Australian Open?" }, { "role": "assistant", "content": "SELECT COUNT(\"australian_open\") FROM \"men_s_singles\" WHERE \"player\"='Roy Emerson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_singles\" (\n \"num\" real,\n \"player\" text,\n \"age\" real,\n \"australian_open\" real,\n \"french_open\" real,\n \"wimbledon\" real,\n \"us_open\" real\n);\n\nQuestion: At what age did Roy Emerson complete the Grand Slam?" }, { "role": "assistant", "content": "SELECT MAX(\"age\") FROM \"men_s_singles\" WHERE \"player\"='Roy Emerson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"rank\" real,\n \"no\" real,\n \"pos\" text,\n \"player\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"champions_league\" real,\n \"club_world_cup\" real,\n \"total\" real\n);\n\nQuestion: Name the least rank for 2" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"goalscorers\" WHERE \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"rank\" real,\n \"no\" real,\n \"pos\" text,\n \"player\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"champions_league\" real,\n \"club_world_cup\" real,\n \"total\" real\n);\n\nQuestion: Name the total for jamie carragher" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"goalscorers\" WHERE \"player\"='Jamie Carragher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"rank\" real,\n \"no\" real,\n \"pos\" text,\n \"player\" text,\n \"premier_league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"champions_league\" real,\n \"club_world_cup\" real,\n \"total\" real\n);\n\nQuestion: Name the total number of club worl cup for djibril cisse" }, { "role": "assistant", "content": "SELECT COUNT(\"club_world_cup\") FROM \"goalscorers\" WHERE \"player\"='Djibril Cisse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"chinese_name_simplified_traditional\" text,\n \"pinyin\" text,\n \"population\" real,\n \"post_code\" real\n);\n\nQuestion: What's the post code of the county with the Chinese name \u6f5c\u5c71\u53bf / \u6f5b\u5c71\u7e23?" }, { "role": "assistant", "content": "SELECT MIN(\"post_code\") FROM \"administration\" WHERE \"chinese_name_simplified_traditional\"='\u6f5c\u5c71\u53bf / \u6f5b\u5c71\u7e23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"chinese_name_simplified_traditional\" text,\n \"pinyin\" text,\n \"population\" real,\n \"post_code\" real\n);\n\nQuestion: What's the English name of the county called \u592a\u6e56\u53bf / \u592a\u6e56\u7e23 in Chinese?" }, { "role": "assistant", "content": "SELECT \"english_name\" FROM \"administration\" WHERE \"chinese_name_simplified_traditional\"='\u592a\u6e56\u53bf / \u592a\u6e56\u7e23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"chinese_name_simplified_traditional\" text,\n \"pinyin\" text,\n \"population\" real,\n \"post_code\" real\n);\n\nQuestion: What's the English name of the county with a postcode 246400?" }, { "role": "assistant", "content": "SELECT \"english_name\" FROM \"administration\" WHERE \"post_code\"=246400;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"chinese_name_simplified_traditional\" text,\n \"pinyin\" text,\n \"population\" real,\n \"post_code\" real\n);\n\nQuestion: What's the Chinese (simplified/traditional) name of Susong County?" }, { "role": "assistant", "content": "SELECT \"chinese_name_simplified_traditional\" FROM \"administration\" WHERE \"english_name\"='Susong County';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"english_name\" text,\n \"chinese_name_simplified_traditional\" text,\n \"pinyin\" text,\n \"population\" real,\n \"post_code\" real\n);\n\nQuestion: What's the Pinyin name of the county with a postcode 246500?" }, { "role": "assistant", "content": "SELECT \"pinyin\" FROM \"administration\" WHERE \"post_code\"=246500;" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: On how many different dates was a game against Houston played?" }, { "role": "assistant", "content": "SELECT COUNT(\"date\") FROM \"regular_season\" WHERE \"opponent\"='Houston';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: How many different players did the high assists in games where the high rebounds were done by Sales (10)?" }, { "role": "assistant", "content": "SELECT COUNT(\"high_assists\") FROM \"regular_season\" WHERE \"high_rebounds\"='Sales (10)';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What's the number of the game played on June 22?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"date\"='June 22';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Who was game number 8 played against?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"game\"=8;" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Who did the high rebounds in the game in which five players (3) did the high assists?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"high_assists\"='Five Players (3)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"present_subjunctive\" (\n \"verbs\" text,\n \"yo\" text,\n \"t\" text,\n \"vos\" text,\n \"l_ella_usted\" text,\n \"nosotros_nosotras\" text,\n \"vosotros_vosotras\" text,\n \"ellos_ellas_ustedes\" text\n);\n\nQuestion: What are all the conjugated forms of the verb where the el/ ella/usted verb is piense?" }, { "role": "assistant", "content": "SELECT \"nosotros_nosotras\" FROM \"present_subjunctive\" WHERE \"l_ella_usted\"='piense';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"present_subjunctive\" (\n \"verbs\" text,\n \"yo\" text,\n \"t\" text,\n \"vos\" text,\n \"l_ella_usted\" text,\n \"nosotros_nosotras\" text,\n \"vosotros_vosotras\" text,\n \"ellos_ellas_ustedes\" text\n);\n\nQuestion: What are all the conjugated forms of the verb moler where the vosotros / vosotras is mol\u00e1is for the yo tense?" }, { "role": "assistant", "content": "SELECT \"yo\" FROM \"present_subjunctive\" WHERE \"vosotros_vosotras\"='mol\u00e1is';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"present_subjunctive\" (\n \"verbs\" text,\n \"yo\" text,\n \"t\" text,\n \"vos\" text,\n \"l_ella_usted\" text,\n \"nosotros_nosotras\" text,\n \"vosotros_vosotras\" text,\n \"ellos_ellas_ustedes\" text\n);\n\nQuestion: how many verbs have the yo form as sienta?" }, { "role": "assistant", "content": "SELECT COUNT(\"verbs\") FROM \"present_subjunctive\" WHERE \"yo\"='sienta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"present_subjunctive\" (\n \"verbs\" text,\n \"yo\" text,\n \"t\" text,\n \"vos\" text,\n \"l_ella_usted\" text,\n \"nosotros_nosotras\" text,\n \"vosotros_vosotras\" text,\n \"ellos_ellas_ustedes\" text\n);\n\nQuestion: What us the conjucated form(s) of el/ella/ usted when the Vos (*) is muelas / mol\u00e1s?" }, { "role": "assistant", "content": "SELECT \"l_ella_usted\" FROM \"present_subjunctive\" WHERE \"vos\"='muelas / mol\u00e1s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"present_subjunctive\" (\n \"verbs\" text,\n \"yo\" text,\n \"t\" text,\n \"vos\" text,\n \"l_ella_usted\" text,\n \"nosotros_nosotras\" text,\n \"vosotros_vosotras\" text,\n \"ellos_ellas_ustedes\" text\n);\n\nQuestion: What are the forms of the conjucated vos(*) where \u00e9l / ella / usted is muela" }, { "role": "assistant", "content": "SELECT \"vos\" FROM \"present_subjunctive\" WHERE \"l_ella_usted\"='muela';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toll_rates\" (\n \"vehicle_category\" text,\n \"till_aligarh\" real,\n \"till_mathura\" real,\n \"till_agra\" real,\n \"for_round_trip\" real\n);\n\nQuestion: How many have the Till Agra of 500?" }, { "role": "assistant", "content": "SELECT COUNT(\"till_mathura\") FROM \"toll_rates\" WHERE \"till_agra\"=500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toll_rates\" (\n \"vehicle_category\" text,\n \"till_aligarh\" real,\n \"till_mathura\" real,\n \"till_agra\" real,\n \"for_round_trip\" real\n);\n\nQuestion: What kind of vehicle is the agra 1050?" }, { "role": "assistant", "content": "SELECT \"vehicle_category\" FROM \"toll_rates\" WHERE \"till_agra\"=1050;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toll_rates\" (\n \"vehicle_category\" text,\n \"till_aligarh\" real,\n \"till_mathura\" real,\n \"till_agra\" real,\n \"for_round_trip\" real\n);\n\nQuestion: If the till aligarh is 150, what the mac till mathura?" }, { "role": "assistant", "content": "SELECT MAX(\"till_mathura\") FROM \"toll_rates\" WHERE \"till_aligarh\"=150;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"toll_rates\" (\n \"vehicle_category\" text,\n \"till_aligarh\" real,\n \"till_mathura\" real,\n \"till_agra\" real,\n \"for_round_trip\" real\n);\n\nQuestion: If the till agra is 1050, what is the max round trip?" }, { "role": "assistant", "content": "SELECT MAX(\"for_round_trip\") FROM \"toll_rates\" WHERE \"till_agra\"=1050;" } ]