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 \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: How many starts had an avg start of less than 37 and won $1,636,827?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"starts\") FROM \"nascar_sprint_cup_series\" WHERE \"winnings\"='$1,636,827' AND \"avg_start\"<37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: in 1990, how many wins had an avg finish of 35 and a start less than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"=35 AND \"year\"=1990 AND \"starts\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: What year had a pole smaller than 0 and in 77th position?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"nascar_sprint_cup_series\" WHERE \"position\"='77th' AND \"poles\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: in 2007, what is the avg finish that had a start less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_finish\") FROM \"nascar_sprint_cup_series\" WHERE \"year\"=2007 AND \"starts\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is Score, when Game is greater than 4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is High Points, when Game is \"3\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"game\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is Score, when Location Attendance is \"Madison Square Garden Unknown\", and when High Rebounds is \"Sidney Green (10)\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"location_attendance\"='madison square garden unknown' AND \"high_rebounds\"='sidney green (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is High Rebounds, when Location Attendance is \"Madison Square Garden Unknown\", and when Date is \"May 18\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"playoffs\" WHERE \"location_attendance\"='madison square garden unknown' AND \"date\"='may 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is Team, when Location Attendance is \"Madison Square Garden Unknown\", and when High Points is \"Alonzo Mourning (24)\"?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"location_attendance\"='madison square garden unknown' AND \"high_points\"='alonzo mourning (24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Points, when High Rebounds is \"Ron Artest (9)\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"high_rebounds\"='ron artest (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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when High Rebounds is \"Yao Ming (10)\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_rebounds\"='yao ming (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when High Points is \"Luis Scola (18)\", and when High Rebounds is \"Luis Scola (11)\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"high_points\"='luis scola (18)' AND \"high_rebounds\"='luis scola (11)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Team, when High Points is \"Tracy McGrady (24)\"?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_points\"='tracy mcgrady (24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What was the year of the finish with the class pos of 6th and laps smaller than 317?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"24_hours_of_le_mans_results\" WHERE \"class_pos\"='6th' AND \"laps\"<317;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record for the opponent Atlanta Hawks?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"march\" WHERE \"opponent\"='atlanta hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which opponent had a 113-124 score?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"march\" WHERE \"score\"='113-124';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the final record for the Philadelphia 76ers?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"march\" WHERE \"opponent\"='philadelphia 76ers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record for the Detroit Pistons on March 7?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"march\" WHERE \"opponent\"='detroit pistons' AND \"date\"='march 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the WR player?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"cfl_draft\" WHERE \"position\"='wr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"pavement\" text,\n \"length_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: What is the Length (m) of the Koppenberg course?"
},
{
"role": "assistant",
"content": "SELECT \"length_m\" FROM \"course\" WHERE \"name\"='koppenberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"pavement\" text,\n \"length_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: What is the Kilometer of the Berendries asphalt course with an Average climb less than 7 and Length (m) longer than 645?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"kilometer\") FROM \"course\" WHERE \"pavement\"='asphalt' AND \"length_m\">645 AND \"name\"='berendries' AND \"average_climb_pct\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"pavement\" text,\n \"length_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: What is the Number of the Koppenberg course with less than 195 Kilometers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number\") FROM \"course\" WHERE \"name\"='koppenberg' AND \"kilometer\"<195;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gothic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which part three is class 4?"
},
{
"role": "assistant",
"content": "SELECT \"part_3\" FROM \"gothic\" WHERE \"class\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gothic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which part one is class 7d?"
},
{
"role": "assistant",
"content": "SELECT \"part_1\" FROM \"gothic\" WHERE \"class\"='7d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gothic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which part 3 has class 7b?"
},
{
"role": "assistant",
"content": "SELECT \"part_3\" FROM \"gothic\" WHERE \"class\"='7b';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gothic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which class has a part 2 of halp war\u00fe?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"gothic\" WHERE \"part_2\"='halp war\u00fe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gothic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Which part 2 has a verb that means to leap?"
},
{
"role": "assistant",
"content": "SELECT \"part_2\" FROM \"gothic\" WHERE \"verb_meaning\"='to leap';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Who are the semifinalists when the tournament is in Cincinnati?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"singles\" WHERE \"tournament\"='cincinnati';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is the finalist in the week of March 12?"
},
{
"role": "assistant",
"content": "SELECT \"finalist\" FROM \"singles\" WHERE \"week\"='march 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What is the May 7 finalist?"
},
{
"role": "assistant",
"content": "SELECT \"finalist\" FROM \"singles\" WHERE \"week\"='may 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: For the week of August 6, who is the finalist?"
},
{
"role": "assistant",
"content": "SELECT \"finalist\" FROM \"singles\" WHERE \"week\"='august 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest Pick #, when College is \"Jackson State\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"nfl_draft\" WHERE \"college\"='jackson state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Pick #, when Round is \"10\"?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"nfl_draft\" WHERE \"round\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Player, when Round is greater than 8, when Pick # is greater than 234, and when College is \"Louisville\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\">8 AND \"pick_num\">234 AND \"college\"='louisville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average Round, when Player is \"Gurnest Brown\", and when Pick # is greater than 180?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"player\"='gurnest brown' AND \"pick_num\">180;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest Pick #, when College is \"Louisville\", and when Round is less than 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"nfl_draft\" WHERE \"college\"='louisville' AND \"round\"<10;"
}
] |
[
{
"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\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Class has a Frequency MHz larger than 91.7, and a Call sign of k272ec?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"translators\" WHERE \"frequency_m_hz\">91.7 AND \"call_sign\"='k272ec';"
}
] |
[
{
"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\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which Frequency MHz has a Call sign of k210dv?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"frequency_m_hz\") FROM \"translators\" WHERE \"call_sign\"='k210dv';"
}
] |
[
{
"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\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which City of license has a Frequency MHz larger than 89.5, and a Call sign of k213el?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"frequency_m_hz\">89.5 AND \"call_sign\"='k213el';"
}
] |
[
{
"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\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W has a Frequency MHz larger than 89.1, and a City of license of de queen, arkansas?"
},
{
"role": "assistant",
"content": "SELECT \"erp_w\" FROM \"translators\" WHERE \"frequency_m_hz\">89.1 AND \"city_of_license\"='de queen, arkansas';"
}
] |
[
{
"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\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which FCC info has a City of license of burley, idaho, and a Frequency MHz of 89.5?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"city_of_license\"='burley, idaho' AND \"frequency_m_hz\"=89.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: For the game played on 31 July 2007 on clay what was the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5\" WHERE \"surface\"='clay' AND \"date\"='31 july 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: When was Pablo And\u00fajar the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5\" WHERE \"opponent\"='pablo and\u00fajar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the decision when Buffalo was the visitor?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"game_log\" WHERE \"visitor\"='buffalo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who is the visiting team when Minnesota is the home team?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"home\"='minnesota';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the match when Phoenix is the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='phoenix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the quarterback for Arkansas State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"position\"='quarterback' AND \"college\"='arkansas state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total round of the 129 pick?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"nfl_draft\" WHERE \"pick_num\"=129;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record for January 19?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"date\"='january 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What record has the score 111-89?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"score\"='111-89';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record for January 7?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"date\"='january 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent on January 7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"january\" WHERE \"date\"='january 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What home team scored 102-87?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"score\"='102-87';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What venue had a Score of 120-108?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"score\"='120-108';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the score when Sydney Spirit was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_5\" WHERE \"home_team\"='sydney spirit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the score at North Shore Events Centre?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_5\" WHERE \"venue\"='north shore events centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What is the home team venue for the New Zealand Breakers?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"home_team\"='new zealand breakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who had the decision when the visitor was Detroit and the home team was Ottawa?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"game_log\" WHERE \"visitor\"='detroit' AND \"home\"='ottawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score on March 18?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='march 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the highest points on March 27?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='march 27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_larry_la_rocco\" text,\n \"republican_jim_risch\" text,\n \"lead_margin\" real\n);\n\nQuestion: Name the average Lead Margin on november 13-november 19, 2007?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lead_margin\") FROM \"opinion_polling_for_the_united_states_se\" WHERE \"dates_administered\"='november 13-november 19, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_larry_la_rocco\" text,\n \"republican_jim_risch\" text,\n \"lead_margin\" real\n);\n\nQuestion: Which Poll Source has a Republican Jim Risch of 43%?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"republican_jim_risch\"='43%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: For week 15, what was the total number of attendance recorded?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: what is the score when the home team is king's lynn?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='king''s lynn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: what is the home team when the away team is frickley colliery?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"first_round_proper\" WHERE \"away_team\"='frickley colliery';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: what is the tie no, on 24 november 1971 and the away team is king's lynn?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"date\"='24 november 1971' AND \"away_team\"='king''s lynn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lineae\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What is the Longitude of the 61.0s Latitude?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"lineae\" WHERE \"latitude\"='61.0s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lineae\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What name has a longitude of 213.0e?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"lineae\" WHERE \"longitude\"='213.0e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rides_and_attractions\" (\n \"name\" text,\n \"type\" text,\n \"themed_area\" text,\n \"manufacturer\" text,\n \"opened\" text\n);\n\nQuestion: Which type had an unknown manufacturer?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"rides_and_attractions\" WHERE \"manufacturer\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rides_and_attractions\" (\n \"name\" text,\n \"type\" text,\n \"themed_area\" text,\n \"manufacturer\" text,\n \"opened\" text\n);\n\nQuestion: What is the name of the dreamworks experience from Ferrari?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rides_and_attractions\" WHERE \"themed_area\"='dreamworks experience' AND \"manufacturer\"='ferrari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rides_and_attractions\" (\n \"name\" text,\n \"type\" text,\n \"themed_area\" text,\n \"manufacturer\" text,\n \"opened\" text\n);\n\nQuestion: Which type opened in 1982?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"rides_and_attractions\" WHERE \"opened\"='1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rides_and_attractions\" (\n \"name\" text,\n \"type\" text,\n \"themed_area\" text,\n \"manufacturer\" text,\n \"opened\" text\n);\n\nQuestion: What themed area opened in 2010 as an animal show?"
},
{
"role": "assistant",
"content": "SELECT \"themed_area\" FROM \"rides_and_attractions\" WHERE \"type\"='animal show' AND \"opened\"='2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which visitor lives in Minnesota?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"home\"='minnesota';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score on november 21?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='november 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who has the lead in the season where Cathrine Norberg is second and Anna Rindeskog is third?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"second\"='cathrine norberg' AND \"third\"='anna rindeskog';"
}
] |
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of game 21?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=21;"
}
] |
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game on December 22?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='december 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record when the game is greater than 24?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_list\" (\n \"rank\" text,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the highest Market Value (billion $), when Rank is 02 2, and when Sales (billion $) is greater than 113.1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"market_value_billion\") FROM \"2013_list\" WHERE \"rank\"='02 2' AND \"sales_billion\">113.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_list\" (\n \"rank\" text,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is Rank, when Headquarters is United Kingdom, and when Sales (billion $) is 370.9?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"2013_list\" WHERE \"headquarters\"='united kingdom' AND \"sales_billion\"=370.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_list\" (\n \"rank\" text,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the lowest Profits (billion $), when Market Value (billion $) is less than 201.3, when Headquarters is United States, and when Company is JPMorgan Chase?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"profits_billion\") FROM \"2013_list\" WHERE \"market_value_billion\"<201.3 AND \"headquarters\"='united states' AND \"company\"='jpmorgan chase';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the status of the community that has an area larger than 5.2 sq km, and a Census Ranking of 2,531 of 5,008?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"communities\" WHERE \"area_km_2\">5.2 AND \"census_ranking\"='2,531 of 5,008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is saint-andr\u00e9's population?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"communities\" WHERE \"official_name\"='saint-andr\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: what's the results of week 12?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What opponent has 76,202 attendance ?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='76,202';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_15_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" real,\n \"holmenkollen\" text\n);\n\nQuestion: What is the FIS Nordic World Ski Championship years when the winter Olympics took place in 1968?"
},
{
"role": "assistant",
"content": "SELECT \"fis_nordic_world_ski_championships\" FROM \"men_s_15_km\" WHERE \"winter_olympics\"=1968;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_15_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" real,\n \"holmenkollen\" text\n);\n\nQuestion: Which country has a FIS Nordic World Ski Championship before 1989, was in the winter Olympics before 1980, and has a Holmenkollen of 1956?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"men_s_15_km\" WHERE \"fis_nordic_world_ski_championships\"<1989 AND \"winter_olympics\"<1980 AND \"holmenkollen\"='1956';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: When the Grids is less than 2 what are the total laps?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"250cc_classification\" WHERE \"grid\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Player has a To par of \u20131?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"to_par\"='\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Player has a To par of \u20134?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"to_par\"='\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Place has a Score larger than 68, and a Player of david ogrin?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\">68 AND \"player\"='david ogrin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which Player has a Place of t2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"place\"='t2';"
}
] |
[
{
"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: What event did Mikhail Avetisyan win by method of DQ (eye gouging)?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='dq (eye gouging)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: For the item that has a Gecko of 'font', what is the KHTML value?"
},
{
"role": "assistant",
"content": "SELECT \"khtml\" FROM \"grammar_and_rules\" WHERE \"gecko\"='font';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: What is the Prince XML value for the engine that has a Gecko value of 'no' and webkit value of 'nightly build'?"
},
{
"role": "assistant",
"content": "SELECT \"prince_xml\" FROM \"grammar_and_rules\" WHERE \"gecko\"='no' AND \"web_kit\"='nightly build';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: What is the Gecko value for the item that has a Trident value of 'font'?"
},
{
"role": "assistant",
"content": "SELECT \"gecko\" FROM \"grammar_and_rules\" WHERE \"trident\"='font';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: What is the Gecko value for the item that has a Prince XML value of 'no' and a KHTML value of 'yes'?"
},
{
"role": "assistant",
"content": "SELECT \"gecko\" FROM \"grammar_and_rules\" WHERE \"prince_xml\"='yes' AND \"khtml\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: Which Trident version has a Gecko value of 19.0?"
},
{
"role": "assistant",
"content": "SELECT \"trident\" FROM \"grammar_and_rules\" WHERE \"gecko\"='19.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammar_and_rules\" (\n \"trident\" text,\n \"gecko\" text,\n \"web_kit\" text,\n \"khtml\" text,\n \"presto\" text,\n \"prince_xml\" text\n);\n\nQuestion: For the item with a Prince XML value of 'font', what is the WebKit value?"
},
{
"role": "assistant",
"content": "SELECT \"web_kit\" FROM \"grammar_and_rules\" WHERE \"prince_xml\"='font';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Which Played has a Team of cerro cor\u00e1, and Losses larger than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"torneo_apertura\" WHERE \"team\"='cerro cor\u00e1' AND \"losses\">4;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.