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 \"honour_board\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"club_champion\" text,\n \"leading_goalkicker\" text,\n \"player_s_player\" text,\n \"iron_man_award\" text,\n \"community_award\" text,\n \"most_professional\" text,\n \"most_improved\" text,\n \"neafl_player_of_the_year\" text\n);\n\nQuestion: How many Years have an Iron Man Award of kyal horsley?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"honour_board\" WHERE \"iron_man_award\"='kyal horsley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honour_board\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"club_champion\" text,\n \"leading_goalkicker\" text,\n \"player_s_player\" text,\n \"iron_man_award\" text,\n \"community_award\" text,\n \"most_professional\" text,\n \"most_improved\" text,\n \"neafl_player_of_the_year\" text\n);\n\nQuestion: Which Coach has a Most Improved of rory thompson?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"honour_board\" WHERE \"most_improved\"='rory thompson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honour_board\" (\n \"year\" real,\n \"coach\" text,\n \"captain\" text,\n \"club_champion\" text,\n \"leading_goalkicker\" text,\n \"player_s_player\" text,\n \"iron_man_award\" text,\n \"community_award\" text,\n \"most_professional\" text,\n \"most_improved\" text,\n \"neafl_player_of_the_year\" text\n);\n\nQuestion: Which Year has a Community Award of jarrod harbrow?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"honour_board\" WHERE \"community_award\"='jarrod harbrow';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summaries\" (\n \"team\" text,\n \"manager\" text,\n \"home_city\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: what is the capacity for the team \u0161ibenik?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"capacity\") FROM \"summaries\" WHERE \"team\"='\u0161ibenik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summaries\" (\n \"team\" text,\n \"manager\" text,\n \"home_city\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: what is the stadium for \u010dakovec?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"summaries\" WHERE \"team\"='\u010dakovec';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summaries\" (\n \"team\" text,\n \"manager\" text,\n \"home_city\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: what is the capacity when the home city is zagreb and the manager is zlatko kranj\u010dar?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"summaries\" WHERE \"home_city\"='zagreb' AND \"manager\"='zlatko kranj\u010dar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summaries\" (\n \"team\" text,\n \"manager\" text,\n \"home_city\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: what is the home city for the stadion src mladost?"
},
{
"role": "assistant",
"content": "SELECT \"home_city\" FROM \"summaries\" WHERE \"stadium\"='stadion src mladost';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid for the driver with an electrical time/retired and 51 laps?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"time_retired\"='electrical' AND \"laps\"=51;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who is the driver with 1 grid?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"=1;"
}
] |
[
{
"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 place was Mark Carnevale in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"player\"='mark carnevale';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: What was the highest attendance against Real Juventud?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"round_4\" WHERE \"away\"='real juventud';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_matches\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who is the away captain for the matches dated 7,8,10,11 feb 1908?"
},
{
"role": "assistant",
"content": "SELECT \"away_captain\" FROM \"test_matches\" WHERE \"date\"='7,8,10,11 feb 1908';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_matches\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who is the home captain at the Adelaide Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_captain\" FROM \"test_matches\" WHERE \"venue\"='adelaide oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_matches\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: Who is the home captain that won AUS by 245 runs?"
},
{
"role": "assistant",
"content": "SELECT \"home_captain\" FROM \"test_matches\" WHERE \"result\"='aus by 245 runs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_matches\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What was the venue for the dates 1,2,3,4,6,7 jan 1908?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"test_matches\" WHERE \"date\"='1,2,3,4,6,7 jan 1908';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_matches\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What was the venue for the dates 7,8,10,11 Feb 1908?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"test_matches\" WHERE \"date\"='7,8,10,11 feb 1908';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"technology_comparison_for_grid_level_app\" (\n \"technology\" text,\n \"moving_parts\" text,\n \"room_temperature\" text,\n \"flammable\" text,\n \"toxic_materials\" text,\n \"in_production\" text,\n \"rare_metals\" text\n);\n\nQuestion: What's the production if the technology is sodium-sulfur batteries and yes to toxic materials?"
},
{
"role": "assistant",
"content": "SELECT \"in_production\" FROM \"technology_comparison_for_grid_level_app\" WHERE \"toxic_materials\"='yes' AND \"technology\"='sodium-sulfur batteries';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"technology_comparison_for_grid_level_app\" (\n \"technology\" text,\n \"moving_parts\" text,\n \"room_temperature\" text,\n \"flammable\" text,\n \"toxic_materials\" text,\n \"in_production\" text,\n \"rare_metals\" text\n);\n\nQuestion: What are the moving parts of lead-acid?"
},
{
"role": "assistant",
"content": "SELECT \"moving_parts\" FROM \"technology_comparison_for_grid_level_app\" WHERE \"technology\"='lead-acid';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"technology_comparison_for_grid_level_app\" (\n \"technology\" text,\n \"moving_parts\" text,\n \"room_temperature\" text,\n \"flammable\" text,\n \"toxic_materials\" text,\n \"in_production\" text,\n \"rare_metals\" text\n);\n\nQuestion: What's the room temperature with no toxic materials and no ln production?"
},
{
"role": "assistant",
"content": "SELECT \"room_temperature\" FROM \"technology_comparison_for_grid_level_app\" WHERE \"in_production\"='no' AND \"toxic_materials\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"technology_comparison_for_grid_level_app\" (\n \"technology\" text,\n \"moving_parts\" text,\n \"room_temperature\" text,\n \"flammable\" text,\n \"toxic_materials\" text,\n \"in_production\" text,\n \"rare_metals\" text\n);\n\nQuestion: What's the technology when there are no moving parts but yes to toxic materials?"
},
{
"role": "assistant",
"content": "SELECT \"technology\" FROM \"technology_comparison_for_grid_level_app\" WHERE \"toxic_materials\"='yes' AND \"moving_parts\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the Score for T9 United States Player Kirk Triplett?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t9' AND \"country\"='united states' AND \"player\"='kirk triplett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Tiger Woods from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='tiger woods';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"apps\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: what is the assists when the club is chicago fire and goals is more than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"assists\") FROM \"statistics\" WHERE \"club\"='chicago fire' AND \"goals\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"country\" text,\n \"apps\" real,\n \"goals\" real,\n \"assists\" real\n);\n\nQuestion: what is the most assists when the goals is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"assists\") FROM \"statistics\" WHERE \"goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_5_0_5\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Score in The Final, when Date is \"1981\"?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"singles_finals_5_0_5\" WHERE \"date\"=1981;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_5_0_5\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Opponent in The Final, when Date is \"1976\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_finals_5_0_5\" WHERE \"date\"=1976;"
}
] |
[
{
"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_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Location Attendance, when Date is \"December 30\"?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='december 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 \"team\" text,\n \"score\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when High Rebounds is \"Amar'e Stoudemire (13)\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_rebounds\"='amar''e stoudemire (13)';"
}
] |
[
{
"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_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Location Attendance is \"US Airways Center 18,422\", and when Game is less than 22?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"location_attendance\"='us airways center 18,422' AND \"game\"<22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Game is \"19\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=19;"
}
] |
[
{
"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_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Location Attendance, when Team is \"Orlando\"?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='orlando';"
}
] |
[
{
"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_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Date is \"December 30\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='december 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_charts\" (\n \"date\" text,\n \"rank\" real,\n \"weekend_gross\" text,\n \"theaters\" real,\n \"gross_to_date\" text\n);\n\nQuestion: Name the Theaters that has a Rank larger than 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"theaters\") FROM \"box_office_charts\" WHERE \"rank\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"box_office_charts\" (\n \"date\" text,\n \"rank\" real,\n \"weekend_gross\" text,\n \"theaters\" real,\n \"gross_to_date\" text\n);\n\nQuestion: Name the Gross-to-date which has a Date of august 23\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"gross_to_date\" FROM \"box_office_charts\" WHERE \"date\"='august 23\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Name the Round which has a Position of defensive back and a Pick of 226?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"position\"='defensive back' AND \"pick\"=226;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Name the Round which has a Player of zack walz?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"player\"='zack walz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Name the Round which has a Position of defensive back and corey chavous?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"position\"='defensive back' AND \"player\"='corey chavous';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Name all Pick that has a Round of 7, and a School/Club Team of arizona st.?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"round\"=7 AND \"school_club_team\"='arizona st.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"the_year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year has a Regular Season of 7th?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"the_year\") FROM \"year_by_year\" WHERE \"regular_season\"='7th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"the_year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year has a Division larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"the_year\") FROM \"year_by_year\" WHERE \"division\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"the_year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year did not qualify for Playoffs, and had a Division smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"the_year\") FROM \"year_by_year\" WHERE \"playoffs\"='did not qualify' AND \"division\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"the_year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which league did not qualify for the Playoffs, and had a Year larger than 2008?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"playoffs\"='did not qualify' AND \"the_year\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Home Team, when Away Team Score is 10.8 (64)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"group_a\" WHERE \"away_team_score\"='10.8 (64)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Lowest Crowd, when Home Team is Brisbane Lions?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"group_a\" WHERE \"home_team\"='brisbane lions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Date, when Away Team is Kangaroos?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"group_a\" WHERE \"away_team\"='kangaroos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Ground, when Home Team Score is 12.14 (86)?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"group_a\" WHERE \"home_team_score\"='12.14 (86)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is Away Team, when Home Team is Kangaroos, and when Away Team Score is 9.11 (65)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"group_a\" WHERE \"home_team\"='kangaroos' AND \"away_team_score\"='9.11 (65)';"
}
] |
[
{
"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 smallest round with a time of 1:12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:12';"
}
] |
[
{
"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: How long was the time for the Legacy Fighting Championship 12?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='legacy fighting championship 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT COUNTRY HAS A TO PAR OF +1, WITH WOODY AUSTIN?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"to_par\"='+1' AND \"player\"='woody austin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS THE TO PAR FOR ERNIE ELS?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"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: WHAT PLACE DOES TOM LEHMAN HAVE?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='tom lehman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS THE TO PAR FOR NUMBER 1?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"place\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS TEH PLAYER WITH A TO PAR OF +1 FOR SCOTLAND?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='+1' AND \"country\"='scotland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"year\" real,\n \"e3_harelbeke_bel\" text,\n \"gent_wevelgem_bel\" text,\n \"tour_of_flanders_bel\" text,\n \"paris_roubaix_fra\" text\n);\n\nQuestion: Who won the Paris-Roubaix in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"paris_roubaix_fra\" FROM \"see_also\" WHERE \"year\"=2006;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: Who built the conant creek pegram truss railroad bridge?"
},
{
"role": "assistant",
"content": "SELECT \"built\" FROM \"references\" WHERE \"name\"='conant creek pegram truss railroad bridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: Where is the historic place that was built in 1910?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"references\" WHERE \"built\"='1910';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: What is the list date of the historic place that was built 1896, 1914?"
},
{
"role": "assistant",
"content": "SELECT \"listed\" FROM \"references\" WHERE \"built\"='1896, 1914';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"name\" text,\n \"built\" text,\n \"listed\" text,\n \"location\" text,\n \"county\" text\n);\n\nQuestion: When was the historic place listed that's in canyon county?"
},
{
"role": "assistant",
"content": "SELECT \"listed\" FROM \"references\" WHERE \"county\"='canyon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the averaging time when the regulatory citation is 40 cfr 50.4(b)?"
},
{
"role": "assistant",
"content": "SELECT \"averaging_time\" FROM \"standards\" WHERE \"regulatory_citation\"='40 cfr 50.4(b)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the regulatory citation when the standard is 15 \u03bcg/m\u00b3?"
},
{
"role": "assistant",
"content": "SELECT \"regulatory_citation\" FROM \"standards\" WHERE \"standard\"='15 \u03bcg/m\u00b3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the standard when the pollutant is o 3 and averaging time is 8-hour?"
},
{
"role": "assistant",
"content": "SELECT \"standard\" FROM \"standards\" WHERE \"pollutant\"='o 3' AND \"averaging_time\"='8-hour';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the polluntant when the regulatory citation is 40 cfr 50.7(a) and the type is primary?"
},
{
"role": "assistant",
"content": "SELECT \"pollutant\" FROM \"standards\" WHERE \"regulatory_citation\"='40 cfr 50.7(a)' AND \"type\"='primary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the type when the averaging time is 1-hour and the standard is 0.12 ppm (235 \u03bcg/m\u00b3)?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"standards\" WHERE \"averaging_time\"='1-hour' AND \"standard\"='0.12 ppm (235 \u03bcg/m\u00b3)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standards\" (\n \"pollutant\" text,\n \"type\" text,\n \"standard\" text,\n \"averaging_time\" text,\n \"regulatory_citation\" text\n);\n\nQuestion: what is the type when the regulatory citation is 40 cfr 50.9(a)?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"standards\" WHERE \"regulatory_citation\"='40 cfr 50.9(a)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"per_competition\" (\n \"player\" text,\n \"league\" real,\n \"title_playoff\" real,\n \"super_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest League, when Title Playoff is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league\") FROM \"per_competition\" WHERE \"title_playoff\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"per_competition\" (\n \"player\" text,\n \"league\" real,\n \"title_playoff\" real,\n \"super_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Title Playoff, when Total is less than 3, and when League is greater than \"2\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"title_playoff\") FROM \"per_competition\" WHERE \"total\"<3 AND \"league\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"per_competition\" (\n \"player\" text,\n \"league\" real,\n \"title_playoff\" real,\n \"super_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Title Playoff, when League is greater than 3, and when Super Cup is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"title_playoff\") FROM \"per_competition\" WHERE \"league\">3 AND \"super_cup\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"per_competition\" (\n \"player\" text,\n \"league\" real,\n \"title_playoff\" real,\n \"super_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of Super Cup, when Title Playoff is \"0\", when Total is greater than 9, and when League is less than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"super_cup\") FROM \"per_competition\" WHERE \"title_playoff\"=0 AND \"total\">9 AND \"league\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the jazz played against toronto?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game against miami?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='miami';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the Opponent in Week 7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Attendance on November 7, 1999?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='november 7, 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the Opponent of the Game with a Result of l 23-41?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 23-41';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Attendance in Week 1?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: How much average Finish has Starts of 9, and a Top 10 smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_finish\") FROM \"nascar_sprint_cup_series\" WHERE \"starts\"=9 AND \"top_10\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: Which Winnings have Starts larger than 34, and Poles smaller than 1, and a Top 10 of 5?"
},
{
"role": "assistant",
"content": "SELECT \"winnings\" FROM \"nascar_sprint_cup_series\" WHERE \"starts\">34 AND \"poles\"<1 AND \"top_10\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planitia\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: Which Diameter (km) has a Name of alma-merghen planitia, and a Year named smaller than 1997?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"diameter_km\") FROM \"planitia\" WHERE \"name\"='alma-merghen planitia' AND \"year_named\"<1997;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planitia\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: Which Longitude has a Latitude of 73.0s, and a Name of aibarchin planitia?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"planitia\" WHERE \"latitude\"='73.0s' AND \"name\"='aibarchin planitia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planitia\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: Which Year named has a Name of nuptadi planitia, and a Diameter (km) larger than 1,200.0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year_named\") FROM \"planitia\" WHERE \"name\"='nuptadi planitia' AND \"diameter_km\">'1,200.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planitia\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: Which Latitude has a Year named smaller than 1997, and a Name of aino planitia?"
},
{
"role": "assistant",
"content": "SELECT \"latitude\" FROM \"planitia\" WHERE \"year_named\"<1997 AND \"name\"='aino planitia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: In what tournament did Cipolla face Sergio Roitman?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_7\" WHERE \"opponent\"='sergio roitman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_nielsen_ratings\" (\n \"rating\" real,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" real,\n \"rank_overall\" text\n);\n\nQuestion: What is the Rating/Share (18-49) that also has a Share greater than 10 and 12.42 million Viewers?"
},
{
"role": "assistant",
"content": "SELECT \"rating_share_18_49\" FROM \"us_nielsen_ratings\" WHERE \"share\">10 AND \"viewers_millions\"=12.42;"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has a Record of 2-9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"record\"='2-9';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has an Attendance smaller than 70,056, and an Opponent of at minnesota vikings?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"<'70,056' AND \"opponent\"='at minnesota vikings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1993 finish for the event that had a 1990 of QF and 1995 of 2R?"
},
{
"role": "assistant",
"content": "SELECT \"1993\" FROM \"doubles_performance_timeline\" WHERE \"1990\"='qf' AND \"1995\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is the 1994 finish for the Miami tournament?"
},
{
"role": "assistant",
"content": "SELECT \"1994\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='miami';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par score from Brad Faxon of the United States with a score of 73-68=141?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"score\"='73-68=141' AND \"player\"='brad faxon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the to par score in T8 place from Zimbabwe and has a score of 73-68=141?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t8' AND \"score\"='73-68=141' AND \"country\"='zimbabwe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the score of Lee Janzen in T4 place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t4' AND \"player\"='lee janzen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the score of Jeff Maggert in T2 place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t2' AND \"player\"='jeff maggert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the to par when the score was 68-73=141?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='68-73=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What's the total number of game that has 377 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"points\" WHERE \"points\"=377;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What's the total number of points that the rank is less than 5 and has Tiago Splitter?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"points\" WHERE \"name\"='tiago splitter' AND \"rank\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of games that has Juan Carlos Navarro and more than 266 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"points\" WHERE \"points\">266 AND \"name\"='juan carlos navarro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What's the rank of Igor Rako\u010devi\u0107 of Tau Cer\u00e1mica with more than 377 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"points\" WHERE \"team\"='tau cer\u00e1mica' AND \"name\"='igor rako\u010devi\u0107' AND \"points\">377;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What's the rank of the Tau Cer\u00e1mica that has 377 points and more than 21 games?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"points\" WHERE \"team\"='tau cer\u00e1mica' AND \"points\"=377 AND \"games\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aircraft\" (\n \"aircraft\" text,\n \"origin\" text,\n \"squadron\" text,\n \"display_aircraft\" real,\n \"dates\" text\n);\n\nQuestion: What are the dates of squadron 33?"
},
{
"role": "assistant",
"content": "SELECT \"dates\" FROM \"aircraft\" WHERE \"squadron\"='squadron 33';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_a_star_talent_search_winners\" (\n \"year\" real,\n \"award\" text,\n \"name\" text,\n \"institution\" text,\n \"chief_judge\" text\n);\n\nQuestion: What institution won 2nd more recently than 2007 with Peter Agre as Chief Judge?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"list_of_a_star_talent_search_winners\" WHERE \"year\">2007 AND \"award\"='2nd' AND \"chief_judge\"='peter agre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_a_star_talent_search_winners\" (\n \"year\" real,\n \"award\" text,\n \"name\" text,\n \"institution\" text,\n \"chief_judge\" text\n);\n\nQuestion: What student won 3rd with Peter Agre as Chief Judge?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_a_star_talent_search_winners\" WHERE \"chief_judge\"='peter agre' AND \"award\"='3rd';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.