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 \"grand_prix_singles_tournament_timeline\" (\n \"tournament\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the 1989 result for the tournament that had a 1983 and 1987 result of A?" }, { "role": "assistant", "content": "SELECT \"1989\" FROM \"grand_prix_singles_tournament_timeline\" WHERE \"1983\"='a' AND \"1987\"='a';" } ]
[ { "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 result fot the UFC 85 event?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 85';" } ]
[ { "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: In which location did the Meca World Vale Tudo 6 event happen?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='meca world vale tudo 6';" } ]
[ { "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 his record at the AFC: Brazil 1 event that went 3 rounds?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='3' AND \"event\"='afc: brazil 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: Which country has Anselmo Da Silva in lane 2?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"semifinals\" WHERE \"lane\"<2 AND \"name\"='anselmo da silva';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the heat number at 7.63, and a reaction less than 0.229?" }, { "role": "assistant", "content": "SELECT COUNT(\"heat\") FROM \"semifinals\" WHERE \"mark\"='7.63' AND \"react\"<0.229;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 verb meaning when part 2 is band?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"english\" WHERE \"part_2\"='band';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 verb meaning when the part 2 is bl\u0113ot?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"english\" WHERE \"part_2\"='bl\u0113ot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 when the class is 6?" }, { "role": "assistant", "content": "SELECT \"part_2\" FROM \"english\" WHERE \"class\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 class when the verb meaning is to nourish, to grow?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"english\" WHERE \"verb_meaning\"='to nourish, to grow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 when the Verb meaning is to gather?" }, { "role": "assistant", "content": "SELECT \"part_3\" FROM \"english\" WHERE \"verb_meaning\"='to gather';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english\" (\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 Verb meaning when part 1 is alan?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"english\" WHERE \"part_1\"='alan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance for matches where the home team was vida?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"round_5\" WHERE \"home\"='vida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the home team during the match where there were 2709 in attendance?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"round_5\" WHERE \"attendance\"=2709;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What is the sum of the attendance where the score was 1:1?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"round_5\" WHERE \"score\"='1: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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Where did montreal visit with more than 24 points and 14,995 attendees?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"game_log\" WHERE \"attendance\">'14,995' AND \"points\">24 AND \"visitor\"='montreal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: How many ties occurred with a score of 2\u20132?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"second_round_proper\" WHERE \"score\"='2\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the home team when Preston North End is the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"away_team\"='preston north end';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school/club did the player who layed shooting guard attend?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"w\" WHERE \"position\"='shooting guard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school/club did gerald wilkins attend?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"w\" WHERE \"player\"='gerald wilkins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What are the years when the grizzlies had a point guard who attended the school/club Florida?" }, { "role": "assistant", "content": "SELECT \"years_for_grizzlies\" FROM \"w\" WHERE \"position\"='point guard' AND \"school_club_team\"='florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What are the years when the grizzles had a player who attended UCLA?" }, { "role": "assistant", "content": "SELECT \"years_for_grizzlies\" FROM \"w\" WHERE \"school_club_team\"='ucla';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What are the years when the grizzles had a player who attended Villanova?" }, { "role": "assistant", "content": "SELECT \"years_for_grizzlies\" FROM \"w\" WHERE \"school_club_team\"='villanova';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"w\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position did the person who was with the grizzlies in 1998-1999 play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"w\" WHERE \"years_for_grizzlies\"='1998-1999';" } ]
[ { "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: What is the date of the game when the opponent is the Cleveland Browns?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='cleveland browns';" } ]
[ { "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: What is the result of the game when the attendance is 62,078?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='62,078';" } ]
[ { "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: What is the result of the game when the attendance is 75,466?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='75,466';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the genitive for the ergative shen?" }, { "role": "assistant", "content": "SELECT \"genitive\" FROM \"pronouns\" WHERE \"ergative\"='shen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the instrumental for the dative shen?" }, { "role": "assistant", "content": "SELECT \"instrumental\" FROM \"pronouns\" WHERE \"dative\"='shen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the adverbial for the nominative me?" }, { "role": "assistant", "content": "SELECT \"adverbial\" FROM \"pronouns\" WHERE \"nominative\"='me';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the ergative for the dative chven?" }, { "role": "assistant", "content": "SELECT \"ergative\" FROM \"pronouns\" WHERE \"dative\"='chven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the ergative for the genitive tkven(s)?" }, { "role": "assistant", "content": "SELECT \"ergative\" FROM \"pronouns\" WHERE \"genitive\"='tkven(s)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pronouns\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What is the ergative for the dative (i)mas?" }, { "role": "assistant", "content": "SELECT \"ergative\" FROM \"pronouns\" WHERE \"dative\"='(i)mas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ezra_ezra_t_130_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"front_side_bus\" text,\n \"multiplier\" text,\n \"voltage\" text,\n \"socket\" text\n);\n\nQuestion: What is the Front Side Bus for Model Number c3 850?" }, { "role": "assistant", "content": "SELECT \"front_side_bus\" FROM \"ezra_ezra_t_130_nm\" WHERE \"model_number\"='c3 850';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ezra_ezra_t_130_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"front_side_bus\" text,\n \"multiplier\" text,\n \"voltage\" text,\n \"socket\" text\n);\n\nQuestion: What is the Frequency for Model Number c3 850?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"ezra_ezra_t_130_nm\" WHERE \"model_number\"='c3 850';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ezra_ezra_t_130_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"front_side_bus\" text,\n \"multiplier\" text,\n \"voltage\" text,\n \"socket\" text\n);\n\nQuestion: Which Model number has a Front Side Bus of 100mhz, a L2-Cache of 64kib and a Multiplier of 8.5\u00d7?" }, { "role": "assistant", "content": "SELECT \"model_number\" FROM \"ezra_ezra_t_130_nm\" WHERE \"front_side_bus\"='100mhz' AND \"l2_cache\"='64kib' AND \"multiplier\"='8.5\u00d7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ezra_ezra_t_130_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"front_side_bus\" text,\n \"multiplier\" text,\n \"voltage\" text,\n \"socket\" text\n);\n\nQuestion: What is the Voltage for Model Number c3 866?" }, { "role": "assistant", "content": "SELECT \"voltage\" FROM \"ezra_ezra_t_130_nm\" WHERE \"model_number\"='c3 866';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winners\" text,\n \"finalists\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is Finalists, when Tournament is Miami?" }, { "role": "assistant", "content": "SELECT \"finalists\" FROM \"doubles\" WHERE \"tournament\"='miami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winners\" text,\n \"finalists\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is Tournament, when Week is November 23?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles\" WHERE \"week\"='november 23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winners\" text,\n \"finalists\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is Semifinalists, when Tournament is Rome" }, { "role": "assistant", "content": "SELECT \"semifinalists\" FROM \"doubles\" WHERE \"tournament\"='rome';" } ]
[ { "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 \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What rank were the Buckeyes when there were 68,586 in attendance?" }, { "role": "assistant", "content": "SELECT \"rank_num\" FROM \"schedule\" WHERE \"attendance\"='68,586';" } ]
[ { "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 \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What date was the game when 40,000 attended?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='40,000';" } ]
[ { "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 \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What date was the game when 45,943 attended?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='45,943';" } ]
[ { "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 \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent that played against the Buckeyes on October 17?" }, { "role": "assistant", "content": "SELECT \"opponentnum\" FROM \"schedule\" WHERE \"date\"='october 17';" } ]
[ { "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 \"opponentnum\" text,\n \"rank_num\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result of the game played when 22,555 were in attendance and the Buckeyes were ranked #1?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"rank_num\"='1' AND \"attendance\"='22,555';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_atlanta_dream\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"new_wnba_team\" text,\n \"former_wnba_team\" text,\n \"college_country_team\" text\n);\n\nQuestion: What Player is from Connecticut?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2008_atlanta_dream\" WHERE \"college_country_team\"='connecticut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the highest position of the team having played under 10 matches?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"relegation_round\" WHERE \"played\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of played values for teams with more than 14 points and more than 1 draw?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"relegation_round\" WHERE \"points\">14 AND \"drawn\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of positions having points over 2, more than 4 losses, and under 10 matches played?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"relegation_round\" WHERE \"points\">2 AND \"lost\">4 AND \"played\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"televotes\" real,\n \"rank\" real\n);\n\nQuestion: WHich Televotes has a Performer of biljana dodeva, and a Draw larger than 10?" }, { "role": "assistant", "content": "SELECT MIN(\"televotes\") FROM \"references\" WHERE \"performer\"='biljana dodeva' AND \"draw\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"televotes\" real,\n \"rank\" real\n);\n\nQuestion: Name the highest Draw which has a Rank of 14, and a Televotes larger than 908?" }, { "role": "assistant", "content": "SELECT MAX(\"draw\") FROM \"references\" WHERE \"rank\"=14 AND \"televotes\">908;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"televotes\" real,\n \"rank\" real\n);\n\nQuestion: Name the lowest Televotes which has monika sokolovska and a Rank larger than 15?" }, { "role": "assistant", "content": "SELECT MIN(\"televotes\") FROM \"references\" WHERE \"performer\"='monika sokolovska' AND \"rank\">15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"televotes\" real,\n \"rank\" real\n);\n\nQuestion: Name the lowest Draw which has a Performer of kaliopi and a Televotes larger than 3834?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"references\" WHERE \"performer\"='kaliopi' AND \"televotes\">3834;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Total, when Player is \"Hale Irwin\"?" }, { "role": "assistant", "content": "SELECT \"total\" FROM \"missed_the_cut\" WHERE \"player\"='hale irwin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when Country is \"United States\", and when To Par is \"WD\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"to_par\"='wd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when Total is \"154\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"total\"='154';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Player, when Country is \"United States\", and when Total is \"154\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"total\"='154';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when To Par is \"+11\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\"='+11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Player is \"Hale Irwin\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"player\"='hale irwin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest interview score for Missouri, where the swimsuit score was highter than 9.433?" }, { "role": "assistant", "content": "SELECT MIN(\"interview\") FROM \"final_competition_score\" WHERE \"country\"='missouri' AND \"swimsuit\">9.433;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of Preliminary scores where the interview score is 9.654 and the average score is lower than 9.733?" }, { "role": "assistant", "content": "SELECT SUM(\"preliminary\") FROM \"final_competition_score\" WHERE \"interview\"=9.654 AND \"average\"<9.733;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of Swimsuit scores where the average score is 9.733 and the interview score is higher than 9.654?" }, { "role": "assistant", "content": "SELECT SUM(\"swimsuit\") FROM \"final_competition_score\" WHERE \"average\"=9.733 AND \"interview\">9.654;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of Evening Gown scores where the swimsuit score is higher than 9.4 and the average score is lower than 9.733?" }, { "role": "assistant", "content": "SELECT SUM(\"evening_gown\") FROM \"final_competition_score\" WHERE \"swimsuit\">9.4 AND \"average\"<9.733;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest average score where the evening gown score was 8.811?" }, { "role": "assistant", "content": "SELECT MIN(\"average\") FROM \"final_competition_score\" WHERE \"evening_gown\"=8.811;" } ]
[ { "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: For a team with a goals against less than 58, a position of 10, and a points 2 more than 53, what is the average lost?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"final_table\" WHERE \"goals_against\"<58 AND \"position\"=10 AND \"points_2\">53;" } ]
[ { "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: For a team having goals for more than 95, what is the lowest position?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"final_table\" WHERE \"goals_for\">95;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"grade\" text,\n \"description\" text,\n \"measurement\" text,\n \"function_pct\" text,\n \"estimated_function_pct\" real\n);\n\nQuestion: What is the function percentage when the estimated function percentage is 20?" }, { "role": "assistant", "content": "SELECT \"function_pct\" FROM \"references\" WHERE \"estimated_function_pct\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"grade\" text,\n \"description\" text,\n \"measurement\" text,\n \"function_pct\" text,\n \"estimated_function_pct\" real\n);\n\nQuestion: What is the measurement where the estimated function % is less than 20?" }, { "role": "assistant", "content": "SELECT \"measurement\" FROM \"references\" WHERE \"estimated_function_pct\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"grade\" text,\n \"description\" text,\n \"measurement\" text,\n \"function_pct\" text,\n \"estimated_function_pct\" real\n);\n\nQuestion: What is the estimated function % when the measurement is 8/8?" }, { "role": "assistant", "content": "SELECT \"estimated_function_pct\" FROM \"references\" WHERE \"measurement\"='8/8';" } ]
[ { "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\" real,\n \"money\" text\n);\n\nQuestion: What place did jacky cupit take when his To par was under 13?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"to_par\"<13 AND \"player\"='jacky cupit';" } ]
[ { "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\" real,\n \"money\" text\n);\n\nQuestion: Which united states player had a To par of 12?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"to_par\"=12 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 \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: Which player had a To par of 13?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"to_par\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What did vijay singh score with a +5 to par?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"to_par\"='+5' AND \"player\"='vijay singh';" } ]
[ { "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 was the average rank for south africa when they had more than 8 silver medals?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"medal_table\" WHERE \"nation\"='south africa' AND \"silver\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of gold medals the netherlands got when they had more than 4 bronze medals?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='netherlands' AND \"bronze\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the gold medals for the nation of Great britain who had more than 8 silvers and a total of less than 61 medals?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"silver\">8 AND \"nation\"='great britain' AND \"total\"<61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of bronze medals that israel acheived when they got less than 3 silver medals?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='israel' AND \"silver\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals when the team got 2 bronze and more than 5 silver medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=2 AND \"silver\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is Partner, when Surface is Hard, and when Score is 6\u20133, 7\u20136(0)?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_5_2_3\" WHERE \"surface\"='hard' AND \"score\"='6\u20133, 7\u20136(0)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is Opponents, when Partner is Vitalia Diatchenko?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"doubles_5_2_3\" WHERE \"partner\"='vitalia diatchenko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is Partner, when Outcome is Winner, and when Date is 12 October 2003?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_5_2_3\" WHERE \"outcome\"='winner' AND \"date\"='12 october 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is Opponents, when Partner is Mervana Jugi\u0107-Salki\u0107?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"doubles_5_2_3\" WHERE \"partner\"='mervana jugi\u0107-salki\u0107';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes_played\" real,\n \"minutes_played_per_game\" real,\n \"rebounds\" real,\n \"rebounds_per_game\" real,\n \"assists\" real,\n \"assists_per_game\" real,\n \"field_goal_pct\" real,\n \"free_throw_pct\" real,\n \"points\" real,\n \"points_per_game\" real\n);\n\nQuestion: What is the total number of Field Goal %, when Free Throw % is greater than 0.5, when Rebounds is 159, and when Points Per Game is less than 7.1?" }, { "role": "assistant", "content": "SELECT COUNT(\"field_goal_pct\") FROM \"player_stats\" WHERE \"free_throw_pct\">0.5 AND \"rebounds\"=159 AND \"points_per_game\"<7.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes_played\" real,\n \"minutes_played_per_game\" real,\n \"rebounds\" real,\n \"rebounds_per_game\" real,\n \"assists\" real,\n \"assists_per_game\" real,\n \"field_goal_pct\" real,\n \"free_throw_pct\" real,\n \"points\" real,\n \"points_per_game\" real\n);\n\nQuestion: What is the lowest Minutes Played Per Game, when Rebounds is less than 347, when Assists is greater than 5, and when Minutes Played is less than 301?" }, { "role": "assistant", "content": "SELECT MIN(\"minutes_played_per_game\") FROM \"player_stats\" WHERE \"rebounds\"<347 AND \"assists\">5 AND \"minutes_played\"<301;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes_played\" real,\n \"minutes_played_per_game\" real,\n \"rebounds\" real,\n \"rebounds_per_game\" real,\n \"assists\" real,\n \"assists_per_game\" real,\n \"field_goal_pct\" real,\n \"free_throw_pct\" real,\n \"points\" real,\n \"points_per_game\" real\n);\n\nQuestion: What is the lowest Minutes Played, when Rebounds is 25, and when Field Goal % is less than \"0.315\"?" }, { "role": "assistant", "content": "SELECT MIN(\"minutes_played\") FROM \"player_stats\" WHERE \"rebounds\"=25 AND \"field_goal_pct\"<0.315;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"games_played\" real,\n \"minutes_played\" real,\n \"minutes_played_per_game\" real,\n \"rebounds\" real,\n \"rebounds_per_game\" real,\n \"assists\" real,\n \"assists_per_game\" real,\n \"field_goal_pct\" real,\n \"free_throw_pct\" real,\n \"points\" real,\n \"points_per_game\" real\n);\n\nQuestion: What is the average Rebounds, when Minutes Played is \"113\", and when Games Played is greater than \"18\"?" }, { "role": "assistant", "content": "SELECT AVG(\"rebounds\") FROM \"player_stats\" WHERE \"minutes_played\"=113 AND \"games_played\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the score on March 17?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"date\"='march 17';" } ]
[ { "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: Which event led to a loss against Josh Diekman?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"opponent\"='josh diekman';" } ]
[ { "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: Which location led to a decision and a record of 1-2?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='decision' AND \"record\"='1-2';" } ]
[ { "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: Which method took place against Chris Herring?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='chris herring';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest number of laps that max biaggi rode on a grid larger than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='max biaggi' AND \"grid\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest grid that tetsuya harada rode in?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"moto_gp_classification\" WHERE \"rider\"='tetsuya harada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average number of laps that were made when the race took a time of +48.325?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='+48.325';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the total number of laps during the race that had a time of +9.682?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='+9.682';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest Pick, when College is \"Syracuse\", and when Overall is less than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='syracuse' AND \"overall\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Position, when College is \"Houston\"?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"college\"='houston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"introduction_of_address_classes\" (\n \"class\" text,\n \"leading_bits\" real,\n \"size_of_network_number_bit_field\" text,\n \"size_of_rest_bit_field\" text,\n \"number_of_networks\" text,\n \"addresses_per_network\" text,\n \"start_address\" text,\n \"end_address\" text\n);\n\nQuestion: What is the number of networks when the size of rest bit field is 8?" }, { "role": "assistant", "content": "SELECT \"number_of_networks\" FROM \"introduction_of_address_classes\" WHERE \"size_of_rest_bit_field\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"introduction_of_address_classes\" (\n \"class\" text,\n \"leading_bits\" real,\n \"size_of_network_number_bit_field\" text,\n \"size_of_rest_bit_field\" text,\n \"number_of_networks\" text,\n \"addresses_per_network\" text,\n \"start_address\" text,\n \"end_address\" text\n);\n\nQuestion: What is the start address when the network number bit field is 16?" }, { "role": "assistant", "content": "SELECT \"start_address\" FROM \"introduction_of_address_classes\" WHERE \"size_of_network_number_bit_field\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"introduction_of_address_classes\" (\n \"class\" text,\n \"leading_bits\" real,\n \"size_of_network_number_bit_field\" text,\n \"size_of_rest_bit_field\" text,\n \"number_of_networks\" text,\n \"addresses_per_network\" text,\n \"start_address\" text,\n \"end_address\" text\n);\n\nQuestion: What is the end address for the Class E (Reserved)?" }, { "role": "assistant", "content": "SELECT \"end_address\" FROM \"introduction_of_address_classes\" WHERE \"class\"='class e (reserved)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"introduction_of_address_classes\" (\n \"class\" text,\n \"leading_bits\" real,\n \"size_of_network_number_bit_field\" text,\n \"size_of_rest_bit_field\" text,\n \"number_of_networks\" text,\n \"addresses_per_network\" text,\n \"start_address\" text,\n \"end_address\" text\n);\n\nQuestion: What is the size of the rest bit field when the leading bits are more than 110 and the start address is 224.0.0.0?" }, { "role": "assistant", "content": "SELECT \"size_of_rest_bit_field\" FROM \"introduction_of_address_classes\" WHERE \"leading_bits\">110 AND \"start_address\"='224.0.0.0';" } ]