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 \"tallest_buildings\" (\n \"name\" text,\n \"location\" text,\n \"height_m\" real,\n \"stories\" real,\n \"year_of_completion\" real\n);\n\nQuestion: What is the largest number of stories in Recife completed later than 2007 with a height less than 135 meters?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"stories\") FROM \"tallest_buildings\" WHERE \"location\"='recife' AND \"year_of_completion\">2007 AND \"height_m\"<135;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which Sanskrit has an English of mindfulness of breathing?"
},
{
"role": "assistant",
"content": "SELECT \"sanskrit\" FROM \"key_terms\" WHERE \"english\"='mindfulness of breathing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which Sanskrit has a Chinese of \u2014, and an English of cultivation of settling?"
},
{
"role": "assistant",
"content": "SELECT \"sanskrit\" FROM \"key_terms\" WHERE \"chinese\"='\u2014' AND \"english\"='cultivation of settling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which Pali has an English of mindfulness of breathing?"
},
{
"role": "assistant",
"content": "SELECT \"pali\" FROM \"key_terms\" WHERE \"english\"='mindfulness of breathing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which Pali has an English of meditative concentration?"
},
{
"role": "assistant",
"content": "SELECT \"pali\" FROM \"key_terms\" WHERE \"english\"='meditative concentration';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which Chinese has a Pali of atappa?"
},
{
"role": "assistant",
"content": "SELECT \"chinese\" FROM \"key_terms\" WHERE \"pali\"='atappa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key_terms\" (\n \"english\" text,\n \"pali\" text,\n \"sanskrit\" text,\n \"chinese\" text,\n \"tibetan\" text\n);\n\nQuestion: Which English has a Sanskrit of sam\u0101dhi?"
},
{
"role": "assistant",
"content": "SELECT \"english\" FROM \"key_terms\" WHERE \"sanskrit\"='sam\u0101dhi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player in guard position from Stephen F. Austin in a round less than 8?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\"<8 AND \"position\"='guard' AND \"school_club_team\"='stephen f. austin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position has a pick less than 41 from Ohio State?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"pick\"<41 AND \"school_club_team\"='ohio state';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2006 when 2002 is Grand Slam Tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2002\"='grand slam tournaments';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2002 when 2006 is Grand Slam Tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='grand slam tournaments';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2005 when 2002 shows 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"doubles_performance_timeline\" WHERE \"2002\"='0\u20131';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2006 when 2002 is 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2002\"='0\u20131';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2002 when the 2004 is A, and the 2005 is 1r?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"doubles_performance_timeline\" WHERE \"2004\"='a' AND \"2005\"='1r';"
}
] |
[
{
"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 \"2002\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text\n);\n\nQuestion: What shows for 2004 when 2005 is A, 2006 is A, tournament is US Open?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"doubles_performance_timeline\" WHERE \"2005\"='a' AND \"2006\"='a' AND \"tournament\"='us open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent on December 2, 1962?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 2, 1962';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the Population of the Town with a Census Ranking of 1,379 of 5,008 and an Area km 2 smaller than 8.35?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"communities\" WHERE \"status\"='town' AND \"census_ranking\"='1,379 of 5,008' AND \"area_km_2\"<8.35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the Official Name of the Community with an Area km 2 of 16.13?"
},
{
"role": "assistant",
"content": "SELECT \"official_name\" FROM \"communities\" WHERE \"area_km_2\"=16.13;"
}
] |
[
{
"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 Country, when To Par is \"\u20132\", and when Player is \"Tsuneyuki Nakajima\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"to_par\"='\u20132' AND \"player\"='tsuneyuki nakajima';"
}
] |
[
{
"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 Country, when Score is \"72-65=137\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='72-65=137';"
}
] |
[
{
"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 Country, when Place is \"T3\", and when Player is \"Jim Thorpe\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t3' AND \"player\"='jim thorpe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the team for game 34?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: How many goals for had a drawn more than 12 for the Goole Town team, as well as more than 60 goals against?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_for\") FROM \"final_table\" WHERE \"drawn\">12 AND \"team\"='goole town' AND \"goals_against\">60;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What are the average goals for with a drawn higher than 7 and goals against less than 86, as well as more than 11 losses and more than 42 games played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_for\") FROM \"final_table\" WHERE \"drawn\">7 AND \"goals_against\"<86 AND \"lost\">11 AND \"played\">42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" real\n);\n\nQuestion: What is the highest lost with a drawn more than 11, a position lower than 17 and more than 61 goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"final_table\" WHERE \"drawn\">11 AND \"position\"<17 AND \"goals_for\">61;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: Who held the title of Ruler?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"vassal_states\" WHERE \"title\"='ruler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What type of state did the ruler have a title?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"vassal_states\" WHERE \"title\"='ruler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: In what state did Jing have the title of Marquis?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"title\"='marquis' AND \"name\"='jing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What was Gongbo's title?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"vassal_states\" WHERE \"name\"='gongbo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text\n);\n\nQuestion: What is the name of Yi's state?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"name\"='yi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_other_buses\" (\n \"name\" text,\n \"raw_bandwidth_mbit_s\" text,\n \"max_cable_length_m\" text,\n \"power_provided\" text,\n \"devices_per_channel\" text\n);\n\nQuestion: What is the Devices per channel where the Name is sata revision 3.0?"
},
{
"role": "assistant",
"content": "SELECT \"devices_per_channel\" FROM \"comparison_with_other_buses\" WHERE \"name\"='sata revision 3.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_with_other_buses\" (\n \"name\" text,\n \"raw_bandwidth_mbit_s\" text,\n \"max_cable_length_m\" text,\n \"power_provided\" text,\n \"devices_per_channel\" text\n);\n\nQuestion: What is the Raw bandwidth (Mbit/s) for the SAS 300?"
},
{
"role": "assistant",
"content": "SELECT \"raw_bandwidth_mbit_s\" FROM \"comparison_with_other_buses\" WHERE \"name\"='sas 300';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: Which Ground has a Home team score of 18.12 (120)?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"group_2\" WHERE \"home_team_score\"='18.12 (120)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: Name the Away team score which has an Away team of st kilda, and a Crowd of 8157?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"group_2\" WHERE \"away_team\"='st kilda' AND \"crowd\"=8157;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: Name the Away team which have a Ground of colonial stadium on friday, 2 march?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"group_2\" WHERE \"ground\"='colonial stadium' AND \"date\"='friday, 2 march';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which team has 71 Points and F/Laps of 4?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"career_summary\" WHERE \"points\"='71' AND \"f_laps\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What Poles do Team jva have?"
},
{
"role": "assistant",
"content": "SELECT \"poles\" FROM \"career_summary\" WHERE \"team\"='team jva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: If the Season is later than 2008 and Races is 11, what ate the Points?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"career_summary\" WHERE \"races\"='11' AND \"season\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What Position is Team Sahara Force india f1 team with 46 Points?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"career_summary\" WHERE \"team\"='sahara force india f1 team' AND \"points\"='46';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which Poles have a position of 4th?"
},
{
"role": "assistant",
"content": "SELECT \"poles\" FROM \"career_summary\" WHERE \"position\"='4th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which F/Laps have 27 Points?"
},
{
"role": "assistant",
"content": "SELECT \"f_laps\" FROM \"career_summary\" WHERE \"points\"='27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_500_a\" (\n \"name\" text,\n \"pinnacle_height\" text,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What country has the SBA Towers Tower Hayneville?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"structures_past_or_present_between_500_a\" WHERE \"name\"='sba towers tower hayneville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_500_a\" (\n \"name\" text,\n \"pinnacle_height\" text,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What type of structure is there at the American Tower Christmas?"
},
{
"role": "assistant",
"content": "SELECT \"structure_type\" FROM \"structures_past_or_present_between_500_a\" WHERE \"name\"='american tower christmas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"structures_past_or_present_between_500_a\" (\n \"name\" text,\n \"pinnacle_height\" text,\n \"structure_type\" text,\n \"main_use\" text,\n \"country\" text,\n \"town\" text\n);\n\nQuestion: What's the name of the structure at Egypt, Arkansas?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"structures_past_or_present_between_500_a\" WHERE \"town\"='egypt, arkansas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grandmasters\" (\n \"name\" text,\n \"country\" text,\n \"birth_date\" text,\n \"date\" real,\n \"earned\" text,\n \"peak_rating_nov_2012\" real\n);\n\nQuestion: What country was the woman from who was born 1976-07-23 and became a grandmaster in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"grandmasters\" WHERE \"date\"=1991 AND \"birth_date\"='1976-07-23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_libertadores_playoff\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"bonus_points\" text,\n \"points\" real\n);\n\nQuestion: Name the Points which has a Team of sportivo luque\u00f1o, and Wins larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"pre_libertadores_playoff\" WHERE \"team\"='sportivo luque\u00f1o' AND \"wins\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_libertadores_playoff\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"bonus_points\" text,\n \"points\" real\n);\n\nQuestion: Name the Wins which has Points smaller than 10, Losses smaller than 3, and a Scored of 11?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"pre_libertadores_playoff\" WHERE \"points\"<10 AND \"losses\"<3 AND \"scored\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_libertadores_playoff\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"bonus_points\" text,\n \"points\" real\n);\n\nQuestion: Please name the highest Conceded which has a Played smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"conceded\") FROM \"pre_libertadores_playoff\" WHERE \"played\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_libertadores_playoff\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"bonus_points\" text,\n \"points\" real\n);\n\nQuestion: Please name the Losses that has a Played smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"pre_libertadores_playoff\" WHERE \"played\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_libertadores_playoff\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"bonus_points\" text,\n \"points\" real\n);\n\nQuestion: Name the Scored which has a Position larger than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scored\") FROM \"pre_libertadores_playoff\" WHERE \"position\">6;"
}
] |
[
{
"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 is the earliest week with an opponent of cincinnati bengals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='cincinnati bengals';"
}
] |
[
{
"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 is the sum for the week with the date october 30, 1994?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='october 30, 1994';"
}
] |
[
{
"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 is the date for a week before 9, and a opponent of dallas cowboys?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<9 AND \"opponent\"='dallas cowboys';"
}
] |
[
{
"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 is the biggest week with an opponent of washington redskins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"opponent\"='washington redskins';"
}
] |
[
{
"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 for a week larger than 3, and an opponent of philadelphia eagles?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\">3 AND \"opponent\"='philadelphia eagles';"
}
] |
[
{
"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 \"round\" text\n);\n\nQuestion: What is the result of the match with Jeff Monson as opponent?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jeff monson';"
}
] |
[
{
"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 \"round\" text\n);\n\nQuestion: How many rounds was the match against Jason Fairn?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jason fairn';"
}
] |
[
{
"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 \"round\" text\n);\n\nQuestion: What is the method of the match where there was a loss to Carlos Newton in round 1?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"res\"='loss' AND \"opponent\"='carlos newton';"
}
] |
[
{
"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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most points in games over 59?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\">59;"
}
] |
[
{
"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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game against San Antonio?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='san antonio';"
}
] |
[
{
"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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most assists in the game against Indiana?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='indiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_gauge_designs_1870_to_1899\" (\n \"railway\" text,\n \"built\" real,\n \"wheels\" text,\n \"location\" text,\n \"object_number\" text\n);\n\nQuestion: What is the UK Railway with an ObjectNumber of 1975-7023?"
},
{
"role": "assistant",
"content": "SELECT \"railway\" FROM \"standard_gauge_designs_1870_to_1899\" WHERE \"object_number\"='1975-7023';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Who was the manager that was positioned 11th in table and resigned in departure?"
},
{
"role": "assistant",
"content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"position_in_table\"='11th' AND \"manner_of_departure\"='resigned';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: what is the least tournaments played when the year is 1998?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tournaments_played\") FROM \"pga_tour_results\" WHERE \"year\"=1998;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: what is the year when tournaments played is less than 2, cuts made is 1 and earnings ($) is less than 10,547?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"pga_tour_results\" WHERE \"tournaments_played\"<2 AND \"cuts_made\"=1 AND \"earnings\"<'10,547';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: what is the best finish when money list rank is n/a, earnings ($) is more than 0 and cuts made is more than 1?"
},
{
"role": "assistant",
"content": "SELECT \"best_finish\" FROM \"pga_tour_results\" WHERE \"money_list_rank\"='n/a' AND \"earnings\">0 AND \"cuts_made\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: how many times is the money list rank 221 and cuts more than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tournaments_played\") FROM \"pga_tour_results\" WHERE \"money_list_rank\"='221' AND \"cuts_made\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: what is the earliest year with the best finish t-65?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"pga_tour_results\" WHERE \"best_finish\"='t-65';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_results\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text\n);\n\nQuestion: what is the average tournaments played when cuts made is 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"tournaments_played\") FROM \"pga_tour_results\" WHERE \"cuts_made\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: What is the earliest date of taking office for district 22?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"took_office\") FROM \"senate\" WHERE \"district\"=22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: What district has a democratic leader from Roby?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"district\") FROM \"senate\" WHERE \"party\"='democratic' AND \"home_town\"='roby';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"senator\" text,\n \"party\" text,\n \"district\" real,\n \"home_town\" text,\n \"took_office\" real\n);\n\nQuestion: What is the district where Steve Carriker is the Democratic Senator and he took office later than 1988?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"district\") FROM \"senate\" WHERE \"party\"='democratic' AND \"senator\"='steve carriker' AND \"took_office\">1988;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"series_number\" real,\n \"number_of_episodes\" real,\n \"original_air_date\" real,\n \"dvd_region_2_release_date\" text,\n \"dvd_region_1_release_date\" text\n);\n\nQuestion: How many series originally aired before 1999 with more than 7 episodes and a DVD Region 1 release date of 16 april 2013?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"series_number\") FROM \"series\" WHERE \"original_air_date\"<1999 AND \"number_of_episodes\">7 AND \"dvd_region_1_release_date\"='16 april 2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"series_number\" real,\n \"number_of_episodes\" real,\n \"original_air_date\" real,\n \"dvd_region_2_release_date\" text,\n \"dvd_region_1_release_date\" text\n);\n\nQuestion: What's the latest original air date with more than 10 episodes and a DVD Region 2 release date of 23 april 2012?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"original_air_date\") FROM \"series\" WHERE \"dvd_region_2_release_date\"='23 april 2012' AND \"number_of_episodes\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"series_number\" real,\n \"number_of_episodes\" real,\n \"original_air_date\" real,\n \"dvd_region_2_release_date\" text,\n \"dvd_region_1_release_date\" text\n);\n\nQuestion: What was the original air date of series number 10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"original_air_date\") FROM \"series\" WHERE \"series_number\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"series_number\" real,\n \"number_of_episodes\" real,\n \"original_air_date\" real,\n \"dvd_region_2_release_date\" text,\n \"dvd_region_1_release_date\" text\n);\n\nQuestion: What's the sum of the number of episodes that originally aired after 1991 with a series number smaller than 21 and a DVD Region 2 release date of 26 march 2012?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number_of_episodes\") FROM \"series\" WHERE \"original_air_date\">1991 AND \"series_number\"<21 AND \"dvd_region_2_release_date\"='26 march 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"series_number\" real,\n \"number_of_episodes\" real,\n \"original_air_date\" real,\n \"dvd_region_2_release_date\" text,\n \"dvd_region_1_release_date\" text\n);\n\nQuestion: What's the lowest series number that originally aired before 2009 with more than 7 episodes and had a DVD Region 2 release date of 26 july 2004?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"series_number\") FROM \"series\" WHERE \"original_air_date\"<2009 AND \"dvd_region_2_release_date\"='26 july 2004' AND \"number_of_episodes\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total of bronze that has more silvers than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total of Golds with more bronzes than 1 and totaled larger than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"total\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least total that had more Bronzes than 1 and more silvers than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least total that has fewer golds than 2, a higher rank than 4 and fewer bronzes than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"<2 AND \"rank\"=4 AND \"bronze\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lest amount of bronzes that ranked 2 and has less silvers than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"rank\"=2 AND \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Total(s) are there, when the number of Bronze is greater than 13, when the Rank is 8, and when the number of Silver is less than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_count\" WHERE \"bronze\">13 AND \"rank\"='8' AND \"silver\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Nation, when the number of Bronze is less than 17, and when the number of Gold is less than 16?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_count\" WHERE \"bronze\"<17 AND \"gold\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of Silver, when the Nation is Japan (JPN), and when the Total is greater than 37?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medal_count\" WHERE \"nation\"='japan (jpn)' AND \"total\">37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of Gold, when the number of Bronze is less than 36, when the Rank is 2, and when Silver is less than 37?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_count\" WHERE \"bronze\"<36 AND \"rank\"='2' AND \"silver\"<37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iscf_international_sport_combat_federati\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Res., when Event is \"FT 6 - Full Throttle 6\"?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"iscf_international_sport_combat_federati\" WHERE \"event\"='ft 6 - full throttle 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iscf_international_sport_combat_federati\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Opponent, when Event is \"ISCF - Southeast Championships\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"iscf_international_sport_combat_federati\" WHERE \"event\"='iscf - southeast championships';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"iscf_international_sport_combat_federati\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Event, when Record is \"3-0\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"iscf_international_sport_combat_federati\" WHERE \"record\"='3-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"match_details\" (\n \"date\" text,\n \"league_position\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the date of the game against Chelsea when the league position is 14th?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"match_details\" WHERE \"opponents\"='chelsea' AND \"league_position\"='14th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which method had a time of 0:46?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:46';"
}
] |
[
{
"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: In the fight against Brandon Bledsoe, how many rounds did the fight last?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='brandon bledsoe';"
}
] |
[
{
"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 methos did Keith Wisniewski use in the ufc fight night: teixeira vs. bader?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc fight night: teixeira vs. bader';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passenger_car_models\" (\n \"type\" text,\n \"construction_period\" text,\n \"cylinder\" text,\n \"capacity\" text,\n \"power\" text,\n \"vmax\" text\n);\n\nQuestion: What was the maximum speed of the car with 1.556 cc capacity?"
},
{
"role": "assistant",
"content": "SELECT \"vmax\" FROM \"passenger_car_models\" WHERE \"capacity\"='1.556 cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passenger_car_models\" (\n \"type\" text,\n \"construction_period\" text,\n \"cylinder\" text,\n \"capacity\" text,\n \"power\" text,\n \"vmax\" text\n);\n\nQuestion: What was the maximum speed for straight-4, 1.466 cc Type r 150?"
},
{
"role": "assistant",
"content": "SELECT \"vmax\" FROM \"passenger_car_models\" WHERE \"cylinder\"='straight-4' AND \"capacity\"='1.466 cc' AND \"type\"='r 150';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passenger_car_models\" (\n \"type\" text,\n \"construction_period\" text,\n \"cylinder\" text,\n \"capacity\" text,\n \"power\" text,\n \"vmax\" text\n);\n\nQuestion: What was the maximum speed for the P4-1 (24/36 ps)?"
},
{
"role": "assistant",
"content": "SELECT \"vmax\" FROM \"passenger_car_models\" WHERE \"type\"='p4-1 (24/36 ps)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What country is Jack Nicklaus from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"player\"='jack nicklaus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the To par for bill britton when he placed t7?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"place\"='t7' AND \"player\"='bill britton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the To par of Jack Nicklaus?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"player\"='jack nicklaus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What country was the golfer from who had a money amount of 45,000?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"money\"='45,000';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.