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 \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the engine code for the Xdrive25i?"
},
{
"role": "assistant",
"content": "SELECT \"engine_code\" FROM \"petrol_engines\" WHERE \"model\"='xdrive25i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the torque on the model with power of hp (kw; ps)@5800?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"petrol_engines\" WHERE \"power\"='hp (kw; ps)@5800';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the torque when engine code is N46B20 and power is ps (kw; hp)@6400?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"petrol_engines\" WHERE \"engine_code\"='n46b20' AND \"power\"='ps (kw; hp)@6400';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the power for the model xdrive28i sdrive28i?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"petrol_engines\" WHERE \"model\"='xdrive28i sdrive28i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the model that was made in the years 2011 2012-?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"petrol_engines\" WHERE \"years\"='2011 2012-';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"petrol_engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the engine code for the model xdrive35i?"
},
{
"role": "assistant",
"content": "SELECT \"engine_code\" FROM \"petrol_engines\" WHERE \"model\"='xdrive35i';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_school_boys\" (\n \"time\" text,\n \"athlete\" text,\n \"school\" text,\n \"city\" text,\n \"date\" text\n);\n\nQuestion: What is the Athlete from Burbank High School?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"high_school_boys\" WHERE \"school\"='burbank high school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_school_boys\" (\n \"time\" text,\n \"athlete\" text,\n \"school\" text,\n \"city\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Athlete from Ferris High School?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"high_school_boys\" WHERE \"school\"='ferris high school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_school_boys\" (\n \"time\" text,\n \"athlete\" text,\n \"school\" text,\n \"city\" text,\n \"date\" text\n);\n\nQuestion: What is the Athlete from Riverbank, California?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"high_school_boys\" WHERE \"city\"='riverbank, california';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_school_boys\" (\n \"time\" text,\n \"athlete\" text,\n \"school\" text,\n \"city\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Player from Marshfield High School?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"high_school_boys\" WHERE \"school\"='marshfield high school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_school_boys\" (\n \"time\" text,\n \"athlete\" text,\n \"school\" text,\n \"city\" text,\n \"date\" text\n);\n\nQuestion: What is the School of the Player with a Date of June 4, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"high_school_boys\" WHERE \"date\"='june 4, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What episodes was the show \u30af\u30ed\u30b5\u30ae shown on TBS?"
},
{
"role": "assistant",
"content": "SELECT \"episodes\" FROM \"2006_spring_season\" WHERE \"tv_station\"='tbs' AND \"japanese_title\"='\u30af\u30ed\u30b5\u30ae';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the Romanji Title of a show on TBS with less than 11 episodes?"
},
{
"role": "assistant",
"content": "SELECT \"romaji_title\" FROM \"2006_spring_season\" WHERE \"tv_station\"='tbs' AND \"episodes\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the total number of episodes for \u30af\u30ed\u30b5\u30ae?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episodes\") FROM \"2006_spring_season\" WHERE \"japanese_title\"='\u30af\u30ed\u30b5\u30ae';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_spring_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What are the average ratings for \u30d7\u30ea\u30de\u30c0\u30e0?"
},
{
"role": "assistant",
"content": "SELECT \"average_ratings\" FROM \"2006_spring_season\" WHERE \"japanese_title\"='\u30d7\u30ea\u30de\u30c0\u30e0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real\n);\n\nQuestion: Which Score-Final has a Rank-Final of 2, and a Year smaller than 2008?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"score_final\") FROM \"senior_career\" WHERE \"rank_final\"=2 AND \"year\"<2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real\n);\n\nQuestion: How many years have a Rank-Final smaller than 7, and a Competition Description of olympic games, and a Score-Final smaller than 186.525?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"senior_career\" WHERE \"rank_final\"<7 AND \"competition_description\"='olympic games' AND \"score_final\"<186.525;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real\n);\n\nQuestion: Which Score-Final has an Apparatus of floor exercise?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"score_final\") FROM \"senior_career\" WHERE \"apparatus\"='floor exercise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real\n);\n\nQuestion: Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"senior_career\" WHERE \"apparatus\"='uneven bars' AND \"rank_final\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: Which district has more than 169,359 2009 electorates and a constituency of 84?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'169,359' AND \"constituency_number\"='84';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: Who has a constituency of 84?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='84';"
}
]
|
[
{
"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 the round with the time 1:15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:15';"
}
]
|
[
{
"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's the location when the opponent was Lyoto Machida?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='lyoto machida';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_women_s_doubles_performance_t\" (\n \"tournament\" text,\n \"2007\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2007 result when the 2010 result was 2r, at the US Open?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"grand_slam_women_s_doubles_performance_t\" WHERE \"2010\"='2r' 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 \"uneven_bars_ef_qualifiers\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the A score for the person with a total less than 15.95, position less than 7, and B score more than 8.225?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"a_score\") FROM \"uneven_bars_ef_qualifiers\" WHERE \"total\"<15.95 AND \"position\"<7 AND \"b_score\">8.225;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uneven_bars_ef_qualifiers\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the B score for the person with a total of 16.325 and an A score of more than 7.3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"b_score\") FROM \"uneven_bars_ef_qualifiers\" WHERE \"total\"=16.325 AND \"a_score\">7.3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uneven_bars_ef_qualifiers\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the Position of the person with a total less than 16.65 and an A score of 7.4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"uneven_bars_ef_qualifiers\" WHERE \"total\"<16.65 AND \"a_score\"=7.4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_repeaters\" (\n \"callsign\" text,\n \"network\" text,\n \"city_of_license\" text,\n \"d_erp\" text,\n \"owner_operator\" text\n);\n\nQuestion: What's the network in Pachuca, Hidalgo?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"station_repeaters\" WHERE \"city_of_license\"='pachuca, hidalgo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_repeaters\" (\n \"callsign\" text,\n \"network\" text,\n \"city_of_license\" text,\n \"d_erp\" text,\n \"owner_operator\" text\n);\n\nQuestion: What's the network that has a callsign of XHTM and a D ERP of \u2022?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"station_repeaters\" WHERE \"d_erp\"='\u2022' AND \"callsign\"='xhtm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_repeaters\" (\n \"callsign\" text,\n \"network\" text,\n \"city_of_license\" text,\n \"d_erp\" text,\n \"owner_operator\" text\n);\n\nQuestion: What's the city of license having a D ERP of 100kw?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"station_repeaters\" WHERE \"d_erp\"='100kw';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"station_repeaters\" (\n \"callsign\" text,\n \"network\" text,\n \"city_of_license\" text,\n \"d_erp\" text,\n \"owner_operator\" text\n);\n\nQuestion: What's the D ERP in San Martin Texmelucan, Puebla?"
},
{
"role": "assistant",
"content": "SELECT \"d_erp\" FROM \"station_repeaters\" WHERE \"city_of_license\"='san martin texmelucan, puebla';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What district has 98 constituencies?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"constituency_number\"='98';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canterbury_bankstown_bulldogs\" (\n \"year\" text,\n \"matches\" real,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: What are the highest points with 2012 as the year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"canterbury_bankstown_bulldogs\" WHERE \"year\"='2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canterbury_bankstown_bulldogs\" (\n \"year\" text,\n \"matches\" real,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: What are the highest matches that have points less than 88, and goals less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"canterbury_bankstown_bulldogs\" WHERE \"points\"<88 AND \"goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canterbury_bankstown_bulldogs\" (\n \"year\" text,\n \"matches\" real,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: How many tries have goals greater than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tries\") FROM \"canterbury_bankstown_bulldogs\" WHERE \"goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canterbury_bankstown_bulldogs\" (\n \"year\" text,\n \"matches\" real,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: What are the lowest points with 2013 as the year, and goals less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"canterbury_bankstown_bulldogs\" WHERE \"year\"='2013' AND \"goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"canterbury_bankstown_bulldogs\" (\n \"year\" text,\n \"matches\" real,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: How many goals have 28 as the points, and matches greater than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals\") FROM \"canterbury_bankstown_bulldogs\" WHERE \"points\"=28 AND \"matches\">11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Rider of russell holland, and a Grid smaller than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"supersport_race_classification\" WHERE \"rider\"='russell holland' AND \"grid\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Bike of kawasaki zx-6r, and a Time of +26.891?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"supersport_race_classification\" WHERE \"bike\"='kawasaki zx-6r' AND \"time\"='+26.891';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Rider has a Time of retirement, and a Grid larger than 5?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"supersport_race_classification\" WHERE \"time\"='retirement' AND \"grid\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Rider has less than 18 laps, and a Grid of 24?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"supersport_race_classification\" WHERE \"laps\"<18 AND \"grid\"=24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"round\" text\n);\n\nQuestion: What is the date of the 2nd round 2nd leg?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"league_cup\" WHERE \"round\"='2nd round 2nd leg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"round\" text\n);\n\nQuestion: What is the Round against Gillingham with an Against smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"league_cup\" WHERE \"opposing_team\"='gillingham' AND \"against\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the draw that's played less than 36 and has 42 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draw\") FROM \"relegation_table\" WHERE \"points\"=42 AND \"played\"<36;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What the lost that has less than 10 points and less than 38 goals scored?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"relegation_table\" WHERE \"goals_scored\"<38 AND \"points\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: what the most lost for Alianza with a draw less than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"relegation_table\" WHERE \"team\"='alianza' AND \"draw\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What the lost in place less than 3 and having more than 63 goals scored?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"relegation_table\" WHERE \"goals_scored\">63 AND \"place\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"member_states\" (\n \"state\" text,\n \"adopted\" text,\n \"population_2011_01_01\" text,\n \"nominal_gdp_world_bank_2009_million_usd\" real,\n \"relative_gdp_of_total_nominal\" text,\n \"gdp_per_capita_world_bank_2009_nominal_usd\" real\n);\n\nQuestion: What State has an Adopted of 1999-01-01, a GDP per capita World Bank, 2009 nominal (USD) that's smaller than 34849, along with a Nominal GDP World Bank, 2009 (million USD) that's smaller than 1460250?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"member_states\" WHERE \"adopted\"='1999-01-01' AND \"gdp_per_capita_world_bank_2009_nominal_usd\"<34849 AND \"nominal_gdp_world_bank_2009_million_usd\"<1460250;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"member_states\" (\n \"state\" text,\n \"adopted\" text,\n \"population_2011_01_01\" text,\n \"nominal_gdp_world_bank_2009_million_usd\" real,\n \"relative_gdp_of_total_nominal\" text,\n \"gdp_per_capita_world_bank_2009_nominal_usd\" real\n);\n\nQuestion: What is listed as the highest Nominal GDP World Bank, 2009 (million USD) that has a GDP per capita World Bank, 2009 nominal (USD) of 14267?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"nominal_gdp_world_bank_2009_million_usd\") FROM \"member_states\" WHERE \"gdp_per_capita_world_bank_2009_nominal_usd\"=14267;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"member_states\" (\n \"state\" text,\n \"adopted\" text,\n \"population_2011_01_01\" text,\n \"nominal_gdp_world_bank_2009_million_usd\" real,\n \"relative_gdp_of_total_nominal\" text,\n \"gdp_per_capita_world_bank_2009_nominal_usd\" real\n);\n\nQuestion: What is listed for the Adopted that has a Nominal GDP World Bank, 2009 (million USD) of 48477?"
},
{
"role": "assistant",
"content": "SELECT \"adopted\" FROM \"member_states\" WHERE \"nominal_gdp_world_bank_2009_million_usd\"=48477;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"member_states\" (\n \"state\" text,\n \"adopted\" text,\n \"population_2011_01_01\" text,\n \"nominal_gdp_world_bank_2009_million_usd\" real,\n \"relative_gdp_of_total_nominal\" text,\n \"gdp_per_capita_world_bank_2009_nominal_usd\" real\n);\n\nQuestion: What is listed for the Adopted that has a Niminal GDP World Bank 2009 (million USD) of 12460362?"
},
{
"role": "assistant",
"content": "SELECT \"adopted\" FROM \"member_states\" WHERE \"nominal_gdp_world_bank_2009_million_usd\"=12460362;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"apps\" real,\n \"rate\" real\n);\n\nQuestion: What is the total Rank for \u00fcmit karan when Apps is more than 39 and Rate is more than 0.58?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"all_time_top_scorers\" WHERE \"apps\">39 AND \"player\"='\u00fcmit karan' AND \"rate\">0.58;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_top_scorers\" (\n \"rank\" real,\n \"player\" text,\n \"goals\" real,\n \"apps\" real,\n \"rate\" real\n);\n\nQuestion: When rank is more than 10, what is the total rate?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rate\") FROM \"all_time_top_scorers\" WHERE \"rank\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"contestant_name\" text,\n \"episode_num\" text,\n \"date_premiered_2009\" text,\n \"winning_amount\" text,\n \"eliminated_contestant\" text\n);\n\nQuestion: What winning amount has himesh reshammiya as the contestant name?"
},
{
"role": "assistant",
"content": "SELECT \"winning_amount\" FROM \"season_2\" WHERE \"contestant_name\"='himesh reshammiya';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"contestant_name\" text,\n \"episode_num\" text,\n \"date_premiered_2009\" text,\n \"winning_amount\" text,\n \"eliminated_contestant\" text\n);\n\nQuestion: What eliminated contestant has October 10, 2009 as the date premiered?"
},
{
"role": "assistant",
"content": "SELECT \"eliminated_contestant\" FROM \"season_2\" WHERE \"date_premiered_2009\"='october 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"contestant_name\" text,\n \"episode_num\" text,\n \"date_premiered_2009\" text,\n \"winning_amount\" text,\n \"eliminated_contestant\" text\n);\n\nQuestion: What date premiered (2009) has kareena kapoor as the contestant name?"
},
{
"role": "assistant",
"content": "SELECT \"date_premiered_2009\" FROM \"season_2\" WHERE \"contestant_name\"='kareena kapoor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"contestant_name\" text,\n \"episode_num\" text,\n \"date_premiered_2009\" text,\n \"winning_amount\" text,\n \"eliminated_contestant\" text\n);\n\nQuestion: What episode # has govinda & david dhawan as the eliminated contestant?"
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"season_2\" WHERE \"eliminated_contestant\"='govinda & david dhawan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"contestant_name\" text,\n \"episode_num\" text,\n \"date_premiered_2009\" text,\n \"winning_amount\" text,\n \"eliminated_contestant\" text\n);\n\nQuestion: What is the winning amount that has May 30, 2009 as the date premiered?"
},
{
"role": "assistant",
"content": "SELECT \"winning_amount\" FROM \"season_2\" WHERE \"date_premiered_2009\"='may 30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the Reserved For of Lahar?"
},
{
"role": "assistant",
"content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"name\"='lahar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_macintosh_models_grouped_by_cpu_\" (\n \"processor\" text,\n \"model\" text,\n \"clock_speed_m_hz\" real,\n \"l1_cache_bytes\" text,\n \"introduced\" text,\n \"discontinued\" text\n);\n\nQuestion: What is the least clock speed (MHz) with January 1986 as introduced?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"clock_speed_m_hz\") FROM \"list_of_macintosh_models_grouped_by_cpu_\" WHERE \"introduced\"='january 1986';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_macintosh_models_grouped_by_cpu_\" (\n \"processor\" text,\n \"model\" text,\n \"clock_speed_m_hz\" real,\n \"l1_cache_bytes\" text,\n \"introduced\" text,\n \"discontinued\" text\n);\n\nQuestion: With April 1986 as the introduced, what is the least clock speed (MHz)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"clock_speed_m_hz\") FROM \"list_of_macintosh_models_grouped_by_cpu_\" WHERE \"introduced\"='april 1986';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_macintosh_models_grouped_by_cpu_\" (\n \"processor\" text,\n \"model\" text,\n \"clock_speed_m_hz\" real,\n \"l1_cache_bytes\" text,\n \"introduced\" text,\n \"discontinued\" text\n);\n\nQuestion: The Powerbook 100 model has what processor?"
},
{
"role": "assistant",
"content": "SELECT \"processor\" FROM \"list_of_macintosh_models_grouped_by_cpu_\" WHERE \"model\"='powerbook 100';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_macintosh_models_grouped_by_cpu_\" (\n \"processor\" text,\n \"model\" text,\n \"clock_speed_m_hz\" real,\n \"l1_cache_bytes\" text,\n \"introduced\" text,\n \"discontinued\" text\n);\n\nQuestion: When was the Lisa 2 model discontinued?"
},
{
"role": "assistant",
"content": "SELECT \"discontinued\" FROM \"list_of_macintosh_models_grouped_by_cpu_\" WHERE \"model\"='lisa 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who are the rowers with a time of 6:41.45 and notes of FA?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"repechage\" WHERE \"notes\"='fa' AND \"time\"='6:41.45';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who are the rowers from the United States?"
},
{
"role": "assistant",
"content": "SELECT \"rowers\" FROM \"repechage\" WHERE \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What time did the team from Ukraine have?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"repechage\" WHERE \"country\"='ukraine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank for the team that had a time of 6:41.45 and note FA?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"repechage\" WHERE \"notes\"='fa' AND \"time\"='6:41.45';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repechage\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What rank was the team from Australia?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"repechage\" WHERE \"country\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the highest game that has July 31 as the date?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"date\"='july 31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"downstream_pittsburgh_to_olmsted\" (\n \"locks_dam\" text,\n \"location_l\" text,\n \"river_mile\" real,\n \"lock_side\" text,\n \"lock_lift_drop_in_feet\" text,\n \"pool_length_miles\" text\n);\n\nQuestion: What is the total of the River Mile in Greenup, Kentucky?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"river_mile\") FROM \"downstream_pittsburgh_to_olmsted\" WHERE \"location_l\"='greenup, kentucky';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"downstream_pittsburgh_to_olmsted\" (\n \"locks_dam\" text,\n \"location_l\" text,\n \"river_mile\" real,\n \"lock_side\" text,\n \"lock_lift_drop_in_feet\" text,\n \"pool_length_miles\" text\n);\n\nQuestion: What is the River Mile with a RDB lock side and a pool length of 55.4?"
},
{
"role": "assistant",
"content": "SELECT \"river_mile\" FROM \"downstream_pittsburgh_to_olmsted\" WHERE \"lock_side\"='rdb' AND \"pool_length_miles\"='55.4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"downstream_pittsburgh_to_olmsted\" (\n \"locks_dam\" text,\n \"location_l\" text,\n \"river_mile\" real,\n \"lock_side\" text,\n \"lock_lift_drop_in_feet\" text,\n \"pool_length_miles\" text\n);\n\nQuestion: What is the highest River Mile that has a pool length of 42.2 miles or a lock/lift drop of 21 feet?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"river_mile\") FROM \"downstream_pittsburgh_to_olmsted\" WHERE \"pool_length_miles\"='42.2' AND \"lock_lift_drop_in_feet\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"downstream_pittsburgh_to_olmsted\" (\n \"locks_dam\" text,\n \"location_l\" text,\n \"river_mile\" real,\n \"lock_side\" text,\n \"lock_lift_drop_in_feet\" text,\n \"pool_length_miles\" text\n);\n\nQuestion: What is the location of the river mile that is larger than 938.9, and Olmsted Locks and Dam?"
},
{
"role": "assistant",
"content": "SELECT \"location_l\" FROM \"downstream_pittsburgh_to_olmsted\" WHERE \"river_mile\">938.9 AND \"locks_dam\"='olmsted locks and dam';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_c_d_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the lowest ranking for 8:13.67?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"semifinal_c_d_2\" WHERE \"time\"='8:13.67';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_c_d_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for Kazakhstan?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"semifinal_c_d_2\" WHERE \"country\"='kazakhstan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_c_d_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes for South Africa?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"semifinal_c_d_2\" WHERE \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_c_d_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What country is ranked higher than 5?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"semifinal_c_d_2\" WHERE \"rank\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_c_d_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the total rank and fc notes from South Africa?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"semifinal_c_d_2\" WHERE \"notes\"='fc' AND \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1963\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" real,\n \"release_date\" text\n);\n\nQuestion: From what series was the title with a production number of 1614 that was directed by Friz Freleng?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"1963\" WHERE \"director\"='friz freleng' AND \"production_number\"=1614;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the Result of the event with a Record of 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"record\"='1-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the Round of the event with a Record of 5-4?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"kickboxing_record\" WHERE \"record\"='5-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"v\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What was the latitude for van meter who had a land(sqmi) larger than 35.747, Water(sqmi) of 0 and a GEO ID smaller than 3809981860?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"latitude\") FROM \"v\" WHERE \"land_sqmi\">35.747 AND \"water_sqmi\"=0 AND \"geo_id\"<3809981860 AND \"township\"='van meter';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"v\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What was the population fo the township with a Latitude of 48.853051, and a Water (sqmi) smaller than 0.9590000000000001?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pop_2010\") FROM \"v\" WHERE \"latitude\"=48.853051 AND \"water_sqmi\"<0.9590000000000001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"v\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: Van Meter has a water(sqmi) of 0 and a longitude larger than -98.444062, what was their highest ANSI code?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ansi_code\") FROM \"v\" WHERE \"water_sqmi\"=0 AND \"township\"='van meter' AND \"longitude\">-98.444062;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"v\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What was the lowest water(sqmi) in the county of dickey where the longitude was smaller than -98.444062?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"water_sqmi\") FROM \"v\" WHERE \"county\"='dickey' AND \"longitude\"<-98.444062;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: Who is the coach for the Northamptonshire Steelbacks?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"teams\" WHERE \"team\"='northamptonshire steelbacks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: Which team is located in Leicester?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams\" WHERE \"location\"='leicester';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: Which team is in Sussex county?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams\" WHERE \"county\"='sussex';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: What is the home ground for the team located in Canterbury?"
},
{
"role": "assistant",
"content": "SELECT \"home_ground\" FROM \"teams\" WHERE \"location\"='canterbury';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: Who is the captain of the team coached by Giles White?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"teams\" WHERE \"coach\"='giles white';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"location\" text,\n \"county\" text,\n \"division\" text,\n \"home_ground\" text,\n \"coach\" text,\n \"captain\" text\n);\n\nQuestion: Which division is the Derbyshire Falcons in?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"teams\" WHERE \"team\"='derbyshire falcons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which tie number had a home team of Derby County?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fifth_round_proper\" WHERE \"home_team\"='derby county';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the tie with an away team of Stoke City?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"away_team\"='stoke city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which Artist has a Draw smaller than 14, and Points less than 73, and a Language of turkish?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"results\" WHERE \"draw\"<14 AND \"points\"<73 AND \"language\"='turkish';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: How many points does mia martini have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"results\" WHERE \"artist\"='mia martini';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which Artist has an English translation of all this is music?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"results\" WHERE \"english_translation\"='all this is music';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_all_time_athletes_50_metres_women\" (\n \"rank\" real,\n \"time\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What athlete has a Grenoble place?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"top_all_time_athletes_50_metres_women\" WHERE \"place\"='grenoble';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Pick number of the Player from Syracuse?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"sixth_round\" WHERE \"college\"='syracuse';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the Offensive Guard Player from Mississippi State College with a Pick number larter than 44?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"sixth_round\" WHERE \"pick\">44 AND \"position\"='offensive guard' AND \"college\"='mississippi state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the College of the Pick from Denver Broncos?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"sixth_round\" WHERE \"team\"='denver broncos';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.