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 \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor when the score was 136\u2013120?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"december\" WHERE \"score\"='136\u2013120';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home when the visitor was New York Knicks?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"december\" WHERE \"visitor\"='new york knicks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When was the home Los Angeles Lakers?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"december\" WHERE \"home\"='los angeles lakers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor on december 15, 1976?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"december\" WHERE \"date\"='december 15, 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: At Time Warner Cable Arena 12,096, what was the high points?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"location_attendance\"='time warner cable arena 12,096';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: On November 2 what was the record of the team?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='november 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"fcc_info\" text\n);\n\nQuestion: Average frequency with ERP W of 62?" }, { "role": "assistant", "content": "SELECT AVG(\"frequency_m_hz\") FROM \"texas\" WHERE \"erp_w\"='62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"fcc_info\" text\n);\n\nQuestion: Total frequency with ERP W of 62?" }, { "role": "assistant", "content": "SELECT COUNT(\"frequency_m_hz\") FROM \"texas\" WHERE \"erp_w\"='62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"fcc_info\" text\n);\n\nQuestion: Frequency for kamy?" }, { "role": "assistant", "content": "SELECT \"frequency_m_hz\" FROM \"texas\" WHERE \"call_sign\"='kamy';" } ]
[ { "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 \"location\" text\n);\n\nQuestion: What was the method of resolution when LaVerne Clark's record was 23-16-1?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='23-16-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" real,\n \"density\" text\n);\n\nQuestion: how many subdivisions have an English Name of jiyang?" }, { "role": "assistant", "content": "SELECT COUNT(\"population\") FROM \"subdivisions\" WHERE \"english_name\"='jiyang';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" real,\n \"density\" text\n);\n\nQuestion: What is the Population of the subdivision with the English Name of nanbin farm?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"subdivisions\" WHERE \"english_name\"='nanbin farm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" real,\n \"density\" text\n);\n\nQuestion: What is the Traditional when the Pinyin is h\u00e9d\u014dng q\u016b?" }, { "role": "assistant", "content": "SELECT \"traditional\" FROM \"subdivisions\" WHERE \"pinyin\"='h\u00e9d\u014dng q\u016b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" real,\n \"density\" text\n);\n\nQuestion: What is the Traditional for area 35?" }, { "role": "assistant", "content": "SELECT \"traditional\" FROM \"subdivisions\" WHERE \"area\"='35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which class has the verb meaning of to run?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"german\" WHERE \"verb_meaning\"='to run';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the entry for Part 1 for class 7d?" }, { "role": "assistant", "content": "SELECT \"part_1\" FROM \"german\" WHERE \"class\"='7d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 3 entry that has a part 4 entry of giboran?" }, { "role": "assistant", "content": "SELECT \"part_3\" FROM \"german\" WHERE \"part_4\"='giboran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 2 entry for class 3a?" }, { "role": "assistant", "content": "SELECT \"part_2\" FROM \"german\" WHERE \"class\"='3a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the part 4 entry for class 7b?" }, { "role": "assistant", "content": "SELECT \"part_4\" FROM \"german\" WHERE \"class\"='7b';" } ]
[ { "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 \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On what date was the result a draw?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"result\"='draw';" } ]
[ { "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 \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score at the 2010 FIFA World Cup Qualification that results in a win?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2010 fifa world cup qualification' AND \"result\"='win';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Power (kW) for the station located in Cebu?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"fm_stations\" WHERE \"location\"='cebu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Power (kW) for the station with a frequency of 95.1mhz?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"fm_stations\" WHERE \"frequency\"='95.1mhz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Callsign for the station with the branding 93dot5 home radio Cagayan De Oro?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"fm_stations\" WHERE \"branding\"='93dot5 home radio cagayan de oro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the frequency for the station with the branding of 94dot3 home radio Palawan?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"fm_stations\" WHERE \"branding\"='94dot3 home radio palawan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Branding for the station located in Zamboanga?" }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"fm_stations\" WHERE \"location\"='zamboanga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the Power (kW) for the station with the frequency of 98.7mhz?" }, { "role": "assistant", "content": "SELECT \"power_k_w\" FROM \"fm_stations\" WHERE \"frequency\"='98.7mhz';" } ]
[ { "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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the medal total of Denmark?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"nation\"='denmark';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game with a game number greater than 24 on December 19?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">24 AND \"date\"='december 19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of game 26 with beno udrih (4) as the highest assists?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"high_assists\"='beno udrih (4)' AND \"game\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of game 25?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"result_of_national_final\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: WHAT IS THE DRAW FOR u ritmu ljubavi, POINTS LARGER THAN 87?" }, { "role": "assistant", "content": "SELECT MAX(\"draw\") FROM \"result_of_national_final\" WHERE \"song\"='u ritmu ljubavi' AND \"points\">87;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"result_of_national_final\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: WHAT IS THE DRAW FOR PERFORMER ANDREA CUBRIC?" }, { "role": "assistant", "content": "SELECT \"draw\" FROM \"result_of_national_final\" WHERE \"performer\"='andrea cubric';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the game number when the record is 30-22?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"record\"='30-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: At what location was the score W 82-76?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"score\"='w 82-76';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What was the record when the game was at the Rose Garden?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"location\"='rose garden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managers_test_games_only\" (\n \"name\" text,\n \"period\" text,\n \"games\" real,\n \"wins\" real,\n \"draws\" real,\n \"lost\" real,\n \"win_ratio\" text\n);\n\nQuestion: What is the highest number of games with more than 0 draws and 11 losses?" }, { "role": "assistant", "content": "SELECT MAX(\"games\") FROM \"managers_test_games_only\" WHERE \"draws\">0 AND \"lost\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_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 \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1994 finish in the event that had a 1998 finish of 2R?" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"singles_performance_timeline\" WHERE \"1998\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_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 \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"1996\"='a' AND \"1998\"='a' AND \"1994\"='rr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_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 \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1994 finish associated with a 1995 finish of 3R and 1997 of QF?" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"singles_performance_timeline\" WHERE \"1997\"='qf' AND \"1995\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_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 \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1999 finish for the tournament in Rome?" }, { "role": "assistant", "content": "SELECT \"1999\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='rome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_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 \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1991 finish for the 1993 Grand Slams?" }, { "role": "assistant", "content": "SELECT \"1991\" FROM \"singles_performance_timeline\" WHERE \"1993\"='grand slams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"playoff_apps\" text,\n \"playoff_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What was the playoff apps for Thomas Heary, that had the position df?" }, { "role": "assistant", "content": "SELECT \"playoff_apps\" FROM \"appearances_and_goals\" WHERE \"position\"='df' AND \"name\"='thomas heary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"playoff_apps\" text,\n \"playoff_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What's the lowest squad number with more than 6 goals, fewer than 8 league goals, and more than 0 playoff goals?" }, { "role": "assistant", "content": "SELECT MIN(\"squad_no\") FROM \"appearances_and_goals\" WHERE \"total_goals\">6 AND \"league_goals\"<8 AND \"playoff_goals\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"squad_no\" real,\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"flt_apps\" text,\n \"flt_goals\" real,\n \"playoff_apps\" text,\n \"playoff_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many total goals did the squad with 2 playoff apps, 2 FA Cup Apps, and 0 League Cup goals get?" }, { "role": "assistant", "content": "SELECT SUM(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"playoff_apps\"='2' AND \"fa_cup_apps\"='2' AND \"league_cup_goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1999\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: Which title had rank 9?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"highest_grossing_films_of_1999\" WHERE \"rank\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1999\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: Which title placed in rank 7?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"highest_grossing_films_of_1999\" WHERE \"rank\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rpm_singles_chart_january_2000_november_\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: shows for the artist Santana featuring the product g&b?" }, { "role": "assistant", "content": "SELECT \"volume_issue\" FROM \"rpm_singles_chart_january_2000_november_\" WHERE \"artist\"='santana featuring the product g&b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rpm_singles_chart_january_2000_november_\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What volume 3 weeks on top for Third Eye Blind?" }, { "role": "assistant", "content": "SELECT \"volume_issue\" FROM \"rpm_singles_chart_january_2000_november_\" WHERE \"weeks_on_top\"='3' AND \"artist\"='third eye blind';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rpm_singles_chart_january_2000_november_\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the name of the artist of \" bang bang boom \"?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"rpm_singles_chart_january_2000_november_\" WHERE \"song\"='\\\" bang bang boom \\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rpm_singles_chart_january_2000_november_\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the song name with a Volume:Issue was 70:8-9?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"rpm_singles_chart_january_2000_november_\" WHERE \"volume_issue\"='70:8-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"music_videos\" (\n \"year\" real,\n \"music_video\" text,\n \"length\" text,\n \"album\" text,\n \"official_mv_on_you_tube\" text\n);\n\nQuestion: What was the music video that was from the album High Society, with a length of 3:50?" }, { "role": "assistant", "content": "SELECT \"music_video\" FROM \"music_videos\" WHERE \"album\"='high society' AND \"length\"='3:50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"music_videos\" (\n \"year\" real,\n \"music_video\" text,\n \"length\" text,\n \"album\" text,\n \"official_mv_on_you_tube\" text\n);\n\nQuestion: Which music video was from the album Map of the Human Soul?" }, { "role": "assistant", "content": "SELECT \"music_video\" FROM \"music_videos\" WHERE \"album\"='map of the human soul';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg when team 2 was Cementarnica?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"eighth_finals\" WHERE \"team_2\"='cementarnica';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"fastest_laps\" real\n);\n\nQuestion: What are the total number of podiums for more than 4 laps, and less than 149 races?" }, { "role": "assistant", "content": "SELECT COUNT(\"podiums\") FROM \"by_seasons_and_teams\" WHERE \"fastest_laps\">4 AND \"races\"<149;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was the score for the golfer from the country of fiji?" }, { "role": "assistant", "content": "SELECT COUNT(\"score\") FROM \"first_round\" WHERE \"country\"='fiji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was the score of the golfer from the united states who had a To par of e?" }, { "role": "assistant", "content": "SELECT SUM(\"score\") FROM \"first_round\" WHERE \"to_par\"='e' AND \"country\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which united states player finished with a place of t10?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"country\"='united states' AND \"place\"='t10';" } ]
[ { "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 label uses the stereo LP for catalog scyl-934,623?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='stereo lp' AND \"catalog\"='scyl-934,623';" } ]
[ { "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: On what date was the catalog cy-24623 for New Zealand?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='new zealand' AND \"catalog\"='cy-24623';" } ]
[ { "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: On what date was the catalog scyl-934,623 for Australia?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='scyl-934,623' AND \"region\"='australia';" } ]
[ { "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 label has a catalog of y8hr 1006 in 1972?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='y8hr 1006' AND \"date\"='1972';" } ]
[ { "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 uses the stereo compact cassette format?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='stereo compact cassette';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the average game that has December 6 as the date?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"date\"='december 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the average game that has December 17 as the date?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"date\"='december 17';" } ]
[ { "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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the average Total that had the Silver of 0, and the Rank of 6, and the Gold smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"silver\"=0 AND \"rank\"='6' AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the highest Gold that has the Bronze larger than 3, and the Total smaller than 24?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"bronze\">3 AND \"total\"<24;" } ]
[ { "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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the highest Gold that has the Bronze smaller than 1, and the Total larger than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"bronze\"<1 AND \"total\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_3_total_number_of_available_human_\" (\n \"region\" text,\n \"physician_gp_specialist\" real,\n \"physician_population_ratio\" text,\n \"health_officer\" real,\n \"ho_population_ratio\" text,\n \"all_nurses\" real,\n \"nurse_population_ratio\" text,\n \"mid_wives\" text,\n \"mid_wife_population_ratio\" text,\n \"hew\" text\n);\n\nQuestion: What is the number of nurses in the region with an HO : Population Ratio of 1:16,791?" }, { "role": "assistant", "content": "SELECT AVG(\"all_nurses\") FROM \"table_3_total_number_of_available_human_\" WHERE \"ho_population_ratio\"='1:16,791';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_3_total_number_of_available_human_\" (\n \"region\" text,\n \"physician_gp_specialist\" real,\n \"physician_population_ratio\" text,\n \"health_officer\" real,\n \"ho_population_ratio\" text,\n \"all_nurses\" real,\n \"nurse_population_ratio\" text,\n \"mid_wives\" text,\n \"mid_wife_population_ratio\" text,\n \"hew\" text\n);\n\nQuestion: What is the number of physicians in the region with an all nurses number of 91?" }, { "role": "assistant", "content": "SELECT MIN(\"physician_gp_specialist\") FROM \"table_3_total_number_of_available_human_\" WHERE \"all_nurses\"=91;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is Moving, when Type is \"Transfer\", and when Name is \"Andy Webster\"?" }, { "role": "assistant", "content": "SELECT \"moving_from\" FROM \"in\" WHERE \"type\"='transfer' AND \"name\"='andy webster';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What is Moving From, when Ends is before 2011?" }, { "role": "assistant", "content": "SELECT \"moving_from\" FROM \"in\" WHERE \"ends\"<2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What was the category that sheridan smith was nominated for in 2011?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"year\"=2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What ward was she nominated at for her work, Flare Path for the category of best featured actress in a play?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"nominated_work\"='flare path' AND \"category\"='best featured actress in a play';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the result for the nomination at the Laurence Olivier award in 2009 for best actress in a musical?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"category\"='best actress in a musical' AND \"award\"='laurence olivier award' AND \"year\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest attendance when the Atlanta Falcons were the opponent?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='atlanta falcons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"escorts\" (\n \"name\" text,\n \"class\" text,\n \"navy\" text,\n \"date_joined\" text,\n \"date_departed\" text\n);\n\nQuestion: What's the departed date for Grimsby Class Sloop?" }, { "role": "assistant", "content": "SELECT \"date_departed\" FROM \"escorts\" WHERE \"class\"='grimsby class sloop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"escorts\" (\n \"name\" text,\n \"class\" text,\n \"navy\" text,\n \"date_joined\" text,\n \"date_departed\" text\n);\n\nQuestion: What's the departed date that the HMS Leith of the Royal Navy?" }, { "role": "assistant", "content": "SELECT \"date_departed\" FROM \"escorts\" WHERE \"navy\"='royal navy' AND \"name\"='hms leith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"escorts\" (\n \"name\" text,\n \"class\" text,\n \"navy\" text,\n \"date_joined\" text,\n \"date_departed\" text\n);\n\nQuestion: What's the class of the HMS Fowey?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"escorts\" WHERE \"name\"='hms fowey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"escorts\" (\n \"name\" text,\n \"class\" text,\n \"navy\" text,\n \"date_joined\" text,\n \"date_departed\" text\n);\n\nQuestion: What's the class of the HMS Heartsease?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"escorts\" WHERE \"name\"='hms heartsease';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Record that has the Game larger than 15, and the Opponent of edmonton oilers?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">15 AND \"opponent\"='edmonton oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Score that has the Date of 11/17/1979?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='11/17/1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Opponent that has the Record of 7-7-1?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='7-7-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 \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Score that has the Opponent of at edmonton oilers?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='at edmonton oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Date thay has the Reocrd of 9-10-2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='9-10-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What is the finishing position for the person who had a grid of 3?" }, { "role": "assistant", "content": "SELECT \"fin_pos\" FROM \"classification\" WHERE \"grid\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which team had car number 15?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"classification\" WHERE \"car_no\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What is the number of laps completed by the car in grid 10?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"classification\" WHERE \"grid\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"fin_pos\" text,\n \"car_no\" text,\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: Which driver earned 32 points from the Andretti Green team?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"team\"='andretti green' AND \"points\"='32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"launch_history\" (\n \"date\" text,\n \"time_gmt\" text,\n \"serial\" text,\n \"apogee\" text,\n \"outcome\" text\n);\n\nQuestion: What is the date for the 10b serial?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"launch_history\" WHERE \"serial\"='10b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average_1\" real,\n \"points_2\" real\n);\n\nQuestion: What team has less than 64 goals against, 101 goals for, and a Points 2 total of 63?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"final_table\" WHERE \"goals_against\"<64 AND \"points_2\"=63 AND \"goals_for\"=101;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average_1\" real,\n \"points_2\" real\n);\n\nQuestion: What is the Points 2 average of teams that have played more than 46 games?" }, { "role": "assistant", "content": "SELECT AVG(\"points_2\") FROM \"final_table\" WHERE \"played\">46;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgian_alphabets\" (\n \"asomtavruli\" text,\n \"nuskhuri\" text,\n \"mkhedruli\" text,\n \"letter_name\" text,\n \"phoneme\" text\n);\n\nQuestion: What is the Mkhedruli symbol for the Asomtavruli \u2d12?" }, { "role": "assistant", "content": "SELECT \"mkhedruli\" FROM \"georgian_alphabets\" WHERE \"asomtavruli\"='\u2d12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgian_alphabets\" (\n \"asomtavruli\" text,\n \"nuskhuri\" text,\n \"mkhedruli\" text,\n \"letter_name\" text,\n \"phoneme\" text\n);\n\nQuestion: What is the letter name for the Asomtavruli \u2d19?" }, { "role": "assistant", "content": "SELECT \"letter_name\" FROM \"georgian_alphabets\" WHERE \"asomtavruli\"='\u2d19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgian_alphabets\" (\n \"asomtavruli\" text,\n \"nuskhuri\" text,\n \"mkhedruli\" text,\n \"letter_name\" text,\n \"phoneme\" text\n);\n\nQuestion: What is the Phoneme symbol for \u2d25 in Nuskhuri?" }, { "role": "assistant", "content": "SELECT \"phoneme\" FROM \"georgian_alphabets\" WHERE \"nuskhuri\"='\u2d25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgian_alphabets\" (\n \"asomtavruli\" text,\n \"nuskhuri\" text,\n \"mkhedruli\" text,\n \"letter_name\" text,\n \"phoneme\" text\n);\n\nQuestion: What is the Phoneme symbol for the letter name z\u025bn?" }, { "role": "assistant", "content": "SELECT \"phoneme\" FROM \"georgian_alphabets\" WHERE \"letter_name\"='z\u025bn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"georgian_alphabets\" (\n \"asomtavruli\" text,\n \"nuskhuri\" text,\n \"mkhedruli\" text,\n \"letter_name\" text,\n \"phoneme\" text\n);\n\nQuestion: What is teh Nuskhuri symbol for \u2d0b in Asomtavruli?" }, { "role": "assistant", "content": "SELECT \"nuskhuri\" FROM \"georgian_alphabets\" WHERE \"asomtavruli\"='\u2d0b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average value for Pick #, when Position is Linebacker, when Player is Bob Bruenig, and when Round is less than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"pick_num\") FROM \"nfl_draft\" WHERE \"position\"='linebacker' AND \"player\"='bob bruenig' AND \"round\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of Pick #, when Position is Guard, and when Round is greater than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"nfl_draft\" WHERE \"position\"='guard' AND \"round\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average Round, when Pick # is greater than 70, and when Position is Tackle?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"pick_num\">70 AND \"position\"='tackle';" } ]