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 \"fleet\" (\n \"type\" text,\n \"owns\" text,\n \"length\" text,\n \"delivery_date\" text,\n \"gross_tonnage\" real\n);\n\nQuestion: with delivery date of 2001 2001 what is the owns?"
},
{
"role": "assistant",
"content": "SELECT \"owns\" FROM \"fleet\" WHERE \"delivery_date\"='2001 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"type\" text,\n \"owns\" text,\n \"length\" text,\n \"delivery_date\" text,\n \"gross_tonnage\" real\n);\n\nQuestion: with delivery date of 2001 2001 what is gross tonnage?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gross_tonnage\") FROM \"fleet\" WHERE \"delivery_date\"='2001 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fleet\" (\n \"type\" text,\n \"owns\" text,\n \"length\" text,\n \"delivery_date\" text,\n \"gross_tonnage\" real\n);\n\nQuestion: with delivery date 1997 1997 what is the owns?"
},
{
"role": "assistant",
"content": "SELECT \"owns\" FROM \"fleet\" WHERE \"delivery_date\"='1997 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real,\n \"nickname\" text,\n \"present_conference\" text\n);\n\nQuestion: Which conference does the school from Gainesville, Florida, play in?"
},
{
"role": "assistant",
"content": "SELECT \"present_conference\" FROM \"see_also\" WHERE \"location\"='gainesville, florida';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real,\n \"nickname\" text,\n \"present_conference\" text\n);\n\nQuestion: What is the number of enrollments for teams named the Buccaneers founded before 1911?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"see_also\" WHERE \"nickname\"='buccaneers' AND \"founded\"<1911;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date\" text,\n \"title\" text,\n \"origin\" text,\n \"label_cat_no\" text,\n \"chart_no\" real\n);\n\nQuestion: What is the highest chart number for the song Yardbirds aka Roger the Engineer?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"chart_no\") FROM \"studio_albums\" WHERE \"title\"='yardbirds aka roger the engineer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date\" text,\n \"title\" text,\n \"origin\" text,\n \"label_cat_no\" text,\n \"chart_no\" real\n);\n\nQuestion: What is the average chart number for 11/1965?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"chart_no\") FROM \"studio_albums\" WHERE \"date\"='11/1965';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date\" text,\n \"title\" text,\n \"origin\" text,\n \"label_cat_no\" text,\n \"chart_no\" real\n);\n\nQuestion: What is origin country for a title that charted at 52?"
},
{
"role": "assistant",
"content": "SELECT \"origin\" FROM \"studio_albums\" WHERE \"chart_no\"=52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the Record of the Game after 40 with New York Rangers as Opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"game\">40 AND \"opponent\"='new york rangers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: When did Adam Thompson play in the final?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='adam thompson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: When was the Lagos tournament?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"tournament\"='lagos';"
}
] |
[
{
"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 was the score against the phillies on may 24?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='phillies' AND \"date\"='may 24';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Opponent of new england patriots had what attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='new england patriots';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Attendance of 55,340 had what opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='55,340';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Week smaller than 4, and a Game Site of rca dome, and a Opponent of new england patriots involves what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<4 AND \"game_site\"='rca dome' AND \"opponent\"='new england patriots';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Record of 0\u20138 had what result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"record\"='0\u20138';"
}
] |
[
{
"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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Record of 0\u20138 had what lowest week?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"record\"='0\u20138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when the visitor was pittsburgh?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"visitor\"='pittsburgh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the decision on November 26?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"regular_season\" WHERE \"date\"='november 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_individual_rankings\" (\n \"location_state_city\" text,\n \"usn_2013\" real,\n \"bw_2013\" real,\n \"forbes_2011\" real,\n \"ec_2013\" real,\n \"ft_2011\" real,\n \"ae_2011\" real,\n \"cnn_2011\" real,\n \"bi_2013\" real,\n \"arwu_2012\" real\n);\n\nQuestion: What is the BW 2013 ranking of Washington, D.C., which has an ARWU 2012 ranking greater than 51?"
},
{
"role": "assistant",
"content": "SELECT \"bw_2013\" FROM \"current_individual_rankings\" WHERE \"arwu_2012\">51 AND \"location_state_city\"='washington, d.c.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_individual_rankings\" (\n \"location_state_city\" text,\n \"usn_2013\" real,\n \"bw_2013\" real,\n \"forbes_2011\" real,\n \"ec_2013\" real,\n \"ft_2011\" real,\n \"ae_2011\" real,\n \"cnn_2011\" real,\n \"bi_2013\" real,\n \"arwu_2012\" real\n);\n\nQuestion: What is the USN 2013 ranking with a BW 2013 ranking less than 1000, a Forbes 2011 ranking larger than 17, and a CNN 2011 ranking less than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"usn_2013\") FROM \"current_individual_rankings\" WHERE \"bw_2013\"<1000 AND \"forbes_2011\">17 AND \"cnn_2011\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_individual_rankings\" (\n \"location_state_city\" text,\n \"usn_2013\" real,\n \"bw_2013\" real,\n \"forbes_2011\" real,\n \"ec_2013\" real,\n \"ft_2011\" real,\n \"ae_2011\" real,\n \"cnn_2011\" real,\n \"bi_2013\" real,\n \"arwu_2012\" real\n);\n\nQuestion: What is the average AE 2011 ranking with a Forbes 2011 ranking of 24 and a FT 2011 ranking less than 44?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ae_2011\") FROM \"current_individual_rankings\" WHERE \"forbes_2011\"=24 AND \"ft_2011\"<44;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_individual_rankings\" (\n \"location_state_city\" text,\n \"usn_2013\" real,\n \"bw_2013\" real,\n \"forbes_2011\" real,\n \"ec_2013\" real,\n \"ft_2011\" real,\n \"ae_2011\" real,\n \"cnn_2011\" real,\n \"bi_2013\" real,\n \"arwu_2012\" real\n);\n\nQuestion: What is the average ARWU 2012 ranking of Illinois, Champaign, which has a USN 2013 ranking less than 91 and an EC 2013 ranking larger than 1000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"arwu_2012\") FROM \"current_individual_rankings\" WHERE \"usn_2013\"<91 AND \"location_state_city\"='illinois, champaign' AND \"ec_2013\">1000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_individual_rankings\" (\n \"location_state_city\" text,\n \"usn_2013\" real,\n \"bw_2013\" real,\n \"forbes_2011\" real,\n \"ec_2013\" real,\n \"ft_2011\" real,\n \"ae_2011\" real,\n \"cnn_2011\" real,\n \"bi_2013\" real,\n \"arwu_2012\" real\n);\n\nQuestion: What is the average BW 2013 ranking of Texas, Fort Worth, which has an AE 2011 ranking of 1000 and an FT 2011 ranking less than 1000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bw_2013\") FROM \"current_individual_rankings\" WHERE \"ae_2011\"=1000 AND \"location_state_city\"='texas, fort worth' AND \"ft_2011\"<1000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"nfl_recap\" text\n);\n\nQuestion: Who did they play at lincoln financial field at 8:30 (ET) after week 14?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"week\">14 AND \"game_site\"='lincoln financial field' AND \"time_et\"='8:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"commune\" text,\n \"area_km_2\" real,\n \"2002_population\" real,\n \"density_km_2\" real,\n \"government_website\" text\n);\n\nQuestion: What is the density for the area that is larger than 4,015.6 and a population smaller than 6,178?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"density_km_2\") FROM \"administration\" WHERE \"area_km_2\">'4,015.6' AND \"2002_population\"<'6,178';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administration\" (\n \"commune\" text,\n \"area_km_2\" real,\n \"2002_population\" real,\n \"density_km_2\" real,\n \"government_website\" text\n);\n\nQuestion: What is the density that has an area smaller than 2,200.2 and a population larger than 2,599?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"density_km_2\") FROM \"administration\" WHERE \"area_km_2\"<'2,200.2' AND \"2002_population\">'2,599';"
}
] |
[
{
"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 rank for nations with fewer than 0 gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"medal_table\" WHERE \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" 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 bronze medals with more than 1 medal total and fewer than 1 silver medal?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"total\">1 AND \"silver\"<1;"
}
] |
[
{
"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 rank of a nation with fewer than 0 silver medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"medal_table\" WHERE \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Bats have a First of josh, and Throws of r, and a Surname of cakebread?"
},
{
"role": "assistant",
"content": "SELECT \"bats\" FROM \"player_roster\" WHERE \"first\"='josh' AND \"throws\"='r' AND \"surname\"='cakebread';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which DOB has Throws of r, and a Position of c, and a First of torey?"
},
{
"role": "assistant",
"content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"throws\"='r' AND \"position\"='c' AND \"first\"='torey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which DOB has a Surname of cresswell?"
},
{
"role": "assistant",
"content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"surname\"='cresswell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which DOB has Bats of r, and Throws of r, and a Position of rhp, and a First of john?"
},
{
"role": "assistant",
"content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"bats\"='r' AND \"throws\"='r' AND \"position\"='rhp' AND \"first\"='john';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Position did Ruzic play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"player_roster\" WHERE \"surname\"='ruzic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: How many throws did Torey have?"
},
{
"role": "assistant",
"content": "SELECT \"throws\" FROM \"player_roster\" WHERE \"first\"='torey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: Which Ties is the highest one that has Losses smaller than 9, and Starts of 26, and Wins smaller than 21?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ties\") FROM \"most_starts\" WHERE \"losses\"<9 AND \"starts\"=26 AND \"wins\"<21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: Which Win % has a Name of tony rice, and Wins smaller than 28?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"win_pct\") FROM \"most_starts\" WHERE \"name\"='tony rice' AND \"wins\"<28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: Which Wins have a Win % smaller than 0.8270000000000001, and a Name of rick mirer, and Ties smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"most_starts\" WHERE \"win_pct\"<0.8270000000000001 AND \"name\"='rick mirer' AND \"ties\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: How many Losses have a Name of blair kiel?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"most_starts\" WHERE \"name\"='blair kiel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: Which Losses have a Name of jimmy clausen?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"most_starts\" WHERE \"name\"='jimmy clausen';"
}
] |
[
{
"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 is the number of attendance on june 24"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"date\"='june 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stanley_cup_final\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: Attendance larger than 17,001, and a Date of june 15 had what decision?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"stanley_cup_final\" WHERE \"attendance\">'17,001' AND \"date\"='june 15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stanley_cup_final\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: Home of dallas happened on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stanley_cup_final\" WHERE \"home\"='dallas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stanley_cup_final\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: Home of buffalo happened on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stanley_cup_final\" WHERE \"home\"='buffalo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stanley_cup_final\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: Visitor of dallas, and a Date of june 12 had what highest attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"stanley_cup_final\" WHERE \"visitor\"='dallas' AND \"date\"='june 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_indoor\" (\n \"pos\" real,\n \"mark\" text,\n \"athlete\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: On which date was the position less than 4 at Piraeus?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men_indoor\" WHERE \"pos\"<4 AND \"venue\"='piraeus';"
}
] |
[
{
"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: Which team had 64 laps and 13 points?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race\" WHERE \"laps\"=64 AND \"points\"=13;"
}
] |
[
{
"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 did the team with a time/retired of +1.906 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"time_retired\"='+1.906';"
}
] |
[
{
"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 time/retired of the team with a grid of 14?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=14;"
}
] |
[
{
"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 lowest grid of pkv racing, which had 13 points and less than 64 laps?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"team\"='pkv racing' AND \"points\"=13 AND \"laps\"<64;"
}
] |
[
{
"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 total grid of the team with a time/retired of +7.346?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"time_retired\"='+7.346';"
}
] |
[
{
"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 of pkv racing with the driver oriol servi\u00e0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"team\"='pkv racing' AND \"driver\"='oriol servi\u00e0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: When Cancelable of yes, bubble of yes and a Category of keyboard, what was the Attribute?"
},
{
"role": "assistant",
"content": "SELECT \"attribute\" FROM \"microsoft_specific_events\" WHERE \"cancelable\"='yes' AND \"bubbles\"='yes' AND \"category\"='keyboard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: When Bubbles of no, and a Category of miscellaneous, and a Type of propertychange, what was the Cancelable?"
},
{
"role": "assistant",
"content": "SELECT \"cancelable\" FROM \"microsoft_specific_events\" WHERE \"bubbles\"='no' AND \"category\"='miscellaneous' AND \"type\"='propertychange';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: When Type was rowexit what was the Category?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"microsoft_specific_events\" WHERE \"type\"='rowexit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: When Cancelable of yes, and a Type of drag, what was the Category?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"microsoft_specific_events\" WHERE \"cancelable\"='yes' AND \"type\"='drag';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: When Event has Bubbles of yes, Cancelable of yes, Category of mouse, and a Type of contextmenu what is the Attribute?"
},
{
"role": "assistant",
"content": "SELECT \"attribute\" FROM \"microsoft_specific_events\" WHERE \"bubbles\"='yes' AND \"cancelable\"='yes' AND \"category\"='mouse' AND \"type\"='contextmenu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"microsoft_specific_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Let's say Type is of datasetcomplete, what is the Attribute?"
},
{
"role": "assistant",
"content": "SELECT \"attribute\" FROM \"microsoft_specific_events\" WHERE \"type\"='datasetcomplete';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the name of the parish that has a former local authority of St Neots urban district?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"former_local_authority\"='st neots urban district';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What district is the parish who had the South Cambridgeshire rural district as the former local authority?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"former_local_authority\"='south cambridgeshire rural district';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What district is St Martin's Without parish in with a population less than 75?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"population\"<75 AND \"name\"='st martin''s without';"
}
] |
[
{
"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\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the home team when FK kom were the guests?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"schedule\" WHERE \"guest\"='fk kom';"
}
] |
[
{
"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\" text,\n \"attendance\" real\n);\n\nQuestion: What venue was the match against the guest team, FK ibar, played at?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"schedule\" WHERE \"guest\"='fk ibar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"date\" text,\n \"venue\" text\n);\n\nQuestion: What's the Score with a Home of Scotland and Date of 24 February?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"results\" WHERE \"home\"='scotland' AND \"date\"='24 february';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What round was john sutro, tackle, drafter with a pick lower than 79?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"nfl_draft\" WHERE \"position\"='tackle' AND \"player\"='john sutro' AND \"pick\"<79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What pick was roger holdinsky?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"nfl_draft\" WHERE \"player\"='roger holdinsky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: When was chuck morris, back, drafted?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='back' AND \"player\"='chuck morris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What wss the average round drafted for xavier players?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"school\"='xavier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" text,\n \"urban_sub_area\" text,\n \"population\" text,\n \"status\" text,\n \"council_area\" text\n);\n\nQuestion: What is the urban sub-area with an East Dunbartonshire council area and a population of 19,020?"
},
{
"role": "assistant",
"content": "SELECT \"urban_sub_area\" FROM \"references\" WHERE \"council_area\"='east dunbartonshire' AND \"population\"='19,020';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" text,\n \"urban_sub_area\" text,\n \"population\" text,\n \"status\" text,\n \"council_area\" text\n);\n\nQuestion: What is the council area for the Larkhall urban sub-area?"
},
{
"role": "assistant",
"content": "SELECT \"council_area\" FROM \"references\" WHERE \"urban_sub_area\"='larkhall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" text,\n \"urban_sub_area\" text,\n \"population\" text,\n \"status\" text,\n \"council_area\" text\n);\n\nQuestion: What is the population of the East Kilbride urban sub-area?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"references\" WHERE \"urban_sub_area\"='east kilbride';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" text,\n \"urban_sub_area\" text,\n \"population\" text,\n \"status\" text,\n \"council_area\" text\n);\n\nQuestion: Which urban sub-area has a population of 16,140?"
},
{
"role": "assistant",
"content": "SELECT \"urban_sub_area\" FROM \"references\" WHERE \"population\"='16,140';"
}
] |
[
{
"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 is the record of the cubs on July 19?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='july 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score during the game that had more than 12,194 people in attendance and a record of 53-32?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'12,194' AND \"record\"='53-32';"
}
] |
[
{
"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: What nationality is Northwood School (N.Y.)?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='northwood school (n.y.)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What are incumbent William Vandever's results?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"california\" WHERE \"incumbent\"='william vandever';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Who was the first person elected from Democratic GAIN?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"result\"='democratic gain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What was the result for incumbent Joseph McKenna who was first elected in 1884?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"california\" WHERE \"first_elected\"='1884' AND \"incumbent\"='joseph mckenna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"california\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: When was republican incumbent Joseph McKenna first elected?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"california\" WHERE \"party\"='republican' AND \"incumbent\"='joseph mckenna';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1992\" text\n);\n\nQuestion: what is the lowest capacity in grodno"
},
{
"role": "assistant",
"content": "SELECT MIN(\"capacity\") FROM \"teams_and_venues\" WHERE \"location\"='grodno';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has January larger than 18 and a Record of 35\u201315\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"january\">18 AND \"record\"='35\u201315\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: How many starts are associated with an oldsmobile engine, 21 finishes and before 2001?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"start\") FROM \"indianapolis_500_results\" WHERE \"engine\"='oldsmobile' AND \"finish\"=21 AND \"year\"<2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What was the finish associated with under 11 starts, a honda engine, before 2003?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"finish\") FROM \"indianapolis_500_results\" WHERE \"start\"<11 AND \"engine\"='honda' AND \"year\"<2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: what is the director of la ronde"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1960s\" WHERE \"original_title\"='la ronde';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest number of people attending the game on May 30 with Colorado as the visitors?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"western_conference_finals\" WHERE \"visitor\"='colorado' AND \"date\"='may 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest number of people attending the game where Colorado was the home team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"western_conference_finals\" WHERE \"home\"='colorado';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score of the game on May 26?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"western_conference_finals\" WHERE \"date\"='may 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the lowest round that Adam Wiesel was picked?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nhl_entry_draft\" WHERE \"player\"='adam wiesel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_entry_draft\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What college, junior, or club team did defence player Rory Fitzpatrick play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"nhl_entry_draft\" WHERE \"position\"='defence' AND \"player\"='rory fitzpatrick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_margin_of_innings_victory\" (\n \"score\" text,\n \"opposition\" text,\n \"venue\" text,\n \"city\" text,\n \"year\" real\n);\n\nQuestion: What was the score for 1911?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"largest_margin_of_innings_victory\" WHERE \"year\"=1911;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what country has tiger woods"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='tiger woods';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what country has a score of 69-70-72=211?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='69-70-72=211';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what player scored 69-72-68=209?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='69-72-68=209';"
}
] |
[
{
"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 is the largest number for earnings for tom watson when ranked more than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"earnings\") FROM \"leaders\" WHERE \"player\"='tom watson' AND \"rank\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"willingen\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which 1st (m) is the lowest one that has a Nationality of aut, and Points larger than 273.5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1st_m\") FROM \"willingen\" WHERE \"nationality\"='aut' AND \"points\">273.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"willingen\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which 2nd (m) is the lowest one that has a Rank larger than 3, and a 1st (m) larger than 140.5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"2nd_m\") FROM \"willingen\" WHERE \"rank\">3 AND \"1st_m\">140.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"willingen\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which 2nd (m) has an Overall WC points (Rank) of 1632 (1), and Points larger than 273.5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2nd_m\") FROM \"willingen\" WHERE \"overall_wc_points_rank\"='1632 (1)' AND \"points\">273.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What is the highest number of wins associated with under 0 poles?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"career_summary\" WHERE \"poles\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many poles did he have in 2006 with under 2 wins?"
},
{
"role": "assistant",
"content": "SELECT \"poles\" FROM \"career_summary\" WHERE \"season\"='2006' AND \"wins\"<2;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.