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 \"tournaments\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What season did the Rangers win?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"tournaments\" WHERE \"winner\"='rangers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the score of the game with Falkirk as the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"tournaments\" WHERE \"runner_up\"='falkirk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the venue of the game where hibernian won and the rangers were the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"tournaments\" WHERE \"runner_up\"='rangers' AND \"winner\"='hibernian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_10_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: what is the country for the 1972 winter olympics?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"women_s_10_km\" WHERE \"winter_olympics\"=1972;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_10_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: what is the winter olympics year when the fis nordic world ski championships is 1976?"
},
{
"role": "assistant",
"content": "SELECT \"winter_olympics\" FROM \"women_s_10_km\" WHERE \"fis_nordic_world_ski_championships\"='1976';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_10_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: what is the earliest winter olympics when the fis nordic world ski championships is 1976?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"winter_olympics\") FROM \"women_s_10_km\" WHERE \"fis_nordic_world_ski_championships\"='1976';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_10_km\" (\n \"winner\" text,\n \"country\" text,\n \"winter_olympics\" real,\n \"fis_nordic_world_ski_championships\" text,\n \"holmenkollen\" text\n);\n\nQuestion: what is the winter olympics when the country is soviet union and holmenkollen is 1970, 1979?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"winter_olympics\") FROM \"women_s_10_km\" WHERE \"country\"='soviet union' AND \"holmenkollen\"='1970, 1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: what is the date when the away team is newport county?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"second_round_proper\" WHERE \"away_team\"='newport county';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"play_offs\" (\n \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: How many games have 5 goals and less than 8 assists?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"play_offs\" WHERE \"goals\"=5 AND \"assists\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"play_offs\" (\n \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is the highest number of goals Eisb\u00e4ren Berlin had along with 13 points and 10 assists?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"play_offs\" WHERE \"points\"=13 AND \"assists\"=10 AND \"club\"='eisb\u00e4ren berlin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"play_offs\" (\n \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is Ivan Ciernik's average points with less than 11 goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"play_offs\" WHERE \"player\"='ivan ciernik' AND \"goals\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"provinces_of_afghanistan\" (\n \"province\" text,\n \"map_num\" real,\n \"iso_3166_2_af\" text,\n \"centers\" text,\n \"population\" real,\n \"area_km\" real,\n \"language\" text,\n \"notes\" text,\n \"u_n_region\" text\n);\n\nQuestion: Which province is Parun in?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"provinces_of_afghanistan\" WHERE \"centers\"='parun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aircraft\" (\n \"category\" text,\n \"speed_km_h\" real,\n \"speed_mph\" real,\n \"vehicle\" text,\n \"pilot\" text,\n \"date\" text\n);\n\nQuestion: In which category is Frank Scarabino a pilot?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"aircraft\" WHERE \"pilot\"='frank scarabino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aircraft\" (\n \"category\" text,\n \"speed_km_h\" real,\n \"speed_mph\" real,\n \"vehicle\" text,\n \"pilot\" text,\n \"date\" text\n);\n\nQuestion: What is the sum of speed in km per hour reached by John Egginton?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"speed_km_h\") FROM \"aircraft\" WHERE \"pilot\"='john egginton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What is the name of team 1 that was after the 2005 season and with a 4-2 score?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"results\" WHERE \"season\">2005 AND \"score\"='4-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: In the 2004 season with a 0-2 score what was the name of the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"score\"='0-2' AND \"season\"=2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What is the earliest season that Pisico B\u00ecnh \u00f0inh is team 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"results\" WHERE \"team_2\"='pisico b\u00ecnh \u00f0inh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: Which years have a rank less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"rebounds\" WHERE \"rank\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: How many games have rebounds larger than 1048?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"rebounds\" WHERE \"total_rebounds\">1048;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: How many rebounds have a Player of andre gaddy, and a Rank smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_rebounds\") FROM \"rebounds\" WHERE \"player\"='andre gaddy' AND \"rank\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: How many rebounds have a Player of herb estes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_rebounds\") FROM \"rebounds\" WHERE \"player\"='herb estes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"reb_avg\" real,\n \"total_rebounds\" real\n);\n\nQuestion: What is the total of rebound averages with more than 98 games and a rank of 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"reb_avg\") FROM \"rebounds\" WHERE \"games\">98 AND \"rank\"=7;"
}
] |
[
{
"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: Can you tell me the Date that has the Team of golden state?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='golden state';"
}
] |
[
{
"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: Can you tell me the High assists that has the Date of november 25?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='november 25';"
}
] |
[
{
"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: Can you tell me the Team that has the High rebounds of antawn jamison (10), and the Date of november 5?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_rebounds\"='antawn jamison (10)' AND \"date\"='november 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 \"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: Can you tell me the High rebounds that has the Date of november 5?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='november 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: WHAT IS THE TEAM WITH astc round 1?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"series\"='astc round 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: WHAT IS THE WINNER WITH ATCC ROUND 6?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"series\"='atcc round 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"49ers_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest number of points the 49ers scored when the record was 1-5 and there were more than 29,563 fans attending?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"49ers_points\") FROM \"schedule\" WHERE \"attendance\">'29,563' AND \"record\"='1-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"49ers_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"streak\" text,\n \"attendance\" real\n);\n\nQuestion: What was the highest attendance for the game where the record was 0-5 and the opponents scored more than 20 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"record\"='0-5' AND \"opponents\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"num_of_years_as_tallest\" text,\n \"height_m_ft\" text,\n \"floors\" real\n);\n\nQuestion: What is the street address of Notre Dame Basilica?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='notre dame basilica';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"num_of_years_as_tallest\" text,\n \"height_m_ft\" text,\n \"floors\" real\n);\n\nQuestion: What is the name of the building that was the tallest for 28 years?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"num_of_years_as_tallest\"='28 years';"
}
] |
[
{
"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 Region, when the Catalog is SM 2965-05?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='sm 2965-05';"
}
] |
[
{
"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 Region, when the Catalog is 25AP 301?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='25ap 301';"
}
] |
[
{
"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 Date, when Catalog is EPC 81436?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='epc 81436';"
}
] |
[
{
"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 Label, when Format is Double CD?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='double 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: What is Label, when Region is Japan?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"region\"='japan';"
}
] |
[
{
"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 Format, when Region is United States?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"region\"='united states';"
}
] |
[
{
"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);\n\nQuestion: What was the date of appointment for the manager of lecce when the previous manager's contract expired?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='contract expired' AND \"team\"='lecce';"
}
] |
[
{
"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);\n\nQuestion: What was the manner of departure for the outgoing manager, davide ballardini?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='davide ballardini';"
}
] |
[
{
"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);\n\nQuestion: What was the manner of departure for the outgoing manager, giuseppe iachini?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='giuseppe iachini';"
}
] |
[
{
"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);\n\nQuestion: What is the date of appointment for the outgoing manager edoardo reja?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='edoardo reja';"
}
] |
[
{
"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: At what event did he fight matt eckerle?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='matt eckerle';"
}
] |
[
{
"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 highest Round that lasted 1:44?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the number for the interview in Illinois when the preliminary is less than 8.558?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"interview\") FROM \"final_competition_score\" WHERE \"country\"='illinois' AND \"preliminary\"<8.558;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the name of the country with less than 9.033 for swimsuit, 8.611 for interview and preliminary is less than 8.87?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_competition_score\" WHERE \"swimsuit\"<9.033 AND \"interview\"=8.611 AND \"preliminary\"<8.87;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the evening gown number when the average is more than 8.984 in Louisiana and the preliminary is more than 8.597?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"evening_gown\") FROM \"final_competition_score\" WHERE \"average\">8.984 AND \"country\"='louisiana' AND \"preliminary\">8.597;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the interview number in Louisiana, and the swimsuit number is more than 9.1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"interview\") FROM \"final_competition_score\" WHERE \"country\"='louisiana' AND \"swimsuit\">9.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition_score\" (\n \"country\" text,\n \"preliminary\" real,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the swimsuit number when the preliminary is 8.721, and the average is more than 8.781?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"swimsuit\") FROM \"final_competition_score\" WHERE \"preliminary\"=8.721 AND \"average\">8.781;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where was the game played on 30 May 2004?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='30 may 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_18\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was Silva's Partner in the Amarante Tournament played on a Hard Surface?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_18\" WHERE \"surface\"='hard' AND \"tournament\"='amarante';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_18\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was Silva's Partner in the match with a Score of 6\u20133, 7\u20136 (7\u20133)?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_18\" WHERE \"score\"='6\u20133, 7\u20136 (7\u20133)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_18\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what Date was the match with partner Kira Nagy?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_18\" WHERE \"partner\"='kira nagy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_18\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Date of the Vigo Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_18\" WHERE \"tournament\"='vigo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_18\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What Tournament did Silva Partner with Nicole Thijssen with Opponent in the final Nina Bratchikova & Frederica Piedade?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_18\" WHERE \"partner\"='nicole thijssen' AND \"opponent_in_the_final\"='nina bratchikova & frederica piedade';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is Name, when State is \"Jin\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"vassal_states\" WHERE \"state\"='jin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is Name, when Royal House is \"Ji\", and when State is \"Cai\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"vassal_states\" WHERE \"royal_house\"='ji' AND \"state\"='cai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is State, when From is \"830 BC\"?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"from\"='830 bc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ansi_paper_sizes\" (\n \"name\" text,\n \"in_in\" text,\n \"mm_mm\" text,\n \"ratio\" real,\n \"similar_iso_a_size\" text\n);\n\nQuestion: Which Ratio has a Similar ISO A size of a3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ratio\") FROM \"ansi_paper_sizes\" WHERE \"similar_iso_a_size\"='a3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ansi_paper_sizes\" (\n \"name\" text,\n \"in_in\" text,\n \"mm_mm\" text,\n \"ratio\" real,\n \"similar_iso_a_size\" text\n);\n\nQuestion: Which mm \u00d7 mm has an in \u00d7 in of 11 \u00d7 17?"
},
{
"role": "assistant",
"content": "SELECT \"mm_mm\" FROM \"ansi_paper_sizes\" WHERE \"in_in\"='11 \u00d7 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ansi_paper_sizes\" (\n \"name\" text,\n \"in_in\" text,\n \"mm_mm\" text,\n \"ratio\" real,\n \"similar_iso_a_size\" text\n);\n\nQuestion: Which Ratio has a Name of ansi e?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ratio\") FROM \"ansi_paper_sizes\" WHERE \"name\"='ansi e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ansi_paper_sizes\" (\n \"name\" text,\n \"in_in\" text,\n \"mm_mm\" text,\n \"ratio\" real,\n \"similar_iso_a_size\" text\n);\n\nQuestion: Which Ratio has an in \u00d7 in of 17 \u00d7 22?"
},
{
"role": "assistant",
"content": "SELECT \"ratio\" FROM \"ansi_paper_sizes\" WHERE \"in_in\"='17 \u00d7 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text\n);\n\nQuestion: What is the Distance of the 1945 Vuelta a Espana with 4A Stage?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"stage_results\" WHERE \"stage\"='4a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leading_career_money_winners\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earned\" text,\n \"earnings\" real\n);\n\nQuestion: What earned has 5 for the rank?"
},
{
"role": "assistant",
"content": "SELECT \"earned\" FROM \"leading_career_money_winners\" WHERE \"rank\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leading_career_money_winners\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earned\" text,\n \"earnings\" real\n);\n\nQuestion: What is the average earnings ($) that has meg mallon as the player, with a rank less than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"earnings\") FROM \"leading_career_money_winners\" WHERE \"player\"='meg mallon' AND \"rank\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gasoline_taxes_in_canada\" (\n \"government\" text,\n \"federal_excise_tax_cad_l\" real,\n \"total_excise_tax_cad_l\" real,\n \"minimum_tax_incl_sales_taxes_cad_l\" real,\n \"min_tax_cad_us_gal\" real\n);\n\nQuestion: What's the fed tax that has a total tax greater than 33.2, a minimum sales tax less than 41.01 and in Vancouver, BC?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"federal_excise_tax_cad_l\") FROM \"gasoline_taxes_in_canada\" WHERE \"total_excise_tax_cad_l\">33.2 AND \"government\"='vancouver, bc' AND \"minimum_tax_incl_sales_taxes_cad_l\"<41.01;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gasoline_taxes_in_canada\" (\n \"government\" text,\n \"federal_excise_tax_cad_l\" real,\n \"total_excise_tax_cad_l\" real,\n \"minimum_tax_incl_sales_taxes_cad_l\" real,\n \"min_tax_cad_us_gal\" real\n);\n\nQuestion: What is the least minimum sales tax when the min tax is 105.7 and fed tax is more than 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"minimum_tax_incl_sales_taxes_cad_l\") FROM \"gasoline_taxes_in_canada\" WHERE \"min_tax_cad_us_gal\"=105.7 AND \"federal_excise_tax_cad_l\">10;"
}
] |
[
{
"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 \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the 1991 when 1992 and 1990 are 1R?"
},
{
"role": "assistant",
"content": "SELECT \"1991\" FROM \"singles_performance_timeline\" WHERE \"1992\"='1r' AND \"1990\"='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 \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the 1991 when 1990 is ATP Masters Series?"
},
{
"role": "assistant",
"content": "SELECT \"1991\" FROM \"singles_performance_timeline\" WHERE \"1990\"='atp masters series';"
}
] |
[
{
"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 \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the 1995 when the 1991 is Grand Slams?"
},
{
"role": "assistant",
"content": "SELECT \"1995\" FROM \"singles_performance_timeline\" WHERE \"1991\"='grand slams';"
}
] |
[
{
"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 \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"career_sr\" text\n);\n\nQuestion: What is the career SR when 1985 is Grand Slams?"
},
{
"role": "assistant",
"content": "SELECT \"career_sr\" FROM \"singles_performance_timeline\" WHERE \"1985\"='grand slams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"u_boat\" text,\n \"name\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: Which Name has a Date of 11 june 1940?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"ships_attacked\" WHERE \"date\"='11 june 1940';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"u_boat\" text,\n \"name\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: Which Nationality has a Fate of sunk (mine), and a Tonnage (GRT) smaller than 2,266?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"ships_attacked\" WHERE \"fate\"='sunk (mine)' AND \"tonnage_grt\"<'2,266';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"u_boat\" text,\n \"name\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: Which Tonnage (GRT) is the highest one that has a Date of 16 june 1940?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tonnage_grt\") FROM \"ships_attacked\" WHERE \"date\"='16 june 1940';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_attacked\" (\n \"date\" text,\n \"u_boat\" text,\n \"name\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: Which Nationality has a Name of assyrian?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"ships_attacked\" WHERE \"name\"='assyrian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"triathlon\" (\n \"athlete\" text,\n \"event\" text,\n \"swim_1_5km\" text,\n \"trans_1\" text,\n \"bike_40km\" text,\n \"trans_2\" text,\n \"run_10km\" text,\n \"total_time\" text,\n \"rank\" real\n);\n\nQuestion: What is the time for the bike (40km) when the swim (1.5km) is 19:56?"
},
{
"role": "assistant",
"content": "SELECT \"bike_40km\" FROM \"triathlon\" WHERE \"swim_1_5km\"='19:56';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"triathlon\" (\n \"athlete\" text,\n \"event\" text,\n \"swim_1_5km\" text,\n \"trans_1\" text,\n \"bike_40km\" text,\n \"trans_2\" text,\n \"run_10km\" text,\n \"total_time\" text,\n \"rank\" real\n);\n\nQuestion: With a swim (1.5km) of 18:55 and a run (10km) of 32:37, what is the trans 2?"
},
{
"role": "assistant",
"content": "SELECT \"trans_2\" FROM \"triathlon\" WHERE \"swim_1_5km\"='18:55' AND \"run_10km\"='32:37';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"triathlon\" (\n \"athlete\" text,\n \"event\" text,\n \"swim_1_5km\" text,\n \"trans_1\" text,\n \"bike_40km\" text,\n \"trans_2\" text,\n \"run_10km\" text,\n \"total_time\" text,\n \"rank\" real\n);\n\nQuestion: Daniela Ryf who competes in the women's even had what swim (1.5km)?"
},
{
"role": "assistant",
"content": "SELECT \"swim_1_5km\" FROM \"triathlon\" WHERE \"event\"='women''s' AND \"athlete\"='daniela ryf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"triathlon\" (\n \"athlete\" text,\n \"event\" text,\n \"swim_1_5km\" text,\n \"trans_1\" text,\n \"bike_40km\" text,\n \"trans_2\" text,\n \"run_10km\" text,\n \"total_time\" text,\n \"rank\" real\n);\n\nQuestion: For the triathlon with a bike (40km) of 58:20 what is the total time?"
},
{
"role": "assistant",
"content": "SELECT \"total_time\" FROM \"triathlon\" WHERE \"bike_40km\"='58:20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"triathlon\" (\n \"athlete\" text,\n \"event\" text,\n \"swim_1_5km\" text,\n \"trans_1\" text,\n \"bike_40km\" text,\n \"trans_2\" text,\n \"run_10km\" text,\n \"total_time\" text,\n \"rank\" real\n);\n\nQuestion: How long did the trans 1 take when 2:00:40.20 is the total time?"
},
{
"role": "assistant",
"content": "SELECT \"trans_1\" FROM \"triathlon\" WHERE \"total_time\"='2:00:40.20';"
}
] |
[
{
"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: Can you tell me the Record that has the Team of minnesota?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"team\"='minnesota';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"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: Can you tell me the Score that has the Team of memphis?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='memphis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: With a date of Aldershot and Aldershot as the away team what was the score of the game?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='aldershot' AND \"date\"='aldershot';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score for the game when West Ham United was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='west ham united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: With Sheffield United as the away team and the date, what home team has a tie no of 15?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='15' AND \"away_team\"='sheffield united' AND \"date\"='sheffield united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team when Sheffield United was the away team and the date was also Sheffield United?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"away_team\"='sheffield united' AND \"date\"='sheffield united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What tie no has Watford as the date?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"date\"='watford';"
}
] |
[
{
"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: Which Country has a Place of t9, and a Score of 71-71-72=214, and a Player of ernie els?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='t9' AND \"score\"='71-71-72=214' AND \"player\"='ernie els';"
}
] |
[
{
"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: Which Country has a To par of \u201313?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"to_par\"='\u201313';"
}
] |
[
{
"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: Which Player has a Score of 72-69-73=214?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"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: Which Score has a To par of \u20134, and a Player of duffy waldorf?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"to_par\"='\u20134' AND \"player\"='duffy waldorf';"
}
] |
[
{
"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: Which Country has a Score of 79-68-74=212?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='79-68-74=212';"
}
] |
[
{
"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: Which To par has a Country of united states, and a Player of duffy waldorf?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='united states' AND \"player\"='duffy waldorf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_10_7_3\" (\n \"outcome\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score\" text\n);\n\nQuestion: What is Opponent In Final, when Surface is Hard, when Location is Wellington, New Zealand, and when Date is 6 February 2000?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_final\" FROM \"singles_finals_10_7_3\" WHERE \"surface\"='hard' AND \"location\"='wellington, new zealand' AND \"date\"='6 february 2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_10_7_3\" (\n \"outcome\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score\" text\n);\n\nQuestion: What is Surface, when Date is 2 May 1999?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_finals_10_7_3\" WHERE \"date\"='2 may 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belarusian_clubs_in_euporean_cups\" (\n \"round\" text,\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg when team #1 is Rubin Kazan?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"belarusian_clubs_in_euporean_cups\" WHERE \"team_num1\"='rubin kazan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"belarusian_clubs_in_euporean_cups\" (\n \"round\" text,\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg when team #2 is 2006 UEFA Intertoto Cup?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"belarusian_clubs_in_euporean_cups\" WHERE \"team_num2\"='2006 uefa intertoto cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the highest market value in billions of the company with profits of 20.96 billions and 166.99 billions in assets?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"market_value_billion\") FROM \"2004_list\" WHERE \"profits_billion\"=20.96 AND \"assets_billion\">166.99;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the total market value in billions of the company with 20.96 billion in profits and less than 166.99 billions in assets?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"market_value_billion\") FROM \"2004_list\" WHERE \"profits_billion\"=20.96 AND \"assets_billion\"<166.99;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the average assets in billions of the company Bank of America, which has less than 49.01 billions in sales?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"assets_billion\") FROM \"2004_list\" WHERE \"company\"='bank of america' AND \"sales_billion\"<49.01;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.