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 \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: With a To par of \u20132, what is Johnny Miller's Place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"to_par\"='\u20132' AND \"player\"='johnny miller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: From what Country is Gene Borek?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='gene borek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Country of the Player with a To par of \u20135?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"to_par\"='\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place of the Player from New Zealand?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"country\"='new zealand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place of the Player with a Score of 70-68=138?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='70-68=138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_game_results_by_team\" (\n \"appearances\" real,\n \"school\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" text,\n \"last_appearance\" text\n);\n\nQuestion: What is the highest Losses, when Wins is greater than 1, and when Last Appearance is 2003?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"championship_game_results_by_team\" WHERE \"wins\">1 AND \"last_appearance\"='2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_game_results_by_team\" (\n \"appearances\" real,\n \"school\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" text,\n \"last_appearance\" text\n);\n\nQuestion: What is the highest Wins, when Percent is 0.000, when School is Oklahoma State, and when Appearances is less than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"championship_game_results_by_team\" WHERE \"percent\"='0.000' AND \"school\"='oklahoma state' AND \"appearances\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_game_results_by_team\" (\n \"appearances\" real,\n \"school\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" text,\n \"last_appearance\" text\n);\n\nQuestion: What is the total number of Losses, when Last Appearance is 2003, and when Wins is greater than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"championship_game_results_by_team\" WHERE \"last_appearance\"='2003' AND \"wins\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_game_results_by_team\" (\n \"appearances\" real,\n \"school\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" text,\n \"last_appearance\" text\n);\n\nQuestion: What is Last Appearance, when Wins is less than 1, when Losses is 1, and when School is Oklahoma State?"
},
{
"role": "assistant",
"content": "SELECT \"last_appearance\" FROM \"championship_game_results_by_team\" WHERE \"wins\"<1 AND \"losses\"=1 AND \"school\"='oklahoma state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is College, when Pick is less than 145, and when Player is Jeff Wilkins?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"draft_picks\" WHERE \"pick\"<145 AND \"player\"='jeff wilkins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is Nationality, and when College is Illinois State?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college\"='illinois state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is Nationality, when Round is 6?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of Round, when College is Northern Illinois?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"college\"='northern illinois';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\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 bronze when the total is 2, silver is less than 1 and gold is more than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_count_by_country\" WHERE \"total\"=2 AND \"silver\"<1 AND \"gold\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\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 silver when the total is more than 20?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_count_by_country\" WHERE \"total\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\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 when the nation is united states (usa) and bronze is more than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"medal_count_by_country\" WHERE \"nation\"='united states (usa)' AND \"bronze\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\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 total when bronze is more than 0, gold is 0, the nation is united states (usa) and silver is 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_count_by_country\" WHERE \"bronze\">0 AND \"gold\"=0 AND \"nation\"='united states (usa)' AND \"silver\"<0;"
}
] |
[
{
"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);\n\nQuestion: What was the resolution for the fight against enrique guzman?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='enrique guzman';"
}
] |
[
{
"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);\n\nQuestion: What was the resolution of the fight when Nate Mohr's record was 8-6?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='8-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_team\" (\n \"rank\" real,\n \"club\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"third\" real\n);\n\nQuestion: What is the smallest number of third place earned for the Es Sahel at a rank less than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"third\") FROM \"winners_by_team\" WHERE \"club\"='es sahel' AND \"rank\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_by_team\" (\n \"rank\" real,\n \"club\" text,\n \"winners\" real,\n \"runners_up\" real,\n \"third\" real\n);\n\nQuestion: Which club has 1 runners-up with 0 winners and 2 third place earned?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"winners_by_team\" WHERE \"runners_up\"=1 AND \"winners\"=0 AND \"third\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_etropolitan_r_ailway_p_assenger_t_rans\" (\n \"line\" text,\n \"operator\" text,\n \"line_length_kilometres\" real,\n \"number_of_stations\" real,\n \"annual_ridership_1998\" real,\n \"annual_ridership_2008\" real\n);\n\nQuestion: Which Annual ridership (2008) has a Number of stations larger than 70, and an Annual ridership (1998) smaller than 451,971,849?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"annual_ridership_2008\") FROM \"m_etropolitan_r_ailway_p_assenger_t_rans\" WHERE \"number_of_stations\">70 AND \"annual_ridership_1998\"<'451,971,849';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kabaddi_world_cup\" (\n \"name\" text,\n \"only_point\" real,\n \"bonus\" real,\n \"catch_taken\" real,\n \"total_point\" real\n);\n\nQuestion: What is Name, when Bonus is greater than 1, when Only Point is greater than 7, and when Total Point is less than 21?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"kabaddi_world_cup\" WHERE \"bonus\">1 AND \"only_point\">7 AND \"total_point\"<21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kabaddi_world_cup\" (\n \"name\" text,\n \"only_point\" real,\n \"bonus\" real,\n \"catch_taken\" real,\n \"total_point\" real\n);\n\nQuestion: What is Name, when Only Point is greater than 1, when Catch Taken is greater than 3, when Bonus is greater than 4, and when Total Point is less than 30?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"kabaddi_world_cup\" WHERE \"only_point\">1 AND \"catch_taken\">3 AND \"bonus\">4 AND \"total_point\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many grids does Ducati have with Casey Stoner as a rider with fewer than 27 laps?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='ducati' AND \"rider\"='casey stoner' AND \"laps\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which manufacturer has a time of +10.142?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"time\"='+10.142';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is Loris Capirossi's time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"rider\"='loris capirossi';"
}
] |
[
{
"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);\n\nQuestion: What were the highest laps when the grid was larger than 19 and the time/retired was fuel?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\">19 AND \"time_retired\"='fuel';"
}
] |
[
{
"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);\n\nQuestion: Which team did Scott Pruett drive for when the grid was smaller than 20 and there were 65 laps?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race\" WHERE \"laps\"=65 AND \"grid\"<20 AND \"driver\"='scott pruett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"construction_details\" (\n \"br_no\" text,\n \"lot_no\" real,\n \"date\" real,\n \"built_at\" text,\n \"boiler_type\" text\n);\n\nQuestion: What year is the date when the boiler type is forward topfeed, the built at is Crewe, and lot number is less than 187?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"construction_details\" WHERE \"boiler_type\"='forward topfeed' AND \"built_at\"='crewe' AND \"lot_no\"<187;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the date of the game where Esteban Paredes scored 2 goals?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"goal\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest attendance when the opponent is the Los Angeles Rams and the week is less than 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='los angeles rams' AND \"week\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result when the week is greater than 7 and the Houston Oilers were the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">7 AND \"opponent\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"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 Record, when Location Attendance is \"Izod Center 16,911\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location_attendance\"='izod center 16,911';"
}
] |
[
{
"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 Rebounds, when High Assists is \"Delonte West (10)\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_assists\"='delonte west (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What catalog had an Epic Records label in CD format?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='epic records' AND \"format\"='cd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which label is in Australia?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"region\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"venue\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: The match that lasted 2:43 has what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"boxing_record\" WHERE \"time\"='2:43';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"venue\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: The match that was held at Club Med Sandpiper has what method?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"boxing_record\" WHERE \"venue\"='club med sandpiper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"venue\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: The match of at Michael's Eighth Avenue venue against Tim Coleman that went 3:00 has what record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"boxing_record\" WHERE \"time\"='3:00' AND \"venue\"='michael''s eighth avenue' AND \"opponent\"='tim coleman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"date\" text,\n \"result\" text,\n \"opponent\" text,\n \"venue\" text,\n \"location\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: What method did the match at Club Med Sandpiper have?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"boxing_record\" WHERE \"venue\"='club med sandpiper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label of the release with Catalog number LPM-2899?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='lpm-2899';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Date of the RCA release with Catalog number SF-7635?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='rca' AND \"catalog\"='sf-7635';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog of the RCA release?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='rca';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Catalog number of the CD Reissue Universal release?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='cd reissue' AND \"label\"='universal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Label of the release on Stereo vinyl LP with Catalog number SF-7635?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='stereo vinyl lp' AND \"catalog\"='sf-7635';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"2010_arwu_rankings\" text,\n \"2010_qs_world_rankings\" text,\n \"2010_qs_asian_rankings\" text,\n \"2010_eduniversal_rankings\" text,\n \"2009_qs_asian_rankings_int_l_faculty_review\" text,\n \"2009_qs_asian_rankings_int_l_student_review\" real,\n \"2000_singapore_asiaweek_rankings\" text,\n \"university\" text,\n \"local\" text,\n \"median_ranks\" real\n);\n\nQuestion: What university has a 2009 int'l student review greater than 268 and median rank greater than 4?"
},
{
"role": "assistant",
"content": "SELECT \"university\" FROM \"taiwan\" WHERE \"median_ranks\">4 AND \"2009_qs_asian_rankings_int_l_student_review\">268;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"2010_arwu_rankings\" text,\n \"2010_qs_world_rankings\" text,\n \"2010_qs_asian_rankings\" text,\n \"2010_eduniversal_rankings\" text,\n \"2009_qs_asian_rankings_int_l_faculty_review\" text,\n \"2009_qs_asian_rankings_int_l_student_review\" real,\n \"2000_singapore_asiaweek_rankings\" text,\n \"university\" text,\n \"local\" text,\n \"median_ranks\" real\n);\n\nQuestion: What's the ARWU ranking that has the int' student review of 144, a median rank of less than 10, and 2000 Singapore \u201cAsiaweek\u201d of none?"
},
{
"role": "assistant",
"content": "SELECT \"2010_arwu_rankings\" FROM \"taiwan\" WHERE \"2000_singapore_asiaweek_rankings\"='none' AND \"median_ranks\"<10 AND \"2009_qs_asian_rankings_int_l_student_review\"=144;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"2010_arwu_rankings\" text,\n \"2010_qs_world_rankings\" text,\n \"2010_qs_asian_rankings\" text,\n \"2010_eduniversal_rankings\" text,\n \"2009_qs_asian_rankings_int_l_faculty_review\" text,\n \"2009_qs_asian_rankings_int_l_student_review\" real,\n \"2000_singapore_asiaweek_rankings\" text,\n \"university\" text,\n \"local\" text,\n \"median_ranks\" real\n);\n\nQuestion: Name the local that has the Int'l student review less than 320 and 2010 Eduniversal ranking of none."
},
{
"role": "assistant",
"content": "SELECT \"local\" FROM \"taiwan\" WHERE \"2010_eduniversal_rankings\"='none' AND \"2010_arwu_rankings\"='none' AND \"2009_qs_asian_rankings_int_l_student_review\"<320;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"2010_arwu_rankings\" text,\n \"2010_qs_world_rankings\" text,\n \"2010_qs_asian_rankings\" text,\n \"2010_eduniversal_rankings\" text,\n \"2009_qs_asian_rankings_int_l_faculty_review\" text,\n \"2009_qs_asian_rankings_int_l_student_review\" real,\n \"2000_singapore_asiaweek_rankings\" text,\n \"university\" text,\n \"local\" text,\n \"median_ranks\" real\n);\n\nQuestion: What's the int'l student review that has the 2010 QS Rank of none?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2009_qs_asian_rankings_int_l_student_review\") FROM \"taiwan\" WHERE \"2010_qs_asian_rankings\"='none';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"taiwan\" (\n \"2010_arwu_rankings\" text,\n \"2010_qs_world_rankings\" text,\n \"2010_qs_asian_rankings\" text,\n \"2010_eduniversal_rankings\" text,\n \"2009_qs_asian_rankings_int_l_faculty_review\" text,\n \"2009_qs_asian_rankings_int_l_student_review\" real,\n \"2000_singapore_asiaweek_rankings\" text,\n \"university\" text,\n \"local\" text,\n \"median_ranks\" real\n);\n\nQuestion: What university has an int'l student review of 195?"
},
{
"role": "assistant",
"content": "SELECT \"university\" FROM \"taiwan\" WHERE \"2009_qs_asian_rankings_int_l_student_review\"=195;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" real,\n \"margin_of_error\" text,\n \"joe_sestak_d\" text,\n \"pat_toomey_r\" text,\n \"other\" text,\n \"undecided\" text\n);\n\nQuestion: WHAT CANDIDATE HAD A MARGIN OF ERROR OF \u00b1 4.5%, WHEN PAT TOOMEY WAS 45% AND JOE SESTAK WAS 38%?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"polling\" WHERE \"margin_of_error\"='\u00b1 4.5%' AND \"pat_toomey_r\"='45%' AND \"joe_sestak_d\"='38%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" real,\n \"margin_of_error\" text,\n \"joe_sestak_d\" text,\n \"pat_toomey_r\" text,\n \"other\" text,\n \"undecided\" text\n);\n\nQuestion: WHAT DATE DID JOE SESTAK HAVE 46% WITH \u00b1 3.0% MARGIN OF ERROR?"
},
{
"role": "assistant",
"content": "SELECT \"date_s_administered\" FROM \"polling\" WHERE \"joe_sestak_d\"='46%' AND \"margin_of_error\"='\u00b1 3.0%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"solheim_cup_record\" (\n \"year\" text,\n \"total_matches\" real,\n \"total_w_l_h\" text,\n \"singles_w_l_h\" text,\n \"points_won\" real,\n \"points_pct\" text\n);\n\nQuestion: WHAT IS THE POINTS PERCENTAGE WITH A TOTAL OF 1-2-2 RECORD?"
},
{
"role": "assistant",
"content": "SELECT \"points_pct\" FROM \"solheim_cup_record\" WHERE \"total_w_l_h\"='1-2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"solheim_cup_record\" (\n \"year\" text,\n \"total_matches\" real,\n \"total_w_l_h\" text,\n \"singles_w_l_h\" text,\n \"points_won\" real,\n \"points_pct\" text\n);\n\nQuestion: WHAT YEAR HAD 5 TOTAL MATCHES?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"solheim_cup_record\" WHERE \"total_matches\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_f_2_8_0\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What is the quantity preserved when 4 were made of class F-21?"
},
{
"role": "assistant",
"content": "SELECT \"quantity_preserved\" FROM \"class_f_2_8_0\" WHERE \"quantity_made\"='4' AND \"class\"='f-21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_f_2_8_0\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What fleet number had 3 made?"
},
{
"role": "assistant",
"content": "SELECT \"fleet_number_s\" FROM \"class_f_2_8_0\" WHERE \"quantity_made\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_f_2_8_0\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What class had 1 made and fleet number of 406?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"class_f_2_8_0\" WHERE \"quantity_made\"='1' AND \"fleet_number_s\"='406';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_f_2_8_0\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text\n);\n\nQuestion: What class has 0 preserved and 2 made?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"class_f_2_8_0\" WHERE \"quantity_preserved\"='0' AND \"quantity_made\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_proper_by_population\" (\n \"rank\" real,\n \"city\" text,\n \"population\" text,\n \"definition\" text,\n \"country\" text\n);\n\nQuestion: What rank has a population of 4839400?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"largest_cities_proper_by_population\" WHERE \"population\"='4839400';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_proper_by_population\" (\n \"rank\" real,\n \"city\" text,\n \"population\" text,\n \"definition\" text,\n \"country\" text\n);\n\nQuestion: What's the rank of the Province-Level Municipality?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"largest_cities_proper_by_population\" WHERE \"definition\"='province-level municipality';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_proper_by_population\" (\n \"rank\" real,\n \"city\" text,\n \"population\" text,\n \"definition\" text,\n \"country\" text\n);\n\nQuestion: What rank was Core Districts + Inner Suburbs and had a population of 10123000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"largest_cities_proper_by_population\" WHERE \"definition\"='core districts + inner suburbs' AND \"population\"='10123000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is Points, when Draws is less than 7, when Wins is less than 16, and when Goals For is \"35\"?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"group_ii\" WHERE \"draws\"<7 AND \"wins\"<16 AND \"goals_for\"=35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of Losses, when Position is greater than 8, when Goals For is greater than 34, when Points is \"25\", and when Draws is less than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"group_ii\" WHERE \"position\">8 AND \"goals_for\">34 AND \"points\"=25 AND \"draws\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the average Wins, when Points is less than \"19\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"group_ii\" WHERE \"points\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest Goals, when Played is greater than 30?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_for\") FROM \"group_ii\" WHERE \"played\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the sum of Played, when Losses is \"13\", and when Position is greater than 11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"group_ii\" WHERE \"losses\"=13 AND \"position\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest Wins, when Losses is less than 10, when Goal Difference is less than 46, when Goals is less than 63, and when Played is less than 30?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"group_ii\" WHERE \"losses\"<10 AND \"goal_difference\"<46 AND \"goals_for\"<63 AND \"played\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_2008_2009_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: How many viewed the episode gary gets boundaries?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"viewers\") FROM \"season_1_2008_2009_weekly_ratings\" WHERE \"episode\"='gary gets boundaries';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_2008_2009_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: What episode had 6.71 viewers?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"season_1_2008_2009_weekly_ratings\" WHERE \"viewers\"=6.71;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1_2008_2009_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"18_49\" text,\n \"viewers\" real\n);\n\nQuestion: When did the episode air that had 7.3 viewers?"
},
{
"role": "assistant",
"content": "SELECT \"air_date\" FROM \"season_1_2008_2009_weekly_ratings\" WHERE \"viewers\"=7.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What day in March is the game with a 48-13-11 record and a game number less than 72?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"march\") FROM \"schedule_and_results\" WHERE \"record\"='48-13-11' AND \"game\"<72;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of game 75?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"game\"=75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the lowest game number of the game after March 2 with the minnesota north stars as the opponent?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"march\">2 AND \"opponent\"='minnesota north stars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: The winner, Craig Lowndes, was in what location/state?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"winner\"='craig lowndes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: The Eastern Creek Raceway circuit is on what date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"circuit\"='eastern creek raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Castrol Perkins Motorsport and the winner Russell Ingall was in what location/state?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"team\"='castrol perkins motorsport' AND \"winner\"='russell ingall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What shows for 1998 when 1996 is 1R, and 2002 is not held?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"singles_performance_timeline\" WHERE \"1996\"='1r' AND \"2002\"='not held';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What is the 1996 when the 1994 is A, the 2003 is A, and the 2001 is 1R?"
},
{
"role": "assistant",
"content": "SELECT \"1996\" FROM \"singles_performance_timeline\" WHERE \"1994\"='a' AND \"2003\"='a' AND \"2001\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What shows for 1991 when 2002 is 2R?"
},
{
"role": "assistant",
"content": "SELECT \"1991\" FROM \"singles_performance_timeline\" WHERE \"2002\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What shows for 2006 when 1999 is Grand Slam Tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"1990\"='grand slam tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What shows for 2006 when 2000 is 1r, 1996 is A, and Tournament is Cincinnati Masters?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"2000\"='1r' AND \"1996\"='a' AND \"tournament\"='cincinnati masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text\n);\n\nQuestion: What is the Tournament when the 1990 is Olympic Games?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"1990\"='olympic games';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Location has a Record of 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='0-1';"
}
] |
[
{
"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 is Record, when Method is \"Technical Submission (Rear Naked Choke)\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='technical submission (rear naked choke)';"
}
] |
[
{
"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 is the sum of Round(s), when Method is \"Submission (Banana Split)\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (banana split)';"
}
] |
[
{
"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 is Time, when Event is \"GCM: Demolition 1\"?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='gcm: demolition 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partial_discography\" (\n \"year\" real,\n \"title\" text,\n \"performer\" text,\n \"label\" text,\n \"cat_no\" real\n);\n\nQuestion: Which year was \"the 12 year old boy\" performed?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"partial_discography\" WHERE \"title\"='\\\"the 12 year old boy\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_records\" (\n \"event\" text,\n \"long_course_short_course\" text,\n \"year_set\" real,\n \"time\" text,\n \"meet\" text\n);\n\nQuestion: What year had a 100m freestyle event?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_set\") FROM \"canadian_records\" WHERE \"event\"='100m freestyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_records\" (\n \"event\" text,\n \"long_course_short_course\" text,\n \"year_set\" real,\n \"time\" text,\n \"meet\" text\n);\n\nQuestion: What event had a short course in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"canadian_records\" WHERE \"long_course_short_course\"='short course' AND \"year_set\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_records\" (\n \"event\" text,\n \"long_course_short_course\" text,\n \"year_set\" real,\n \"time\" text,\n \"meet\" text\n);\n\nQuestion: What year did a short course have a time of 7:51.80?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_set\") FROM \"canadian_records\" WHERE \"long_course_short_course\"='short course' AND \"time\"='7:51.80';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canadian_records\" (\n \"event\" text,\n \"long_course_short_course\" text,\n \"year_set\" real,\n \"time\" text,\n \"meet\" text\n);\n\nQuestion: What was the latest year that had a 100m freestyle?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_set\") FROM \"canadian_records\" WHERE \"event\"='100m freestyle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: In what place was the song that had a draw of 3?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"national_final_29_march_1992\" WHERE \"draw\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What is the number of points for the 7th placed song with a draw greater than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"national_final_29_march_1992\" WHERE \"place\"='7th' AND \"draw\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: How many points did Joe O'Meara have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"national_final_29_march_1992\" WHERE \"artist\"='joe o''meara';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What was the draw for \"Feel The Pain\" which placed in 2nd and had more than 79 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draw\") FROM \"national_final_29_march_1992\" WHERE \"place\"='2nd' AND \"song\"='\\\"feel the pain\\\"' AND \"points\">79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: How many points did Linda Martin have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"national_final_29_march_1992\" WHERE \"artist\"='linda martin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_29_march_1992\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: In what place did \"feel the pain\" come in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"national_final_29_march_1992\" WHERE \"song\"='\\\"feel the pain\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: WHAT IS THE SCORE WITH A WEEK LARGER THAN 13, AND VISITOR TEAM MONTREAL ALOUETTES?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"week\">13 AND \"visitor\"='montreal alouettes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: WHAT IS THE AVERAGE WEEK WITH A DATE OF JULY 25?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"season_schedule\" WHERE \"date\"='july 25';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.