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 \"schedule_and_results\" (\n \"game\" real,\n \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with record of 38-34-10"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"record\"='38-34-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Name the total number of April for game more than 81 and reord of 38-33-10"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"april\") FROM \"schedule_and_results\" WHERE \"record\"='38-33-10' AND \"game\">81;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: what series was on may 14"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"date\"='may 14';"
}
] |
[
{
"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 to par that has england as the country, with 66 as a score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"country\"='england' AND \"score\"=66;"
}
] |
[
{
"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 country has a score less than 68, and paul casey as the player?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"<68 AND \"player\"='paul casey';"
}
] |
[
{
"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 lowest score that has alastair forsyth as the player?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score\") FROM \"first_round\" WHERE \"player\"='alastair forsyth';"
}
] |
[
{
"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: How many scores have paul casey as a player?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"first_round\" WHERE \"player\"='paul casey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"pre_conversion\" text,\n \"entered_service_t\" text,\n \"re_entered_service_p\" text,\n \"owner\" text\n);\n\nQuestion: Who owns the item that was a T326 before conversion and re-entered service on 11 September 1985?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"locomotives\" WHERE \"re_entered_service_p\"='11 september 1985' AND \"pre_conversion\"='t326';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"pre_conversion\" text,\n \"entered_service_t\" text,\n \"re_entered_service_p\" text,\n \"owner\" text\n);\n\nQuestion: What date did the T328 that entered service on 18 June 1956 re-enter service?"
},
{
"role": "assistant",
"content": "SELECT \"re_entered_service_p\" FROM \"locomotives\" WHERE \"entered_service_t\"='18 june 1956' AND \"pre_conversion\"='t328';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"pre_conversion\" text,\n \"entered_service_t\" text,\n \"re_entered_service_p\" text,\n \"owner\" text\n);\n\nQuestion: Which of V/Line Passenger's pre-conversions re-entered service on 23 November 1984?"
},
{
"role": "assistant",
"content": "SELECT \"pre_conversion\" FROM \"locomotives\" WHERE \"owner\"='v/line passenger' AND \"re_entered_service_p\"='23 november 1984';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"pre_conversion\" text,\n \"entered_service_t\" text,\n \"re_entered_service_p\" text,\n \"owner\" text\n);\n\nQuestion: Who owns the locomotive that entered service on 30 October 1956?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"locomotives\" WHERE \"entered_service_t\"='30 october 1956';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the record was 50-85?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='50-85';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game when the record was 46-84?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='46-84';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record at the game with a loss of Cook (14\u20137)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='cook (14\u20137)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What album is 4:53 long?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"official_versions\" WHERE \"length\"='4:53';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which 1989 has a 1986 of 99?"
},
{
"role": "assistant",
"content": "SELECT \"1989\" FROM \"grand_slam_performance_timeline\" WHERE \"1986\"='99';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which 1983 has a Tournament of wimbledon?"
},
{
"role": "assistant",
"content": "SELECT \"1983\" FROM \"grand_slam_performance_timeline\" WHERE \"tournament\"='wimbledon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which Tournament has A in 1987?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"grand_slam_performance_timeline\" WHERE \"1987\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which 1988 has a 1985 of 2r?"
},
{
"role": "assistant",
"content": "SELECT \"1988\" FROM \"grand_slam_performance_timeline\" WHERE \"1985\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which 1988 has a 1982 of 104?"
},
{
"role": "assistant",
"content": "SELECT \"1988\" FROM \"grand_slam_performance_timeline\" WHERE \"1982\"='104';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_performance_timeline\" (\n \"tournament\" text,\n \"1981\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text\n);\n\nQuestion: Which Tournament has a 1984 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"grand_slam_performance_timeline\" WHERE \"1984\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Release date of 2008 q3 has what release price?"
},
{
"role": "assistant",
"content": "SELECT \"release_price_usd\" FROM \"table_of_intel_80579_processors\" WHERE \"release_date\"='2008 q3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Frequency of 1.2 ghz, and a Release price ( USD ) of $70 is what socket?"
},
{
"role": "assistant",
"content": "SELECT \"socket\" FROM \"table_of_intel_80579_processors\" WHERE \"frequency\"='1.2 ghz' AND \"release_price_usd\"='$70';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Socket of fcbga1088, and a Voltage of 1v, and a Part number(s) of nu80579ez600cnu80579ez600ct is what mult?"
},
{
"role": "assistant",
"content": "SELECT \"mult\" FROM \"table_of_intel_80579_processors\" WHERE \"socket\"='fcbga1088' AND \"voltage\"='1v' AND \"part_number_s\"='nu80579ez600cnu80579ez600ct';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Spec number of slj6d(b1)slj6f(b1) has what mult.?"
},
{
"role": "assistant",
"content": "SELECT \"mult\" FROM \"table_of_intel_80579_processors\" WHERE \"s_spec_number\"='slj6d(b1)slj6f(b1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Socket of without quickassist has what release price?"
},
{
"role": "assistant",
"content": "SELECT \"release_price_usd\" FROM \"table_of_intel_80579_processors\" WHERE \"socket\"='without quickassist';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_intel_80579_processors\" (\n \"s_spec_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: Release date of 2008 q3, and a Part number(s) of nu80579ez009c has what Release price ( USD )?"
},
{
"role": "assistant",
"content": "SELECT \"release_price_usd\" FROM \"table_of_intel_80579_processors\" WHERE \"release_date\"='2008 q3' AND \"part_number_s\"='nu80579ez009c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"new_zealand\" real,\n \"hong_kong\" real,\n \"singapore\" real,\n \"london\" real,\n \"brisbane\" real,\n \"cardiff\" real,\n \"durban\" real,\n \"santiago\" real,\n \"mar_del_plata\" real,\n \"beijing\" real,\n \"kuala_lumpur\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"hong_kong\") FROM \"standings\" WHERE \"brisbane\"=0 AND \"kuala_lumpur\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"new_zealand\" real,\n \"hong_kong\" real,\n \"singapore\" real,\n \"london\" real,\n \"brisbane\" real,\n \"cardiff\" real,\n \"durban\" real,\n \"santiago\" real,\n \"mar_del_plata\" real,\n \"beijing\" real,\n \"kuala_lumpur\" real,\n \"points\" real\n);\n\nQuestion: What is the highest Kuala Lumpur value with a Durban value less than 1 and a Mar Del Plata value greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"kuala_lumpur\") FROM \"standings\" WHERE \"durban\"<1 AND \"mar_del_plata\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"new_zealand\" real,\n \"hong_kong\" real,\n \"singapore\" real,\n \"london\" real,\n \"brisbane\" real,\n \"cardiff\" real,\n \"durban\" real,\n \"santiago\" real,\n \"mar_del_plata\" real,\n \"beijing\" real,\n \"kuala_lumpur\" real,\n \"points\" real\n);\n\nQuestion: What is the highest New Zealand value with a Hong Kong value less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"new_zealand\") FROM \"standings\" WHERE \"hong_kong\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"new_zealand\" real,\n \"hong_kong\" real,\n \"singapore\" real,\n \"london\" real,\n \"brisbane\" real,\n \"cardiff\" real,\n \"durban\" real,\n \"santiago\" real,\n \"mar_del_plata\" real,\n \"beijing\" real,\n \"kuala_lumpur\" real,\n \"points\" real\n);\n\nQuestion: What is the average Singapore value with a London value less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"singapore\") FROM \"standings\" WHERE \"london\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What position was picked for Canada on Pick 8?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"first_round_history\" WHERE \"country\"='canada' AND \"pick\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is the position that is shown for 2011?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"first_round_history\" WHERE \"year\"=2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personal_life\" (\n \"year\" real,\n \"song_title\" text,\n \"film_name\" text,\n \"language\" text,\n \"music_director\" text\n);\n\nQuestion: what language is seethaiah in"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"personal_life\" WHERE \"film_name\"='seethaiah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_to_2002\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: Which Producer has a Role of rizzette?"
},
{
"role": "assistant",
"content": "SELECT \"producer\" FROM \"2000_to_2002\" WHERE \"role\"='rizzette';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_to_2002\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: Which Title has a Director of rowell santiago?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"2000_to_2002\" WHERE \"director\"='rowell santiago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_to_2002\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: Which Year has a Producer of viva films, and a Title of magkapatid?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"2000_to_2002\" WHERE \"producer\"='viva films' AND \"title\"='magkapatid';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_to_2002\" (\n \"year\" text,\n \"title\" text,\n \"role\" text,\n \"producer\" text,\n \"director\" text\n);\n\nQuestion: Which Director has a Role of melissa?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"2000_to_2002\" WHERE \"role\"='melissa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_1992\" real\n);\n\nQuestion: What is the total number of averages where the played is more than 38, the 1990-91 is 39, and the 1989-90 is 34?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"relegation\" WHERE \"played\">38 AND \"1990_91\"='39' AND \"1989_90\"='34';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_1992\" real\n);\n\nQuestion: Which 1990-91 has an average number of 1.035?"
},
{
"role": "assistant",
"content": "SELECT \"1990_91\" FROM \"relegation\" WHERE \"average\"=1.035;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_1992\" real\n);\n\nQuestion: Which team has a 1990-91 number of 39 and a 1989-90 number of 34?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"relegation\" WHERE \"1990_91\"='39' AND \"1989_90\"='34';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_1992\" real\n);\n\nQuestion: Which played number has an average of 1.026 and a 1989-90 that is 36?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"relegation\" WHERE \"average\">1.026 AND \"1989_90\"='36';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_history\" (\n \"wrestler\" text,\n \"times\" real,\n \"date\" text,\n \"place\" text,\n \"successful_defenses\" real\n);\n\nQuestion: Who was the wrestler when there was over 1 time?"
},
{
"role": "assistant",
"content": "SELECT \"wrestler\" FROM \"title_history\" WHERE \"times\">1;"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What results has a week larger than 13?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">13;"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What results has a week smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<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\" text,\n \"record\" text\n);\n\nQuestion: What was the score for game number 30?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=30;"
}
] |
[
{
"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: What is the sum for the game with a score of 103\u2013126?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"score\"='103\u2013126';"
}
] |
[
{
"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: What is the lowest game number that has a Record of 3\u201333?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"record\"='3\u201333';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: what score was on february 21"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"february\"=21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the nationality of the player from the Ohio State University (NCAA) Team?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='ohio state university (ncaa)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the lowest round of the Kitchener Rangers (OHA)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='kitchener rangers (oha)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the position of Pierre Daigneault?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='pierre daigneault';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the average 2006 value with a 2010 value of 417.9 and a 2011 value greater than 426.7?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2006\") FROM \"economic_profile\" WHERE \"2010\"=417.9 AND \"2011\">426.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the 2011 total with a 2008 value greater than 346.5, a 2009 value of 392, and a 2010 value bigger than 354.6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2011\") FROM \"economic_profile\" WHERE \"2008\">346.5 AND \"2009\"=392 AND \"2010\">354.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the total 2008 value with a 2006 value greater than 322.7, a 353.9 in 2011, and a 2009 less than 392?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2008\") FROM \"economic_profile\" WHERE \"2006\">322.7 AND \"2011\"=353.9 AND \"2009\"<392;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the highest 2009 value with a 2006 value smaller than 280.4, a 2007 less than 2.2, and a 2011 less than 3.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2009\") FROM \"economic_profile\" WHERE \"2006\"<280.4 AND \"2007\"<2.2 AND \"2010\"<3.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the average 2007 value with a 2009 value greater than 2.8, a 4.9 in 2010, and a 2006 less than 2.5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2007\") FROM \"economic_profile\" WHERE \"2009\">2.8 AND \"2010\"=4.9 AND \"2006\"<2.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"economic_profile\" (\n \"geographic_unit\" text,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real\n);\n\nQuestion: What is the 2006 total with a 2010 value greater than 417.9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2006\") FROM \"economic_profile\" WHERE \"2010\">417.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: when has an Opponent of @ philadelphia phillies and an Attendance of 20,072?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='@ philadelphia phillies' AND \"attendance\"='20,072';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Opponent is on april 28?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has an Attendance of 24,597?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='24,597';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Loss of o'connor (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='o''connor (0-1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: which attendance has a Loss of drese (0-2)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='drese (0-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Who is the person that has 119.5 m?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"sapporo\" WHERE \"1st_m\"=119.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the highest 2nd in (m) that has a Rank more than 2 and Points more than 249.3"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2nd_m\") FROM \"sapporo\" WHERE \"rank\">2 AND \"points\">249.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which 2nd (m) has a 1st (m) of 120.5 and Points smaller than 249.9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"2nd_m\") FROM \"sapporo\" WHERE \"1st_m\"=120.5 AND \"points\"<249.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What is the first date of election for the incumbent that was re-elected in the South Carolina 1 district?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"south_carolina\" WHERE \"result\"='re-elected' AND \"district\"='south carolina 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Who was the incumbent who was first elected in 1876?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"south_carolina\" WHERE \"first_elected\"='1876';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: Who was the Democratic incumbent in the South Carolina 5 District?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"south_carolina\" WHERE \"party\"='democratic' AND \"district\"='south carolina 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: What is the first elected date for the incumbent in the South Carolina 4 district?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"south_carolina\" WHERE \"district\"='south carolina 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"number\" real,\n \"name_of_administrative_unit\" text,\n \"telephone_052\" text,\n \"area_km_2\" real,\n \"population_people\" real\n);\n\nQuestion: Which area has a telephone of (052) of 3862279?"
},
{
"role": "assistant",
"content": "SELECT \"area_km_2\" FROM \"administrative_divisions\" WHERE \"telephone_052\"='3862279';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"administrative_divisions\" (\n \"number\" real,\n \"name_of_administrative_unit\" text,\n \"telephone_052\" text,\n \"area_km_2\" real,\n \"population_people\" real\n);\n\nQuestion: What is the sum of area with a population of 5,615 and number more than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"area_km_2\") FROM \"administrative_divisions\" WHERE \"population_people\"='5,615' AND \"number\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season\" (\n \"driver\" text,\n \"points\" real,\n \"season\" text,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: Which driver had points over 252 in the season of 2012 with a percentage of possible points at 55.60%?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"most_championship_points_in_a_season\" WHERE \"points\">252 AND \"season\"='2012' AND \"percentage_of_possible_points\"='55.60%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season\" (\n \"driver\" text,\n \"points\" real,\n \"season\" text,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: What is the number of races that took place with points of 257?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"races\") FROM \"most_championship_points_in_a_season\" WHERE \"points\"=257;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season\" (\n \"driver\" text,\n \"points\" real,\n \"season\" text,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: What is the number of points that driver fernando alonso has in the season he had 20 races?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"most_championship_points_in_a_season\" WHERE \"races\"=20 AND \"driver\"='fernando alonso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_championship_points_in_a_season\" (\n \"driver\" text,\n \"points\" real,\n \"season\" text,\n \"races\" real,\n \"percentage_of_possible_points\" text\n);\n\nQuestion: What was the average Points of the season driver Fernando Alonso had a percentage of possible points of 53.05%?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"most_championship_points_in_a_season\" WHERE \"driver\"='fernando alonso' AND \"percentage_of_possible_points\"='53.05%';"
}
] |
[
{
"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 \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position has 217 as the pick?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"=217;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which score has a record of 18-21-7?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='18-21-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the lowest value for apps in 2009 season in a division less than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"apps\") FROM \"career_statistics\" WHERE \"season\"='2009' AND \"division\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_statistics\" (\n \"season\" text,\n \"team\" text,\n \"country\" text,\n \"division\" real,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What is the sum of goals for Torpedo Moscow in division 1 with an apps value less than 29?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals\") FROM \"career_statistics\" WHERE \"team\"='torpedo moscow' AND \"division\"=1 AND \"apps\"<29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Which Remixed by has a Version of album version, and an Album of les mots?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"version\"='album version' AND \"album\"='les mots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: How long was the instrumental version in 1986?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"official_versions\" WHERE \"year\"=1986 AND \"version\"='instrumental';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Which long version was remixed in 1986?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"year\"=1986 AND \"version\"='long version';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who was Canada's lead?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"country\"='canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What was Canada's skip?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"country\"='canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which country has a Lead of sarah wazney?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"teams\" WHERE \"lead\"='sarah wazney';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Lead has a Third of jeanne ellegaard?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"third\"='jeanne ellegaard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Skip has a Third of sara carlsson?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"third\"='sara carlsson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Skip has a Second of vicki adams?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"second\"='vicki adams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"county\" text\n);\n\nQuestion: Enrollment that has a School of south central (union mills) has what sum?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='south central (union mills)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"county\" text\n);\n\nQuestion: Mascot of blazers involves what city?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='blazers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"city\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"county\" text\n);\n\nQuestion: County of 46 laporte is what school?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='46 laporte';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average Laps that shows spun off for time?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"sprint_race\" WHERE \"time\"='spun off';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average Laps for the Mexico team with a grid number of more than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"sprint_race\" WHERE \"grid\">1 AND \"team\"='mexico';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is name of the drive with a Time of +13.315?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"sprint_race\" WHERE \"time\"='+13.315';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total grid number that has 14 laps and a time of +29.483?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"sprint_race\" WHERE \"laps\"=14 AND \"time\"='+29.483';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total number of Laps when collision shows for time for Switzerland and less than 11 for grid?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"sprint_race\" WHERE \"time\"='collision' AND \"team\"='switzerland' AND \"grid\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the time of the game after week 4 against the Baltimore Ravens?"
},
{
"role": "assistant",
"content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"week\">4 AND \"opponent\"='baltimore ravens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"nominated_work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What nominated work has seattle international film festival as the award?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"award\"='seattle international film festival';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"nominated_work\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What award has breakthrough performance as the category?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"category\"='breakthrough performance';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.