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 \"receiving\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: How many yards did Davin Meggett have with more than 9 Rec.?" }, { "role": "assistant", "content": "SELECT SUM(\"yards\") FROM \"receiving\" WHERE \"player\"='davin meggett' AND \"rec\">9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: What is Darrius Heyward-Bey's average with more than 20 yards and less than 80 long?" }, { "role": "assistant", "content": "SELECT COUNT(\"avg\") FROM \"receiving\" WHERE \"yards\">20 AND \"player\"='darrius heyward-bey' AND \"long\"<80;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: How many points are associated with a Time/Retired of +10.131 secs?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"race\" WHERE \"time_retired\"='+10.131 secs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the grid associated witha Time/Retired of +8.180 secs, and under 47 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"time_retired\"='+8.180 secs' AND \"laps\"<47;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_league_table\" (\n \"season\" text,\n \"order\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"penalties\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" real,\n \"coach\" text\n);\n\nQuestion: What is the highest drawn for points over 545?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"top_league_table\" WHERE \"points_for\">545;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_league_table\" (\n \"season\" text,\n \"order\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"penalties\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" real,\n \"coach\" text\n);\n\nQuestion: What's the average loss when the points were 545?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"top_league_table\" WHERE \"points_for\"=545;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_league_table\" (\n \"season\" text,\n \"order\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"penalties\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" real,\n \"coach\" text\n);\n\nQuestion: How many games were lost when the order was 2nd and the play was more than 13" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"top_league_table\" WHERE \"order\"='2nd' AND \"played\">13;" } ]
[ { "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: Name the least rank with bronze of 2, gold more than 0 and nation of ynys m\u00f4n/anglesey with total more than 8" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"medal_table\" WHERE \"bronze\"=2 AND \"gold\">0 AND \"nation\"='ynys m\u00f4n/anglesey' AND \"total\">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: Name the least total with rank less than 7, gold more than 16 and bronze less than 29" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"rank\"<7 AND \"gold\">16 AND \"bronze\"<29;" } ]
[ { "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: Name the total number of total with silver of 6, bronze more than 5 and gold less than 4" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\"=6 AND \"bronze\">5 AND \"gold\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What score has a game greater than 11 on October 30?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"game\">11 AND \"october\"=30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What October has 0-2-2 as the record?" }, { "role": "assistant", "content": "SELECT \"october\" FROM \"schedule_and_results\" WHERE \"record\"='0-2-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What average game has @ florida panthers as the opponent, 0-1-2 as the record, with an october greater than 8?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='@ florida panthers' AND \"record\"='0-1-2' AND \"october\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_nations_cup_all_time_table_2000\" (\n \"champs\" real,\n \"games\" real,\n \"draw\" real,\n \"lost\" real,\n \"win_lose_percentage\" text\n);\n\nQuestion: Which Lost has Games of 64, and Champs smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"european_nations_cup_all_time_table_2000\" WHERE \"games\"=64 AND \"champs\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_nations_cup_all_time_table_2000\" (\n \"champs\" real,\n \"games\" real,\n \"draw\" real,\n \"lost\" real,\n \"win_lose_percentage\" text\n);\n\nQuestion: Which Draw is the lowest one that has Champs smaller than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"draw\") FROM \"european_nations_cup_all_time_table_2000\" WHERE \"champs\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_nations_cup_all_time_table_2000\" (\n \"champs\" real,\n \"games\" real,\n \"draw\" real,\n \"lost\" real,\n \"win_lose_percentage\" text\n);\n\nQuestion: Which Win/Lose Percentage has Champs larger than 0, and a Draw larger than 3?" }, { "role": "assistant", "content": "SELECT \"win_lose_percentage\" FROM \"european_nations_cup_all_time_table_2000\" WHERE \"champs\">0 AND \"draw\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_nations_cup_all_time_table_2000\" (\n \"champs\" real,\n \"games\" real,\n \"draw\" real,\n \"lost\" real,\n \"win_lose_percentage\" text\n);\n\nQuestion: Which Champs is the average one that has a Draw larger than 2, and Games smaller than 60?" }, { "role": "assistant", "content": "SELECT AVG(\"champs\") FROM \"european_nations_cup_all_time_table_2000\" WHERE \"draw\">2 AND \"games\"<60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the launch date for the Ushio dd-54?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"type_ii\" WHERE \"name\"='ushio dd-54';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: Which name has a Kanji of \u6727?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"type_ii\" WHERE \"kanji\"='\u6727';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_ii\" (\n \"kanji\" text,\n \"name\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the Kanji for the Ayanami dd-45?" }, { "role": "assistant", "content": "SELECT \"kanji\" FROM \"type_ii\" WHERE \"name\"='ayanami dd-45';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"interval_size\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text\n);\n\nQuestion: size (steps) that has a size (cents) of 58.54, and a just ratio of 28:27, and a just (cents) larger than 62.96 is what total number?" }, { "role": "assistant", "content": "SELECT COUNT(\"size_steps\") FROM \"interval_size\" WHERE \"size_cents\"=58.54 AND \"just_ratio\"='28:27' AND \"just_cents\">62.96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"interval_size\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text\n);\n\nQuestion: size (steps) of 15, and a just (cents) larger than 435.08 is what highest size (cents)?" }, { "role": "assistant", "content": "SELECT MAX(\"size_cents\") FROM \"interval_size\" WHERE \"size_steps\"=15 AND \"just_cents\">435.08;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"interval_size\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text\n);\n\nQuestion: ratio of 16:13 has how many highest size (steps)?" }, { "role": "assistant", "content": "SELECT MAX(\"size_steps\") FROM \"interval_size\" WHERE \"just_ratio\"='16:13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"interval_size\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text\n);\n\nQuestion: ratio of 15:14, and a just (cents) larger than 119.44 is what average size (cents)?" }, { "role": "assistant", "content": "SELECT AVG(\"size_cents\") FROM \"interval_size\" WHERE \"just_ratio\"='15:14' AND \"just_cents\">119.44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"venue\" text,\n \"home\" text,\n \"guest\" text,\n \"score_first_match\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the home team for the match at Stadion pod Vrmcem?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"schedule\" WHERE \"venue\"='stadion pod vrmcem';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"venue\" text,\n \"home\" text,\n \"guest\" text,\n \"score_first_match\" text,\n \"attendance\" real\n);\n\nQuestion: Who were the guest team wehn the match score was 3:0 (0:2)?" }, { "role": "assistant", "content": "SELECT \"guest\" FROM \"schedule\" WHERE \"score_first_match\"='3:0 (0:2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mpeg_2_profiles\" (\n \"abbr\" text,\n \"name\" text,\n \"picture_coding_types\" text,\n \"chroma_format\" text,\n \"aspect_ratios\" text,\n \"scalable_modes\" text,\n \"intra_dc_precision\" text\n);\n\nQuestion: What Picture Coding Types have Chroma Format of 4:2:2 or 4:2:0 and the Name of 4:2:2 profile?" }, { "role": "assistant", "content": "SELECT \"picture_coding_types\" FROM \"mpeg_2_profiles\" WHERE \"chroma_format\"='4:2:2 or 4:2:0' AND \"name\"='4:2:2 profile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mpeg_2_profiles\" (\n \"abbr\" text,\n \"name\" text,\n \"picture_coding_types\" text,\n \"chroma_format\" text,\n \"aspect_ratios\" text,\n \"scalable_modes\" text,\n \"intra_dc_precision\" text\n);\n\nQuestion: Name the Intra DC Precision that has the Name main profile?" }, { "role": "assistant", "content": "SELECT \"intra_dc_precision\" FROM \"mpeg_2_profiles\" WHERE \"name\"='main profile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mpeg_2_profiles\" (\n \"abbr\" text,\n \"name\" text,\n \"picture_coding_types\" text,\n \"chroma_format\" text,\n \"aspect_ratios\" text,\n \"scalable_modes\" text,\n \"intra_dc_precision\" text\n);\n\nQuestion: What Chroma Format that has both Picture Coding Types of i, p, b, and the Name of main profile?" }, { "role": "assistant", "content": "SELECT \"chroma_format\" FROM \"mpeg_2_profiles\" WHERE \"picture_coding_types\"='i, p, b' AND \"name\"='main profile';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_of_the_week\" (\n \"week\" text,\n \"division\" text,\n \"team\" text,\n \"player\" text,\n \"school\" text\n);\n\nQuestion: What Player is from the west Division and the Team of special teams and is from the School Toledo Western Michigan?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"players_of_the_week\" WHERE \"division\"='west' AND \"team\"='special teams' AND \"school\"='toledo western michigan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What are the lowest wins for Australia?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"country\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What was the highest rank for greg norman with Earnings less than $10,484,065?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"player\"='greg norman' AND \"earnings\"<'10,484,065';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: how many wins did players earning less than $10,484,065 have?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"leaders\" WHERE \"earnings\"<'10,484,065';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_lg_as\" (\n \"name\" text,\n \"council_seat\" text,\n \"formed\" real,\n \"population_2010\" real,\n \"area\" text,\n \"website\" text\n);\n\nQuestion: What is the name of the metropolitan that has a population larger than 35,082 and formed after 1897?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"metropolitan_lg_as\" WHERE \"population_2010\">'35,082' AND \"formed\">1897;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_club\" (\n \"team\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: How many winners did Minas, which has 0 third places, have?" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"by_club\" WHERE \"third_place\"='0' AND \"team\"='minas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_club\" (\n \"team\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: How many winners did Halcones uv xalapa have?" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"by_club\" WHERE \"team\"='halcones uv xalapa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_club\" (\n \"team\" text,\n \"winners\" text,\n \"runners_up\" text,\n \"third_place\" text,\n \"fourth_place\" text\n);\n\nQuestion: How many runners-up did Espartanos de Margarita have?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"by_club\" WHERE \"team\"='espartanos de margarita';" } ]
[ { "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 \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: Which Opponent has Attendances of 60,594?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='60,594';" } ]
[ { "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 \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: When has a Result of l 27-7 and an Opponent of at minnesota vikings?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='l 27-7' AND \"opponent\"='at minnesota vikings';" } ]
[ { "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 \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: When has a Week of 9?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=9;" } ]
[ { "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 \"time_et\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What date did the Steelers play against the New York Jets?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='new york jets';" } ]
[ { "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 \"time_et\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What time did the game start during week 1?" }, { "role": "assistant", "content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"week\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: How many laps for mi-jack conquest racing when they went off course?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"race\" WHERE \"team\"='mi-jack conquest racing' AND \"time_retired\"='off course';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: How many laps are associated with a grid greater than 8, under 11 points, and will power?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\">8 AND \"points\"<11 AND \"driver\"='will power';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the Women's doubles the year that there was no competition in both the Men's doubles and the Men's singles?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"men_s_doubles\"='no competition' AND \"men_s_singles\"='no competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What year was there no competition in Women's singles?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"past_winners\" WHERE \"women_s_singles\"='no competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the Women's doubles in 2001?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"year\"='2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the Women's doubles the year that there was no competition in the Men's doubles and Arthur Chatschatourow won the Men's singles?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"men_s_doubles\"='no competition' AND \"men_s_singles\"='arthur chatschatourow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_summary\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the average Bronze when silver is more than 3, gold is more than 1 and the total is 14" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medals_summary\" WHERE \"gold\">1 AND \"total\"=14 AND \"silver\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_summary\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the total number of total for rank of 7 and bronze less than 1" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medals_summary\" WHERE \"rank\"='7' AND \"bronze\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_summary\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the most silver with bronze more than 1 and gold more than 1 with total less than 7" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medals_summary\" WHERE \"bronze\">1 AND \"total\"<7 AND \"gold\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_summary\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the sum of total for gold less than 1 and bronze of 3" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medals_summary\" WHERE \"gold\"<1 AND \"bronze\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_summary\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the total number of bronze with rank of 5 and silver more than 1" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medals_summary\" WHERE \"rank\"='5' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"administrative_division\" text,\n \"area_km\" real,\n \"population_2000_census\" real,\n \"population_2010_census\" real,\n \"population_density_2010_km\" real\n);\n\nQuestion: What is the total population from the 2000 census for the municipality that has a 464.5 square km area and a population density in 2010 larger than 1840?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2000_census\") FROM \"municipalities\" WHERE \"area_km\"=464.5 AND \"population_density_2010_km\">1840;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"administrative_division\" text,\n \"area_km\" real,\n \"population_2000_census\" real,\n \"population_2010_census\" real,\n \"population_density_2010_km\" real\n);\n\nQuestion: What was the sum of the population in 2010 for the division of japeri with an area of 82.9 squared km?" }, { "role": "assistant", "content": "SELECT SUM(\"population_2010_census\") FROM \"municipalities\" WHERE \"administrative_division\"='japeri' AND \"area_km\"<82.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game against Atlanta?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"november\" WHERE \"visitor\"='atlanta';" } ]
[ { "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: In the 1936 summer Olympics what was the date of a match that ended with a score of 6-1?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='1936 summer olympics' AND \"score\"='6-1';" } ]
[ { "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 was the score for the game that had an end result of 5-2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='5-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_italy\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of losses that have 1 draw and games over 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"world_championship_group_b_italy\" WHERE \"drawn\"=1 AND \"games\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many rounds had a pick number of more than 10 and Appalachian State as a college?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">10 AND \"college\"='appalachian state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the largest overall where the position was linebacker and the pick number was more than 9?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='linebacker' AND \"pick_num\">9;" } ]
[ { "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 Score of the game earlier than 69 with a record of 4\u201356?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"<69 AND \"record\"='4\u201356';" } ]
[ { "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 with a score of 116\u2013138?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"score\"='116\u2013138';" } ]
[ { "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 Score of the game against the boston celtics?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='boston celtics';" } ]
[ { "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 held on february 9?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"game_log\" WHERE \"date\"='february 9';" } ]
[ { "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 Score of the game larger than 57 with a Record of 4\u201355?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\">57 AND \"record\"='4\u201355';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_grand_crus\" (\n \"grand_cru\" text,\n \"region\" text,\n \"village\" text,\n \"wine_style\" text,\n \"vineyard_surface_2010\" text\n);\n\nQuestion: Which Reigon has a Village of Chassagne-Montrachet?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"list_of_grand_crus\" WHERE \"village\"='chassagne-montrachet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_grand_crus\" (\n \"grand_cru\" text,\n \"region\" text,\n \"village\" text,\n \"wine_style\" text,\n \"vineyard_surface_2010\" text\n);\n\nQuestion: Which Village has a Region of C\u00f4te De Nuits, Wine Styles of Red Wine, and a Grand Cru of Latrici\u00e8res-Chambertin?" }, { "role": "assistant", "content": "SELECT \"village\" FROM \"list_of_grand_crus\" WHERE \"region\"='c\u00f4te de nuits' AND \"wine_style\"='red wine' AND \"grand_cru\"='latrici\u00e8res-chambertin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_grand_crus\" (\n \"grand_cru\" text,\n \"region\" text,\n \"village\" text,\n \"wine_style\" text,\n \"vineyard_surface_2010\" text\n);\n\nQuestion: What is the Vineyeard surface (2010) with a Village of Gevrey-Chambertin, and Grand Cru of Latrici\u00e8res-Chambertin?" }, { "role": "assistant", "content": "SELECT \"vineyard_surface_2010\" FROM \"list_of_grand_crus\" WHERE \"village\"='gevrey-chambertin' AND \"grand_cru\"='latrici\u00e8res-chambertin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_grand_crus\" (\n \"grand_cru\" text,\n \"region\" text,\n \"village\" text,\n \"wine_style\" text,\n \"vineyard_surface_2010\" text\n);\n\nQuestion: What is the Grand Cru with a Wine Style of Red Wine and Village of Gevrey-Chambertin?" }, { "role": "assistant", "content": "SELECT \"grand_cru\" FROM \"list_of_grand_crus\" WHERE \"wine_style\"='red wine' AND \"village\"='gevrey-chambertin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the average pick number of Pennsylvania?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"draft_picks\" WHERE \"school_club_team\"='pennsylvania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the school/club team of the player with a pick larger than 83?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"draft_picks\" WHERE \"pick\">83;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the schoo/club team of the player in round 3?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"draft_picks\" WHERE \"round\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the lowest round of the player from UCLA?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"draft_picks\" 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 \"pga_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: When was \u201316 (62-71-71-68=272) the winning score?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pga_tour_wins_25\" WHERE \"winning_score\"='\u201316 (62-71-71-68=272)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the name of the tournament played on Jun 17, 1973?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_25\" WHERE \"date\"='jun 17, 1973';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_25\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Howard Twitty was the runner-up of what tournament?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"pga_tour_wins_25\" WHERE \"runner_s_up\"='howard twitty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Can you tell me the College/Junior/Club Team that has the Position of defence, and the Nationality of czechoslovakia?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"draft_picks\" WHERE \"position\"='defence' AND \"nationality\"='czechoslovakia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Can you tell me the Position that has the College/Junior/Club Team of hull olympiques (qmjhl)?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"college_junior_club_team\"='hull olympiques (qmjhl)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Can you tell me the Player that has the Round smaller than 6, and the College/Junior/Club Team of hull olympiques (qmjhl)?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"<6 AND \"college_junior_club_team\"='hull olympiques (qmjhl)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the Name of the Center?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"ncaa_consensus_all_american_team\" WHERE \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What Position has no College Hall of Fame?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"ncaa_consensus_all_american_team\" WHERE \"college_hall_of_fame\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What School has no no no Unanimously?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"ncaa_consensus_all_american_team\" WHERE \"unanimous\"='no no no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the School of the quarterback?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"ncaa_consensus_all_american_team\" WHERE \"position\"='quarterback';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What School is the Center from?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"ncaa_consensus_all_american_team\" WHERE \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the Unanimous of the Minnesota Southern California School?" }, { "role": "assistant", "content": "SELECT \"unanimous\" FROM \"ncaa_consensus_all_american_team\" WHERE \"school\"='minnesota southern california';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model_no\" text,\n \"gen\" text,\n \"released\" text,\n \"capacity\" text,\n \"cache\" text,\n \"interface\" text,\n \"feature_set\" text,\n \"sector_size\" text\n);\n\nQuestion: What is the Cache with a Capacity that is 600 gb?" }, { "role": "assistant", "content": "SELECT \"cache\" FROM \"models\" WHERE \"capacity\"='600 gb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which Position has a College/Junior/Club Team (League) of estevan bruins (wchl), and a Round of 3?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='estevan bruins (wchl)' AND \"round\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which Nationality has a Player of larry wright?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='larry wright';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What score has august 25 as the date?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='august 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_4\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the total number of episodes where jim sweeney was the 1st performer and steve steen was the 2nd performer?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"series_4\" WHERE \"performer_1\"='jim sweeney' AND \"performer_2\"='steve steen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_4\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the sum of the episode numbers where chip esten is the 4th performer and christopher smith was the 2nd performer?" }, { "role": "assistant", "content": "SELECT SUM(\"episode\") FROM \"series_4\" WHERE \"performer_4\"='chip esten' AND \"performer_2\"='christopher smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_4\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: What is the sum of the episodes where chip esten was the 4th performer and jim meskimen was the 1st performer?" }, { "role": "assistant", "content": "SELECT SUM(\"episode\") FROM \"series_4\" WHERE \"performer_4\"='chip esten' AND \"performer_1\"='jim meskimen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_4\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Who was the 3rd performer when christopher smith was the 2nd performer?" }, { "role": "assistant", "content": "SELECT \"performer_3\" FROM \"series_4\" WHERE \"performer_2\"='christopher smith';" } ]
[ { "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\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Record has a Time of 4:50?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:50';" } ]
[ { "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\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Event has a Resolution of loss, and a Record of 12\u20132?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='loss' AND \"record\"='12\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Drawn has a Difference of 14?" }, { "role": "assistant", "content": "SELECT AVG(\"drawn\") FROM \"torneio_rio_s_o_paulo\" WHERE \"difference\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Played has a Lost larger than 2, and a Team of am\u00e9rica?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"torneio_rio_s_o_paulo\" WHERE \"lost\">2 AND \"team\"='am\u00e9rica';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_51_indiana_0\" (\n \"player\" text,\n \"position\" text,\n \"starter\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What's the number of touchdowns that there are 0 field goals, less than 5 points, and had Joe Maddock playing?" }, { "role": "assistant", "content": "SELECT SUM(\"touchdowns\") FROM \"michigan_51_indiana_0\" WHERE \"field_goals\"=0 AND \"player\"='joe maddock' AND \"points\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: what is the class of w269ax" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"translators\" WHERE \"call_sign\"='w269ax';" } ]