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 \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: what is the tie no when the away team is solihull moors?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tie_no\") FROM \"ties\" WHERE \"away_team\"='solihull moors';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: who is the away team when the tie no is more than 13 and the home team is team bath?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"ties\" WHERE \"tie_no\">13 AND \"home_team\"='team bath';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Pick # of the player from Simon Fraser College?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick_num\") FROM \"round_one\" WHERE \"college\"='simon fraser';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the margin of victory for the winning score of \u221210 (71-65-68-70=274)?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='\u221210 (71-65-68-70=274)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who is the runner(s)-up for a winning score of \u22123 (71-74-66-66=277)?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='\u22123 (71-74-66-66=277)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"meeting\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"extra\" real\n);\n\nQuestion: What venue had less than 7.4 extra and the result of 4th?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"extra\"<7.4 AND \"result\"='4th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"meeting\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"extra\" real\n);\n\nQuestion: What is the highest extra total before 2003 at the Meeting of all africa games?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"extra\") FROM \"achievements\" WHERE \"meeting\"='all africa games' AND \"year\"<2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"meeting\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"extra\" real\n);\n\nQuestion: What year has an extra of 8, and a result of 3rd?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"extra\"=8 AND \"result\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"meeting\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"extra\" real\n);\n\nQuestion: What year has a venue of algiers, algeria, extra smaller than 8.03, and a Meeting of all africa games?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"achievements\" WHERE \"venue\"='algiers, algeria' AND \"extra\"<8.03 AND \"meeting\"='all africa games';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Date with a Set 3 with 15\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_a\" WHERE \"set_3\"='15\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 3 with a Score of 3\u20131, and has a Set 2 of 13\u201315?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_a\" WHERE \"score\"='3\u20131' AND \"set_2\"='13\u201315';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 1 with a Score of 3\u20130, and has a Set 3 of 15\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_a\" WHERE \"score\"='3\u20130' AND \"set_3\"='15\u201312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 1 with a Score of 3\u20130, and has a Set 3 of 15\u201310?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_a\" WHERE \"score\"='3\u20130' AND \"set_3\"='15\u201310';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Set 2 with a Total with 45\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_a\" WHERE \"total\"='45\u201312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: What is the Total with a Score of 3\u20130, and a Date of 14 oct, and has a Set 1 of 15\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"pool_a\" WHERE \"score\"='3\u20130' AND \"date\"='14 oct' AND \"set_1\"='15\u201312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date of the footscray home game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"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\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Tell me the time for martin kampmann"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='martin kampmann';"
}
] |
[
{
"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\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Tell me the sum of round for record of 6-3"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='6-3';"
}
] |
[
{
"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\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Tell me the location for win with record of 8-5"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"record\"='8-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In which of North Melbourne's away games was there the lowest crowd?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_13\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"baldwin_locomotive_works\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the build date of the model with PRR Class brs24?"
},
{
"role": "assistant",
"content": "SELECT \"build_date\" FROM \"baldwin_locomotive_works\" WHERE \"prr_class\"='brs24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"baldwin_locomotive_works\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: How many total units were built of Model ds-4-4-660 with a b-b wheel arrangement and a PRR Class of bs6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_produced\") FROM \"baldwin_locomotive_works\" WHERE \"wheel_arrangement\"='b-b' AND \"prr_class\"='bs6' AND \"builder_s_model\"='ds-4-4-660';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"baldwin_locomotive_works\" (\n \"prr_class\" text,\n \"builder_s_model\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"service\" text,\n \"power_output\" text\n);\n\nQuestion: What is the build date of the model with a PRR Class of brs24?"
},
{
"role": "assistant",
"content": "SELECT \"build_date\" FROM \"baldwin_locomotive_works\" WHERE \"prr_class\"='brs24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"far_north\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total number of roll for Te Hapua school?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"far_north\" WHERE \"name\"='te hapua school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"korean_expedition\" (\n \"name\" text,\n \"service\" text,\n \"rank\" text,\n \"place_of_action\" text,\n \"unit\" text\n);\n\nQuestion: Name the place of action for the marine corps and corporal rank"
},
{
"role": "assistant",
"content": "SELECT \"place_of_action\" FROM \"korean_expedition\" WHERE \"service\"='marine corps' AND \"rank\"='corporal';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When driver heinz-harald frentzen has a number of laps greater than 60, what is the sum of grid?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"laps\">60 AND \"driver\"='heinz-harald frentzen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_municipalities_in_quebec\" (\n \"code\" real,\n \"type\" text,\n \"name\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"regional_county_municipality\" text,\n \"region\" real\n);\n\nQuestion: What is the population total for saint-wenceslas with a region number of under 17?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"list_of_municipalities_in_quebec\" WHERE \"name\"='saint-wenceslas' AND \"region\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_municipalities_in_quebec\" (\n \"code\" real,\n \"type\" text,\n \"name\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"regional_county_municipality\" text,\n \"region\" real\n);\n\nQuestion: What is the smallest code associated with a type of m for a region less than 17 named, named saint-sylv\u00e8re?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"code\") FROM \"list_of_municipalities_in_quebec\" WHERE \"type\"='m' AND \"name\"='saint-sylv\u00e8re' AND \"region\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What competition was at the Daugava Stadium, Riga, Latvia?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"ireland_international_goals\" WHERE \"venue\"='daugava stadium, riga, latvia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: How many total goals were made at the game on 15 November 1989?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goal\") FROM \"ireland_international_goals\" WHERE \"date\"='15 november 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What is the captain's name of team Leeds United?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"team\"='leeds united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who is the shirt sponsor for Captain Geoff Thomas' team?"
},
{
"role": "assistant",
"content": "SELECT \"shirt_sponsor\" FROM \"personnel_and_kits\" WHERE \"captain\"='geoff thomas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What is the name of the team that Tulip Computers NV sponsors?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_kits\" WHERE \"shirt_sponsor\"='tulip computers nv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What is the name of the captain for team Norwich City?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"team\"='norwich city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What team does Graeme Souness manage?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_kits\" WHERE \"manager\"='graeme souness';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the lowest laps when the grid is smaller than 5 and the driver is juan manuel fangio?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"grid\"<5 AND \"driver\"='juan manuel fangio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the time/retired is +9 laps and the laps is larger than 91?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"time_retired\"='+9 laps' AND \"laps\">91;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the lowest grid when the time retired is clutch, the driver is peter collins and the laps is smaller than 26?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"time_retired\"='clutch' AND \"driver\"='peter collins' AND \"laps\"<26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_canyon_zoning_and_use_limits\" (\n \"area\" text,\n \"name\" text,\n \"zone\" text,\n \"group_s\" real,\n \"parties\" real,\n \"max_people\" real,\n \"camp_type\" text\n);\n\nQuestion: What zone has camp type D/S in area Bl9?"
},
{
"role": "assistant",
"content": "SELECT \"zone\" FROM \"grand_canyon_zoning_and_use_limits\" WHERE \"camp_type\"='d/s' AND \"area\"='bl9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_canyon_zoning_and_use_limits\" (\n \"area\" text,\n \"name\" text,\n \"zone\" text,\n \"group_s\" real,\n \"parties\" real,\n \"max_people\" real,\n \"camp_type\" text\n);\n\nQuestion: Which name has group 0 in Bl4 area?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"grand_canyon_zoning_and_use_limits\" WHERE \"group_s\"=0 AND \"area\"='bl4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_canyon_zoning_and_use_limits\" (\n \"area\" text,\n \"name\" text,\n \"zone\" text,\n \"group_s\" real,\n \"parties\" real,\n \"max_people\" real,\n \"camp_type\" text\n);\n\nQuestion: Which zone has max capacity of 23 in a group under 2 at Robbers Roost?"
},
{
"role": "assistant",
"content": "SELECT \"zone\" FROM \"grand_canyon_zoning_and_use_limits\" WHERE \"max_people\">23 AND \"group_s\"<2 AND \"name\"='robbers roost';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: I want to know the average crowd for away team of melbourne"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_11\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"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\" text,\n \"points\" real\n);\n\nQuestion: Which driver had a time off course?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='off course';"
}
] |
[
{
"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\" text,\n \"points\" real\n);\n\nQuestion: What is the top lap that had 2 grids and more than 26 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\"='2' AND \"points\">26;"
}
] |
[
{
"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\" text,\n \"points\" real\n);\n\nQuestion: What is the top lap that had 6 grids and more than 19 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\"='6' AND \"points\">19;"
}
] |
[
{
"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\" text,\n \"points\" real\n);\n\nQuestion: What is the average point count for tristan gommendy?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"race\" WHERE \"driver\"='tristan gommendy';"
}
] |
[
{
"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\" text,\n \"points\" real\n);\n\nQuestion: What is the point low with 2 grids?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"race\" WHERE \"grid\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Dismissals with a Venue with source: cricinfo.com?"
},
{
"role": "assistant",
"content": "SELECT \"dismissals\" FROM \"most_dismissals_in_a_match\" WHERE \"venue\"='source: cricinfo.com';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Versus with a Player with ko otieno, with Venue with bloemfontein?"
},
{
"role": "assistant",
"content": "SELECT \"versus\" FROM \"most_dismissals_in_a_match\" WHERE \"player\"='ko otieno' AND \"venue\"='bloemfontein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Venue with a Date with 27-02-2003?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"most_dismissals_in_a_match\" WHERE \"date\"='27-02-2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Player with Versus with australia?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_dismissals_in_a_match\" WHERE \"versus\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Player with a Date with 12-03-2003?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_dismissals_in_a_match\" WHERE \"date\"='12-03-2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_dismissals_in_a_match\" (\n \"dismissals\" text,\n \"player\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Dismissals with a Player with source: cricinfo.com?"
},
{
"role": "assistant",
"content": "SELECT \"dismissals\" FROM \"most_dismissals_in_a_match\" WHERE \"player\"='source: cricinfo.com';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the sum number of attendance when the visiting team was Charlotte and the leading scorer was Ricky Davis (23)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"november\" WHERE \"visitor\"='charlotte' AND \"leading_scorer\"='ricky davis (23)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Visitor was there when the Home game was played in Miami on November 4?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"november\" WHERE \"home\"='miami' AND \"date\"='november 4';"
}
] |
[
{
"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: What nationality is Demetris Nichols?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='demetris nichols';"
}
] |
[
{
"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: What school or team has round of 2 with less than 42 picks?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"draft_picks\" WHERE \"round\"=2 AND \"pick\"<42;"
}
] |
[
{
"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: What position has round less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In what venue is Essendon the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when the venue was Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for Hawthorn when they were the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"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\" real,\n \"time\" text\n);\n\nQuestion: What method was used that had a resulting win against opponent, Natsuko Kikukawa?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"opponent\"='natsuko kikukawa';"
}
] |
[
{
"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\" real,\n \"time\" text\n);\n\nQuestion: What was the highest number of rounds that had Hikaru Shinohara as an opponent and a record of 11-7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='hikaru shinohara' AND \"record\"='11-7';"
}
] |
[
{
"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\" real,\n \"time\" text\n);\n\nQuestion: Which method has a record of 11-10?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='11-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who is the loser when the attendance is larger than 31,409 and the date is July 9?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\">'31,409' AND \"date\"='july 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"contributions\" real,\n \"loans_received\" real,\n \"all_receipts\" real,\n \"operating_expenditures\" real,\n \"all_disbursements\" real\n);\n\nQuestion: How much in average Loans Received has Contributions less than 34,986,088, Disbursements more than 251,093,944 for Dennis Kucinich \u2020 with Operating Expenditures more than 3,638,219?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"loans_received\") FROM \"democrats\" WHERE \"contributions\"<'34,986,088' AND \"all_disbursements\">'251,093,944' AND \"candidate\"='dennis kucinich \u2020' AND \"operating_expenditures\">'3,638,219';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"contributions\" real,\n \"loans_received\" real,\n \"all_receipts\" real,\n \"operating_expenditures\" real,\n \"all_disbursements\" real\n);\n\nQuestion: How much is the lowest Operating Expenditures when Contributions are more than 8,245,241?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"operating_expenditures\") FROM \"democrats\" WHERE \"contributions\">'8,245,241';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"contributions\" real,\n \"loans_received\" real,\n \"all_receipts\" real,\n \"operating_expenditures\" real,\n \"all_disbursements\" real\n);\n\nQuestion: How many Loans Received have Disbursements larger than 21,857,565, and Contributions greater than 3,869,613 with Receipts under 11,405,771?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"loans_received\") FROM \"democrats\" WHERE \"all_disbursements\">'21,857,565' AND \"contributions\">'3,869,613' AND \"all_receipts\"<'11,405,771';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"contributions\" real,\n \"loans_received\" real,\n \"all_receipts\" real,\n \"operating_expenditures\" real,\n \"all_disbursements\" real\n);\n\nQuestion: What is the most Receipts for Barack Obama with Disbursements smaller than 85,176,289?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"all_receipts\") FROM \"democrats\" WHERE \"candidate\"='barack obama' AND \"all_disbursements\"<'85,176,289';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"democrats\" (\n \"candidate\" text,\n \"contributions\" real,\n \"loans_received\" real,\n \"all_receipts\" real,\n \"operating_expenditures\" real,\n \"all_disbursements\" real\n);\n\nQuestion: How many Operating Expenditures have Receipts of 44,259,386?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"operating_expenditures\") FROM \"democrats\" WHERE \"all_receipts\"='44,259,386';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_valuable_player_award_winners\" (\n \"season\" text,\n \"winner\" text,\n \"team\" text,\n \"position\" text,\n \"win_num\" real\n);\n\nQuestion: How many wins were there in 2004-05?"
},
{
"role": "assistant",
"content": "SELECT \"win_num\" FROM \"most_valuable_player_award_winners\" WHERE \"season\"='2004-05';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_valuable_player_award_winners\" (\n \"season\" text,\n \"winner\" text,\n \"team\" text,\n \"position\" text,\n \"win_num\" real\n);\n\nQuestion: How many times did jim vivona win?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"win_num\") FROM \"most_valuable_player_award_winners\" WHERE \"winner\"='jim vivona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_valuable_player_award_winners\" (\n \"season\" text,\n \"winner\" text,\n \"team\" text,\n \"position\" text,\n \"win_num\" real\n);\n\nQuestion: Which position was morristown minutemen in?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"most_valuable_player_award_winners\" WHERE \"team\"='morristown minutemen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_valuable_player_award_winners\" (\n \"season\" text,\n \"winner\" text,\n \"team\" text,\n \"position\" text,\n \"win_num\" real\n);\n\nQuestion: Which season was harrisburg lunatics in?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"most_valuable_player_award_winners\" WHERE \"team\"='harrisburg lunatics';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the smallest rank with less than 2 wings, more than 26 events, and less than $1,831,211?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"leaders\" WHERE \"wins\"<2 AND \"earnings\"<'1,831,211' AND \"events\">26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the most wins with a rank of 5 and less than $1,537,571 in earnings?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"rank\"=5 AND \"earnings\">'1,537,571';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the venue for Round f?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"football_league_cup\" WHERE \"round\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: On what date was the Result 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"football_league_cup\" WHERE \"result\"='1-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on 10 november 2004?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"football_league_cup\" WHERE \"date\"='10 november 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the crowd when the home team is Fitzroy?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did riccardo patrese do when he had a time/retird of + 1 lap?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"time_retired\"='+ 1 lap' AND \"driver\"='riccardo patrese';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wga\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: Name the episode for jenny bicks and cindy chupack nominees in 2004"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"wga\" WHERE \"year\"=2004 AND \"nominee_s\"='jenny bicks and cindy chupack';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wga\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: Name the episode for year more than 1999"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"wga\" WHERE \"year\">1999;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score at the game held at Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team's score at the game held at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_19\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at the game held at Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_19\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the size of the crowd at the game where Fitzroy was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_19\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singapore_at_the_2007_southeast_asian_ga\" (\n \"rank\" text,\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the most bronze for silver more than 6 and total less than 127 with gold less than 11"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"singapore_at_the_2007_southeast_asian_ga\" WHERE \"silver\">6 AND \"total\"<127 AND \"gold\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singapore_at_the_2007_southeast_asian_ga\" (\n \"rank\" text,\n \"sport\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the highest silver for table tennis and bronze more than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"singapore_at_the_2007_southeast_asian_ga\" WHERE \"sport\"='table tennis' AND \"bronze\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which kickoff had an attendance of 58,120?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff_a\" FROM \"schedule\" WHERE \"attendance\"='58,120';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What week number did November 19, 1989 games fall on?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"date\"='november 19, 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which game site(s) had record of 2-2?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"record\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which game had a kickoff at 1:00 and a record of 3-7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"kickoff_a\"='1:00' AND \"record\"='3-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\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which game had an attendance of 56,271?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='56,271';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Tell me the driver for ford cosworth dfv 3.0 v8 and chassis of ts19 ts20"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"drivers_and_constructors\" WHERE \"engine\"='ford cosworth dfv 3.0 v8' AND \"chassis\"='ts19 ts20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Tell me the constructor for alberto colombo and chassis of a1"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"driver\"='alberto colombo' AND \"chassis\"='a1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Tell me the constructor for clay regazzoni"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"driver\"='clay regazzoni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Tell me the chassis for team tissot ensign and driver of brett lunger"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"drivers_and_constructors\" WHERE \"entrant\"='team tissot ensign' AND \"driver\"='brett lunger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: I want the tyres for hans binder"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"drivers_and_constructors\" WHERE \"driver\"='hans binder';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: I want the constructor for divina galica rounds of 1-2"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='1-2' AND \"driver\"='divina galica';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.