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 \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: W hat was the lowest Goals For when they played Team Goole Town and had a position lower than 9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_for\") FROM \"final_table\" WHERE \"team\"='goole town' AND \"position\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: Which team has a position higher than 3, a Drawn lower than 12, and a Goals Against higher than 85?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"final_table\" WHERE \"drawn\"<12 AND \"position\">3 AND \"goals_against\">85;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: When the Points 1 were 44 and the Goals For were larger than 65, what was the total number of Goals Against?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_against\") FROM \"final_table\" WHERE \"points_1\"=44 AND \"goals_for\">65;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rupes\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real,\n \"name_origin\" text\n);\n\nQuestion: What was the year when the diameter was 729 km?"
},
{
"role": "assistant",
"content": "SELECT \"year_named\" FROM \"rupes\" WHERE \"diameter_km\"=729;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rupes\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real,\n \"name_origin\" text\n);\n\nQuestion: What is the highest diameter when the latitude is 43.5s?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"diameter_km\") FROM \"rupes\" WHERE \"latitude\"='43.5s';"
}
] |
[
{
"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: On what Date was the Attendance 75,891?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='75,891';"
}
] |
[
{
"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 was the Week on September 5, 1993?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='september 5, 1993';"
}
] |
[
{
"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: Who was the Opponent on October 31, 1993?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='october 31, 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_street_railways_in_canada\" (\n \"name_of_system\" text,\n \"location\" text,\n \"traction_type\" text,\n \"date_from\" text,\n \"date_to\" text\n);\n\nQuestion: what is the date for traction type electric with calgary location?"
},
{
"role": "assistant",
"content": "SELECT \"date_from\" FROM \"list_of_street_railways_in_canada\" WHERE \"traction_type\"='electric' AND \"location\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_street_railways_in_canada\" (\n \"name_of_system\" text,\n \"location\" text,\n \"traction_type\" text,\n \"date_from\" text,\n \"date_to\" text\n);\n\nQuestion: Which date has date started from 30 Sep 1913?"
},
{
"role": "assistant",
"content": "SELECT \"date_to\" FROM \"list_of_street_railways_in_canada\" WHERE \"date_from\"='30 sep 1913';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dnepr_mogilev_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: What is the 1st leg of 2q round?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"dnepr_mogilev_in_europe\" WHERE \"round\"='2q';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dnepr_mogilev_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: What competition has the club villareal?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"dnepr_mogilev_in_europe\" WHERE \"club\"='villareal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dnepr_mogilev_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: Which competition has aik club?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"dnepr_mogilev_in_europe\" WHERE \"club\"='aik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dnepr_mogilev_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: What is the round of club be\u010dej?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"dnepr_mogilev_in_europe\" WHERE \"club\"='be\u010dej';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dnepr_mogilev_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text\n);\n\nQuestion: What is the 1st leg of the uefa intertoto cup competition with club silkeborg?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"dnepr_mogilev_in_europe\" WHERE \"competition\"='uefa intertoto cup' AND \"club\"='silkeborg';"
}
] |
[
{
"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 high rebounds when the score was w 105\u201395 (ot) and Jason Kidd (8) had the high assists?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"high_assists\"='jason kidd (8)' AND \"score\"='w 105\u201395 (ot)';"
}
] |
[
{
"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: Which team scored l 87\u2013115 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"score\"='l 87\u2013115 (ot)';"
}
] |
[
{
"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's the record of Game 56?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=56;"
}
] |
[
{
"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 was the team that played at Energysolutions Arena 19,911?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"location_attendance\"='energysolutions arena 19,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: Who had the high assists when the game was at American Airlines Center 20,223?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"location_attendance\"='american airlines center 20,223';"
}
] |
[
{
"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 team has a Record of 50\u201328?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"record\"='50\u201328';"
}
] |
[
{
"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 was the date of game 75?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"daytona_500_results\" (\n \"year\" real,\n \"manufacturer\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: Which manufacturer was used after 1969 with a finish position of 34?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"daytona_500_results\" WHERE \"year\">1969 AND \"finish\"=34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What is the total attendance on April 25?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"playoffs\" WHERE \"date\"='april 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What is the decision of the game with an attendance greater than 19,883?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"playoffs\" WHERE \"attendance\">'19,883';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: When the score was 76-73-67-69=285 what was the To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"score\"='76-73-67-69=285';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which player has a To par of \u20136?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"to_par\"='\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model\" text,\n \"memory_ram\" text,\n \"storage_flash\" text,\n \"operating_system_version\" text,\n \"memory_card\" text,\n \"weight_dimensions\" text,\n \"retail_availability\" text\n);\n\nQuestion: How much memory (RAM) does the Maemo 5 operating system have?"
},
{
"role": "assistant",
"content": "SELECT \"memory_ram\" FROM \"models\" WHERE \"operating_system_version\"='maemo 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model\" text,\n \"memory_ram\" text,\n \"storage_flash\" text,\n \"operating_system_version\" text,\n \"memory_card\" text,\n \"weight_dimensions\" text,\n \"retail_availability\" text\n);\n\nQuestion: Which operating system has a storage (flash) of 128MB?"
},
{
"role": "assistant",
"content": "SELECT \"operating_system_version\" FROM \"models\" WHERE \"storage_flash\"='128mb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model\" text,\n \"memory_ram\" text,\n \"storage_flash\" text,\n \"operating_system_version\" text,\n \"memory_card\" text,\n \"weight_dimensions\" text,\n \"retail_availability\" text\n);\n\nQuestion: What is the weight and dimensions of an N800?"
},
{
"role": "assistant",
"content": "SELECT \"weight_dimensions\" FROM \"models\" WHERE \"model\"='n800';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models\" (\n \"model\" text,\n \"memory_ram\" text,\n \"storage_flash\" text,\n \"operating_system_version\" text,\n \"memory_card\" text,\n \"weight_dimensions\" text,\n \"retail_availability\" text\n);\n\nQuestion: Which operating system has 1GB (mobile ddr) memory (RAM)?"
},
{
"role": "assistant",
"content": "SELECT \"operating_system_version\" FROM \"models\" WHERE \"memory_ram\"='1gb (mobile ddr)';"
}
] |
[
{
"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 Pick, when Round is greater than 1, and when Player is \"Jim Stack\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"draft_picks\" WHERE \"round\">1 AND \"player\"='jim stack';"
}
] |
[
{
"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 lowest Round, when College is \"Washington State\", and when Pick is less than 48?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"college\"='washington state' AND \"pick\"<48;"
}
] |
[
{
"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 Round is greater than 1, and when Pick is greater than 163?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"draft_picks\" WHERE \"round\">1 AND \"pick\">163;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: What is the location for the software of BIND and an IPv6 address of 2001:503:c27::2:30?"
},
{
"role": "assistant",
"content": "SELECT \"location_numsites_global_local\" FROM \"root_server_addresses\" WHERE \"software\"='bind' AND \"i_pv6_address\"='2001:503:c27::2:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: Which IPv6 address had a location of distributed using anycast 8/0 and a letter of A?"
},
{
"role": "assistant",
"content": "SELECT \"i_pv6_address\" FROM \"root_server_addresses\" WHERE \"location_numsites_global_local\"='distributed using anycast 8/0' AND \"letter\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: Which IPv6 address has an operator of Wide project?"
},
{
"role": "assistant",
"content": "SELECT \"i_pv6_address\" FROM \"root_server_addresses\" WHERE \"operator\"='wide project';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: Which letter has an operator of VeriSign and an AS-number of AS26415?"
},
{
"role": "assistant",
"content": "SELECT \"letter\" FROM \"root_server_addresses\" WHERE \"operator\"='verisign' AND \"as_number\"='as26415';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: Which location has an AS-number of N/A?"
},
{
"role": "assistant",
"content": "SELECT \"location_numsites_global_local\" FROM \"root_server_addresses\" WHERE \"as_number\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"root_server_addresses\" (\n \"letter\" text,\n \"i_pv6_address\" text,\n \"as_number\" text,\n \"operator\" text,\n \"location_numsites_global_local\" text,\n \"software\" text\n);\n\nQuestion: Which letter has an operator of the Defense Information Systems Agency?"
},
{
"role": "assistant",
"content": "SELECT \"letter\" FROM \"root_server_addresses\" WHERE \"operator\"='defense information systems agency';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_country\" (\n \"country\" text,\n \"amateur_era\" real,\n \"open_era\" real,\n \"all_time\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: What is the sum of All-Time, when Amateur Era is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"all_time\") FROM \"champions_by_country\" WHERE \"amateur_era\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_country\" (\n \"country\" text,\n \"amateur_era\" real,\n \"open_era\" real,\n \"all_time\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: What is the lowest All-Time, when First Title is before 1974, when Last Title is \"1933\", and when Amateur Era is greater than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"all_time\") FROM \"champions_by_country\" WHERE \"first_title\"<1974 AND \"last_title\"=1933 AND \"amateur_era\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_country\" (\n \"country\" text,\n \"amateur_era\" real,\n \"open_era\" real,\n \"all_time\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: What is the lowest All-Time, when First Title is \"2007, and when Amateur Era is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"all_time\") FROM \"champions_by_country\" WHERE \"first_title\"=2007 AND \"amateur_era\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_country\" (\n \"country\" text,\n \"amateur_era\" real,\n \"open_era\" real,\n \"all_time\" real,\n \"first_title\" real,\n \"last_title\" real\n);\n\nQuestion: What is the lowest First Title, when All-Time is greater than 1, when Country is \"United States (USA)\", and when Amateur Era is greater than 17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_title\") FROM \"champions_by_country\" WHERE \"all_time\">1 AND \"country\"='united states (usa)' AND \"amateur_era\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place of the Player with a To par of +2 and a Score of 70-72-73=215?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"to_par\"='+2' AND \"score\"='70-72-73=215';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: From what Country is T6 Place Player Robert Karlsson?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='t6' AND \"player\"='robert karlsson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To par of the T4 Place Player with a Score of 72-69-73=214?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='t4' AND \"score\"='72-69-73=214';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To par of the Player with a Score of 70-72-73=215?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"score\"='70-72-73=215';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Country is Rocco Mediate from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='rocco mediate';"
}
] |
[
{
"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: What is Mike Smith's To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='mike smith';"
}
] |
[
{
"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: What is Scott Hoch with a Score of 66 Country?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"=66 AND \"player\"='scott hoch';"
}
] |
[
{
"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: What is the T4 Place Player with a Score of more than 66?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"score\">66 AND \"place\"='t4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What is the vacancy date for the manager appointed on 2 November 2009 who left due to mutual consent?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='mutual consent' AND \"date_of_appointment\"='2 november 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the manner of departure for the vacancy date of 20 September 2009?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='20 september 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the vacancy date of the manager appointed on 11 March 2010?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='11 march 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest pick number where the overall pick number was 38?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"overall\"=38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the position of the player who was picked in round 22?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\"=22;"
}
] |
[
{
"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: What was the call sign for ERP W of 99?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"erp_w\"=99;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the team 1 in the match with a team 2 of Karabakh?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"third_qualifying_round\" WHERE \"team_2\"='karabakh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the round of pick 63?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"pick\"=63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the lowest round of player chris burkett?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"player\"='chris burkett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the average pick of school/club team kutztown state with a round 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"nfl_draft\" WHERE \"round\"=4 AND \"school_club_team\"='kutztown state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"name\" text,\n \"seasons\" real,\n \"matches\" real,\n \"win_pct\" text,\n \"draw\" real,\n \"draw_pct\" text,\n \"lose\" real,\n \"lose_pct\" text\n);\n\nQuestion: What is the draw % with more than 110 matches, more than 59 draws, and a losing % of 18.5792%?"
},
{
"role": "assistant",
"content": "SELECT \"draw_pct\" FROM \"statistics\" WHERE \"matches\">110 AND \"draw\">59 AND \"lose_pct\"='18.5792%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"name\" text,\n \"seasons\" real,\n \"matches\" real,\n \"win_pct\" text,\n \"draw\" real,\n \"draw_pct\" text,\n \"lose\" real,\n \"lose_pct\" text\n);\n\nQuestion: What is the average number of matches of leonardo in seasons after 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"matches\") FROM \"statistics\" WHERE \"name\"='leonardo' AND \"seasons\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"state\" text,\n \"membership\" real,\n \"population\" real,\n \"pct_lds\" text,\n \"wards\" real,\n \"branches\" real,\n \"total_congregations\" real\n);\n\nQuestion: What is the average membership with 3.33% LDS and less than 47 branches?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"membership\") FROM \"table\" WHERE \"pct_lds\"='3.33%' AND \"branches\"<47;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2005 when 2003 is A, 2007 is 2r and 2012 is 3r?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"performance_timeline\" WHERE \"2003\"='a' AND \"2007\"='2r' AND \"2012\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2004 when the tournament is paris masters?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"performance_timeline\" WHERE \"tournament\"='paris masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2009 when 2004 is 107?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"performance_timeline\" WHERE \"2004\"='107';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2003 when 2005 is did not qualify?"
},
{
"role": "assistant",
"content": "SELECT \"2003\" FROM \"performance_timeline\" WHERE \"2005\"='did not qualify';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_timeline\" (\n \"tournament\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: what is 2012 when the tournament is win %?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"performance_timeline\" WHERE \"tournament\"='win %';"
}
] |
[
{
"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 was the record on February 2?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='february 2';"
}
] |
[
{
"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 was the location of the game on February 2?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='february 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"title\" text,\n \"result\" text\n);\n\nQuestion: What year was Black Swan up for the Gotham Awards?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"accolades\" WHERE \"title\"='black swan' AND \"award\"='gotham awards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"title\" text,\n \"result\" text\n);\n\nQuestion: What is the earliest year in which Requiem for a Dream was in the running for Best Director?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"accolades\" WHERE \"title\"='requiem for a dream' AND \"category\"='best director';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Record that has the Location of fleetcenter, and the Date of fri. apr. 5?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location\"='fleetcenter' AND \"date\"='fri. apr. 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Record that has the Game smaller than 76?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"<76;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the highest Game that has the Opponent of atlanta hawks?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"game_log\" 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 \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Game that has the Opponent of miami heat?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"opponent\"='miami heat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Can you tell me the Record that has the Score of 100-105?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='100-105';"
}
] |
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Opponent has a Location/Attendance of delta center/19,911 on dec 6?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='delta center/19,911' AND \"date\"='dec 6';"
}
] |
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Record for Game 17?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"='17';"
}
] |
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Location/Attendance on Dec 14?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='dec 14';"
}
] |
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record is dated Dec 10?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='dec 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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the Location/Attendance on Dec 2?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='dec 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who rode a Honda CBR1000rr, had fewer than 22 laps, and a time of +2 laps?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"superbike_race_1_classification\" WHERE \"bike\"='honda cbr1000rr' AND \"laps\"<22 AND \"time\"='+2 laps';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest grid when the time is +45.162?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"time\"='+45.162';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is Fonsi Nieto's average grid when he's riding a Suzuki GSX-R1000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"bike\"='suzuki gsx-r1000' AND \"rider\"='fonsi nieto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many grids did Shinichi Nakatomi ride in?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"superbike_race_1_classification\" WHERE \"rider\"='shinichi nakatomi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_10_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many tries against have a losing bonus of 9?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"2009_10_table\" WHERE \"losing_bonus\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_10_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points were there for 15 losses?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2009_10_table\" WHERE \"lost\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_10_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: For which play was the points 271?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2009_10_table\" WHERE \"points_against\"='271';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_10_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points were there when the try bonus was 2?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"2009_10_table\" WHERE \"try_bonus\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: Which 2007\u201308 season has a Club of genoa c.f.c.?"
},
{
"role": "assistant",
"content": "SELECT \"2007_08_season\" FROM \"teams\" WHERE \"club\"='genoa c.f.c.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2007_08_season\" text\n);\n\nQuestion: Which City has a Stadium of stadio artemio franchi, florence?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"teams\" WHERE \"stadium\"='stadio artemio franchi, florence';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_natural_monuments\" (\n \"reserve\" text,\n \"district\" text,\n \"iucn\" text,\n \"co_management\" text,\n \"est\" real,\n \"description\" text\n);\n\nQuestion: What is the description when the reserve is Half Moon Caye?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"list_of_natural_monuments\" WHERE \"reserve\"='half moon caye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_natural_monuments\" (\n \"reserve\" text,\n \"district\" text,\n \"iucn\" text,\n \"co_management\" text,\n \"est\" real,\n \"description\" text\n);\n\nQuestion: Which district has an IUCN of iii and was established in 1998?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"list_of_natural_monuments\" WHERE \"iucn\"='iii' AND \"est\"=1998;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_natural_monuments\" (\n \"reserve\" text,\n \"district\" text,\n \"iucn\" text,\n \"co_management\" text,\n \"est\" real,\n \"description\" text\n);\n\nQuestion: What is the IUNC of district of Cayo and reserve of Actun Tunichil Muknal?"
},
{
"role": "assistant",
"content": "SELECT \"iucn\" FROM \"list_of_natural_monuments\" WHERE \"district\"='cayo' AND \"reserve\"='actun tunichil muknal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_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 \"team_s\" text\n);\n\nQuestion: What is the sum of value for average finish with poles less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_finish\") FROM \"nascar_nationwide_series\" WHERE \"poles\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_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 \"team_s\" text\n);\n\nQuestion: What is the average start with wins larger than 0 and 32nd position?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"starts\") FROM \"nascar_nationwide_series\" WHERE \"wins\">0 AND \"position\"='32nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"specific_fuel_consumption_sfc_specific_i\" (\n \"engine_type\" text,\n \"scenario\" text,\n \"sfc_in_lb_lbf_h\" real,\n \"sfc_in_g_k_n_s\" real,\n \"specific_impulse_s\" real,\n \"effective_exhaust_velocity_m_s\" real\n);\n\nQuestion: What is the average SFC in lb/(lbf\u00b7h) for engines with an Effective exhaust velocity (m/s) larger than 29,553, and a SFC in g/(kN\u00b7s) of 17.1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"sfc_in_lb_lbf_h\") FROM \"specific_fuel_consumption_sfc_specific_i\" WHERE \"effective_exhaust_velocity_m_s\">'29,553' AND \"sfc_in_g_k_n_s\"=17.1;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.