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 \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the score for Ky Laffoon?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='ky laffoon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the score of Ralph Guldahl, who has more than $100?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"money\">100 AND \"player\"='ralph guldahl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the highest amount of money a play from Scotland United States has?" }, { "role": "assistant", "content": "SELECT MAX(\"money\") FROM \"final_leaderboard\" WHERE \"country\"='scotland united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yearly_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text\n);\n\nQuestion: How many Goals have a Pct % larger than 0.557, a points value smaller than 90, and a games value larger than 68?" }, { "role": "assistant", "content": "SELECT COUNT(\"goals_for\") FROM \"yearly_results\" WHERE \"pct_pct\">0.557 AND \"points\"<90 AND \"games\">68;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tally\" (\n \"club\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"record_pct_draw_0_5_wins\" real\n);\n\nQuestion: What is the draw record (%) total for clubs with more than 3 wins with 10 matches and more than 1 draw?" }, { "role": "assistant", "content": "SELECT COUNT(\"record_pct_draw_0_5_wins\") FROM \"tally\" WHERE \"wins\">3 AND \"matches\"=10 AND \"draws\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tally\" (\n \"club\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"record_pct_draw_0_5_wins\" real\n);\n\nQuestion: How many draws, more than 6, does Newcastle Knights have with a record (%) larger than 25?" }, { "role": "assistant", "content": "SELECT MAX(\"draws\") FROM \"tally\" WHERE \"matches\">6 AND \"club\"='newcastle knights' AND \"record_pct_draw_0_5_wins\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tally\" (\n \"club\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"record_pct_draw_0_5_wins\" real\n);\n\nQuestion: Which club has the most losses with 10 matches played and more than 1 draw?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"tally\" WHERE \"matches\"=10 AND \"draws\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"number\" text,\n \"bb_hbp\" real,\n \"ba_place\" text\n);\n\nQuestion: The year of 1985 which has a BB +HBP of 39 has what Number listed?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"career_statistics\" WHERE \"bb_hbp\"=39 AND \"year\"='1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"number\" text,\n \"bb_hbp\" real,\n \"ba_place\" text\n);\n\nQuestion: The year that has a BB + HBP of 51 is listed as?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"career_statistics\" WHERE \"bb_hbp\"=51;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"year\" text,\n \"team\" text,\n \"number\" text,\n \"bb_hbp\" real,\n \"ba_place\" text\n);\n\nQuestion: In the year 1992 for the Seibu Lions, the BB + HBP which is larger than 49 was this as a BA (Place)?" }, { "role": "assistant", "content": "SELECT \"ba_place\" FROM \"career_statistics\" WHERE \"bb_hbp\">49 AND \"team\"='seibu lions' AND \"year\"='1992';" } ]
[ { "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 \"record\" text\n);\n\nQuestion: What team lost on May 1?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='may 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the final score for the game on May 1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='may 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the final score for the game on May 4?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='may 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"career_sr\" text\n);\n\nQuestion: In 1994 what tournament held a ATP masters series" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='atp masters series';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the Career SR of the year that held the masters series Sr tournament" }, { "role": "assistant", "content": "SELECT \"career_sr\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='masters series sr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"assist_pass\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: WHich competition was held on Alvor with a score 1-0?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='1-0' AND \"location\"='alvor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which name has a Lane of 7?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"lane\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: How many lanes have a Nationality of iceland?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"semifinal_1\" WHERE \"nationality\"='iceland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the smallest rank with a Lane of 1?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"semifinal_1\" WHERE \"lane\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the final score of Game 1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"summary\" WHERE \"game\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: What date has 2:48 as the time?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"time\"='2:48';" } ]
[ { "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\" real,\n \"record\" text\n);\n\nQuestion: Which record has 2:57 as the time?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"time\"='2:57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell me the Losing BP that has Played of 22, and the Lost of 5?" }, { "role": "assistant", "content": "SELECT \"losing_bp\" FROM \"2009_2010_table\" WHERE \"played\"='22' AND \"lost\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell the Lost that has the Try BP of 10, and the Club of uwic rfc?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"2009_2010_table\" WHERE \"try_bp\"='10' AND \"club\"='uwic rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell me the Club that has the Lost of 19?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"2009_2010_table\" WHERE \"lost\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell me the Lost that has Losing BP of 5, and the Try BP of 0?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"2009_2010_table\" WHERE \"losing_bp\"='5' AND \"try_bp\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell me the Played that has the Club of club?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"2009_2010_table\" WHERE \"club\"='club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you tell me the Club thay has the Try BP of 0?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"2009_2010_table\" WHERE \"try_bp\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bowl_games\" (\n \"date\" text,\n \"bowl\" text,\n \"result\" text,\n \"points_for\" real,\n \"points_against\" real\n);\n\nQuestion: What date did the Mountaineers score 27 points and their opponent scored more that 7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"bowl_games\" WHERE \"points_against\">7 AND \"points_for\"=27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bowl_games\" (\n \"date\" text,\n \"bowl\" text,\n \"result\" text,\n \"points_for\" real,\n \"points_against\" real\n);\n\nQuestion: What was the final result when the Mountaineers scored less than 13 and their opponents scored 26?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"bowl_games\" WHERE \"points_for\"<13 AND \"points_against\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: With a Tally of 0-14, what is the Rank in Kilkenny County?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"single_game\" WHERE \"county\"='kilkenny' AND \"tally\"='0-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What County has Dublin as the Opposition?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"single_game\" WHERE \"opposition\"='dublin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: In Limerick County, what is the Rank with a Total larger than 12 and Tipperary as the Opposition?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"single_game\" WHERE \"opposition\"='tipperary' AND \"county\"='limerick' AND \"total\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What Player in Opposition of Kilkenny has a Total of 10?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"single_game\" WHERE \"total\"=10 AND \"opposition\"='kilkenny';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the time in Romania that has a lane larger than 4?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heats\" WHERE \"lane\">4 AND \"nationality\"='romania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Jin Hao had what amount of heat?" }, { "role": "assistant", "content": "SELECT \"heat\" FROM \"heats\" WHERE \"name\"='jin hao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: At time 15:29.69 what was the heat?" }, { "role": "assistant", "content": "SELECT \"heat\" FROM \"heats\" WHERE \"time\"='15:29.69';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: What is the class of the team when less than 6 laps were completed?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"laps\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: What is the year when Scuderia Lancia Corse competed?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"complete_24_hours_of_le_mans_results\" WHERE \"team\"='scuderia lancia corse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: What was the position of the teams before 1973?" }, { "role": "assistant", "content": "SELECT \"pos\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"year\"<1973;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ships\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the laid down date of Kaki?" }, { "role": "assistant", "content": "SELECT \"laid_down\" FROM \"list_of_ships\" WHERE \"name\"='kaki';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ships\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the launch date of \u6817?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"list_of_ships\" WHERE \"kanji\"='\u6817';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ships\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the completed date of \u84ec?" }, { "role": "assistant", "content": "SELECT \"completed\" FROM \"list_of_ships\" WHERE \"kanji\"='\u84ec';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which catalog was published on December 19, 2001?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='december 19, 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the label for October 21, 1981?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='october 21, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date for Catalog Alca-9201?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='alca-9201';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for July 27, 1994?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='july 27, 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date of the label Alfa records, a CD format, and an alca-9201 catalog?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='alfa records' AND \"format\"='cd' AND \"catalog\"='alca-9201';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog has the CD format?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='cd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which nationaly is ranked greater than 1, with a time of 59.75?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_1\" WHERE \"rank\">1 AND \"time\"='59.75';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Which france nationality has a lane larger than 3?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"lane\">3 AND \"nationality\"='france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's the total rank of the lane smaller than 8 with a time of 59.80?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"semifinal_1\" WHERE \"time\"='59.80' AND \"lane\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What's the top rank that's lane is smaller than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"semifinal_1\" WHERE \"lane\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_deputy_prime_ministers_of_spain\" (\n \"deputy_prime_minister\" text,\n \"took_office\" real,\n \"left_office\" text,\n \"prime_minister\" text,\n \"term\" text,\n \"party\" text\n);\n\nQuestion: What year did deputy prime minister Mariano Rajoy Brey take office?" }, { "role": "assistant", "content": "SELECT SUM(\"took_office\") FROM \"list_of_deputy_prime_ministers_of_spain\" WHERE \"deputy_prime_minister\"='mariano rajoy brey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_deputy_prime_ministers_of_spain\" (\n \"deputy_prime_minister\" text,\n \"took_office\" real,\n \"left_office\" text,\n \"prime_minister\" text,\n \"term\" text,\n \"party\" text\n);\n\nQuestion: Which deputy prime minister left office in 2004 and was in the 7th legislature?" }, { "role": "assistant", "content": "SELECT \"deputy_prime_minister\" FROM \"list_of_deputy_prime_ministers_of_spain\" WHERE \"term\"='7th legislature' AND \"left_office\"='2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_deputy_prime_ministers_of_spain\" (\n \"deputy_prime_minister\" text,\n \"took_office\" real,\n \"left_office\" text,\n \"prime_minister\" text,\n \"term\" text,\n \"party\" text\n);\n\nQuestion: Which deputy prime minister left office in 1981?" }, { "role": "assistant", "content": "SELECT \"deputy_prime_minister\" FROM \"list_of_deputy_prime_ministers_of_spain\" WHERE \"left_office\"='1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points did Connaught Type A chassis earn on average before 1955?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1955 AND \"chassis\"='connaught type a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participating_countries\" (\n \"draw\" real,\n \"competing_dancers\" text,\n \"dance_styles\" text,\n \"rank\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest points with 6 draws and lower than rank 10?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"participating_countries\" WHERE \"draw\"=6 AND \"rank\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participating_countries\" (\n \"draw\" real,\n \"competing_dancers\" text,\n \"dance_styles\" text,\n \"rank\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest draw with rank 4?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"participating_countries\" WHERE \"rank\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participating_countries\" (\n \"draw\" real,\n \"competing_dancers\" text,\n \"dance_styles\" text,\n \"rank\" real,\n \"points\" real\n);\n\nQuestion: How many draws has lower than rank 10 in rumba/cha-cha/jazz dance?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"participating_countries\" WHERE \"rank\"<10 AND \"dance_styles\"='rumba/cha-cha/jazz dance';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"participating_countries\" (\n \"draw\" real,\n \"competing_dancers\" text,\n \"dance_styles\" text,\n \"rank\" real,\n \"points\" real\n);\n\nQuestion: How many draws have rumba/tango dance styles?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"participating_countries\" WHERE \"dance_styles\"='rumba/tango';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the sum of the totals for Russia with more than 1 gold and less than 10 bronze?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"gold\">1 AND \"nation\"='russia' AND \"bronze\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what tournament happened on march 27, 2006?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_wins_14\" WHERE \"date\"='march 27, 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what was the score when scoville jenkins was the opponent?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_wins_14\" WHERE \"opponent\"='scoville jenkins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what was the opponent on november 14, 2005?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_wins_14\" WHERE \"date\"='november 14, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what tournament happened on may 2, 2011?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_wins_14\" WHERE \"date\"='may 2, 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what tournament had sam querrey as the opponent?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_wins_14\" WHERE \"opponent\"='sam querrey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_wins_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what tournament was on a hard surface and saw jacob adaktusson as the opponent?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_wins_14\" WHERE \"surface\"='hard' AND \"opponent\"='jacob adaktusson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent on September 17, 1995?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='september 17, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which week had an attendance of 51,265?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"attendance\"='51,265';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent on December 17, 1995?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 17, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which record has 4:14 as the time?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which record has tko (strikes) as the method, and daan kooiman as the opponent?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (strikes)' AND \"opponent\"='daan kooiman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which round has pain and glory 2006 as the event?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='pain and glory 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which record has john flemming as the opponent?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='john flemming';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which record has 5:00 as the time, jess liaudin as the opponent for the location of england?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"opponent\"='jess liaudin' AND \"location\"='england';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"result\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the date with attendance more than 19,204 and result of l and visitor of san francisco 49ers and record of 2-8-0" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\">'19,204' AND \"result\"='l' AND \"visitor\"='san francisco 49ers' AND \"record\"='2-8-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"result\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the score for home of green bay packers" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule\" WHERE \"home\"='green bay packers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"visitor\" text,\n \"result\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Name the home for 21-17" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"schedule\" WHERE \"score\"='21-17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What engine did Scuderia Ambrosiana with fewer than 4 points have?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='scuderia ambrosiana' AND \"points\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What chassis had fewer than 0 points in a year before 1954?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1954 AND \"points\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What chassis had an entrant of G.A. Vandervell?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='g.a. vandervell';" } ]
[ { "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: How many people were in attendance on may 2?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 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: How many people were in attendance on may 17?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"date\"='may 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"title\" text,\n \"entered_chart_uk\" text,\n \"peak_position_uk\" real,\n \"weeks_on_chart_uk\" real,\n \"sent_to_c_beebies_album\" text\n);\n\nQuestion: How many weeks did the single that entered the charts 14 september 2002 stay on the charts ?" }, { "role": "assistant", "content": "SELECT COUNT(\"weeks_on_chart_uk\") FROM \"singles\" WHERE \"entered_chart_uk\"='14 september 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"title\" text,\n \"entered_chart_uk\" text,\n \"peak_position_uk\" real,\n \"weeks_on_chart_uk\" real,\n \"sent_to_c_beebies_album\" text\n);\n\nQuestion: Which single was on the Charts for 23 weeks ?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"singles\" WHERE \"weeks_on_chart_uk\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"postgraduate\" (\n \"program\" text,\n \"degree\" text,\n \"teaching_language\" text,\n \"duration_years\" real,\n \"full_time_part_time\" text,\n \"ects_credit_points\" real\n);\n\nQuestion: How many ECTS credit points occur with Master in Management?" }, { "role": "assistant", "content": "SELECT COUNT(\"ects_credit_points\") FROM \"postgraduate\" WHERE \"program\"='master in management';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"postgraduate\" (\n \"program\" text,\n \"degree\" text,\n \"teaching_language\" text,\n \"duration_years\" real,\n \"full_time_part_time\" text,\n \"ects_credit_points\" real\n);\n\nQuestion: What is the teaching language for Master of Quantitative Finance?" }, { "role": "assistant", "content": "SELECT \"teaching_language\" FROM \"postgraduate\" WHERE \"program\"='master of quantitative finance';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"postgraduate\" (\n \"program\" text,\n \"degree\" text,\n \"teaching_language\" text,\n \"duration_years\" real,\n \"full_time_part_time\" text,\n \"ects_credit_points\" real\n);\n\nQuestion: Which program has 3.5 years?" }, { "role": "assistant", "content": "SELECT \"program\" FROM \"postgraduate\" WHERE \"duration_years\"=3.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"postgraduate\" (\n \"program\" text,\n \"degree\" text,\n \"teaching_language\" text,\n \"duration_years\" real,\n \"full_time_part_time\" text,\n \"ects_credit_points\" real\n);\n\nQuestion: What is the teaching language for a less than 2 year duration and less than 65 ECTS credit points?" }, { "role": "assistant", "content": "SELECT \"teaching_language\" FROM \"postgraduate\" WHERE \"duration_years\"<2 AND \"ects_credit_points\"<65;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What engine has more than 0 pts?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"complete_formula_one_results\" WHERE \"pts\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the average pots of Alfa Romeo v12 after 1983?" }, { "role": "assistant", "content": "SELECT AVG(\"pts\") FROM \"complete_formula_one_results\" WHERE \"engine\"='alfa romeo v12' AND \"year\">1983;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_national_championships_and_cana\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What year did dave f. mctaggart win the men's singles and robert b. williams ethel marshall win the mixed doubles?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"canadian_national_championships_and_cana\" WHERE \"men_s_singles\"='dave f. mctaggart' AND \"mixed_doubles\"='robert b. williams ethel marshall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_national_championships_and_cana\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the women's singles before 1958 when dave f. mctaggart won the men's singles?" }, { "role": "assistant", "content": "SELECT \"women_s_singles\" FROM \"canadian_national_championships_and_cana\" WHERE \"men_s_singles\"='dave f. mctaggart' AND \"year\"<1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_national_championships_and_cana\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the men's singles in 1958?" }, { "role": "assistant", "content": "SELECT \"men_s_singles\" FROM \"canadian_national_championships_and_cana\" WHERE \"year\"=1958;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canadian_national_championships_and_cana\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the mixed doubles in 1957 when judy devlin won the women's singles?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"canadian_national_championships_and_cana\" WHERE \"women_s_singles\"='judy devlin' AND \"year\"=1957;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"against\" real\n);\n\nQuestion: What was the total against in uefa champions league/european cup with more than 1 draw?" }, { "role": "assistant", "content": "SELECT SUM(\"against\") FROM \"european_record\" WHERE \"competition\"='uefa champions league/european cup' AND \"draw\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"against\" real\n);\n\nQuestion: What is the total against with 1 draw and less than 8 played?" }, { "role": "assistant", "content": "SELECT SUM(\"against\") FROM \"european_record\" WHERE \"draw\"=1 AND \"played\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" text,\n \"team\" text,\n \"racing_team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"drivers\" text,\n \"wins\" text,\n \"sprints_wins\" text,\n \"main_wins\" text,\n \"poles\" text,\n \"fastest_laps\" text,\n \"points\" text\n);\n\nQuestion: How many times did Super Nova Racing win with a zytek engine?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"champions\" WHERE \"engine\"='zytek' AND \"racing_team\"='super nova racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" text,\n \"team\" text,\n \"racing_team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"drivers\" text,\n \"wins\" text,\n \"sprints_wins\" text,\n \"main_wins\" text,\n \"poles\" text,\n \"fastest_laps\" text,\n \"points\" text\n);\n\nQuestion: How many main wins for France?" }, { "role": "assistant", "content": "SELECT \"main_wins\" FROM \"champions\" WHERE \"team\"='france';" } ]