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 \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which team has driven 134 laps?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"=134;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: In what class is the laps greater than 134 and the position is 4th?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\">134 AND \"pos\"='4th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_the_20th_centur\" (\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What title did Mentuhotep IV have?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_state_leaders_in_the_20th_centur\" WHERE \"name\"='mentuhotep iv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_the_20th_centur\" (\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the title of Amenemhat II?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_state_leaders_in_the_20th_centur\" WHERE \"name\"='amenemhat ii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_the_20th_centur\" (\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the title of Senusret I?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_state_leaders_in_the_20th_centur\" WHERE \"name\"='senusret i';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_the_20th_centur\" (\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the title of Amenemhat I?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_state_leaders_in_the_20th_centur\" WHERE \"name\"='amenemhat i';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_state_leaders_in_the_20th_centur\" (\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What is the type shown from 1991 bc?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"list_of_state_leaders_in_the_20th_centur\" WHERE \"from\"='1991 bc';"
}
] |
[
{
"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: What is the Record when the round was 5, time was 5:00, and the opponent was Torrance Taylor"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=5 AND \"time\"='5:00' AND \"opponent\"='torrance taylor';"
}
] |
[
{
"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: What is the method when the time was 5:00, and the round higher than 4?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"round\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_s_conducted\" text,\n \"polling_organisation_client\" text,\n \"conservatives\" text,\n \"labour\" text,\n \"liberal_democrats\" text,\n \"others\" text\n);\n\nQuestion: When the others had a value of 7%, what was the Polling organisation/client?"
},
{
"role": "assistant",
"content": "SELECT \"polling_organisation_client\" FROM \"opinion_polls\" WHERE \"others\"='7%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What player plays the position of small forward?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"d\" WHERE \"position\"='small forward';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tholi\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" text\n);\n\nQuestion: What is the latitude of the 0 diameter?"
},
{
"role": "assistant",
"content": "SELECT \"latitude\" FROM \"tholi\" WHERE \"diameter_km\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tholi\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" text\n);\n\nQuestion: What is the longitude of Angerona Tholus?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"tholi\" WHERE \"name\"='angerona tholus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tholi\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" text\n);\n\nQuestion: What is the smallest diameter for Eirene Tholus?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"diameter_km\") FROM \"tholi\" WHERE \"name\"='eirene tholus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What was the game on April 25?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"playoffs\" WHERE \"date\"='april 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: what is the event when 2011-12 is n/a?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2011_12\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: what is the event when 2009-10 is dnp?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2009_10\"='dnp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: what is the event when 2006-07 is dnp?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"grand_slam_record\" WHERE \"2006_07\"='dnp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: what is 2012-13 when 2011-12 is dnp and event is autumn gold?"
},
{
"role": "assistant",
"content": "SELECT \"2012_13\" FROM \"grand_slam_record\" WHERE \"2011_12\"='dnp' AND \"event\"='autumn gold';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_record\" (\n \"event\" text,\n \"2006_07\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: what is 2012-13 when 2011-12 is dnp and 2006-07 is dnp and 2010-11 is q?"
},
{
"role": "assistant",
"content": "SELECT \"2012_13\" FROM \"grand_slam_record\" WHERE \"2011_12\"='dnp' AND \"2006_07\"='dnp' AND \"2010_11\"='q';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty20_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: what is the sum of the wkts when the ovrs were bigger than 2 and econ was bigger than 7.84?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wkts\") FROM \"twenty20_internationals\" WHERE \"ovrs\">2 AND \"econ\">7.84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty20_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: What is the sum of the runs when the wkts were bigger than 0 and ovrs were smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"runs\") FROM \"twenty20_internationals\" WHERE \"ovrs\"<2 AND \"wkts\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty20_internationals\" (\n \"player\" text,\n \"wkts\" real,\n \"runs\" real,\n \"econ\" real,\n \"ovrs\" real\n);\n\nQuestion: What is the highest wkts for james hopes who had less than 26 runs and more than 2 ovrs?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wkts\") FROM \"twenty20_internationals\" WHERE \"runs\"<26 AND \"player\"='james hopes' AND \"ovrs\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the average sales in billions of the company headquartered in France with more than 2,539.1 billion in assets?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"sales_billion\") FROM \"2012_list\" WHERE \"headquarters\"='france' AND \"assets_billion\">'2,539.1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the average sales in billions of walmart, which has more than 15.7 billion in profits?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"sales_billion\") FROM \"2012_list\" WHERE \"company\"='walmart' AND \"profits_billion\">15.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the rider when the grid is 21?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"grid\"=21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average laps when the manufacturer is yamaha, and the rider is garry mccoy and the grid is smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"rider\"='garry mccoy' AND \"grid\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest laps for rider andrew pitt, with a grid smaller than 18? Wha"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='andrew pitt' AND \"grid\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest laps that has a manufacturer of yamaha, and a time/retired of +1:08.312, and a grid less than 20?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"time_retired\"='+1:08.312' AND \"grid\"<20;"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What event had a tko (punches) method and jason macdonald as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (punches)' AND \"opponent\"='jason macdonald';"
}
] |
[
{
"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 \"location\" text\n);\n\nQuestion: What is the opponent after round number 1 with a method of decision (unanimous)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\">1 AND \"method\"='decision (unanimous)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_runner_ups_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: Who is the partnering that had the opponents of Marcelo Melo Andr\u00e9 S\u00e1?"
},
{
"role": "assistant",
"content": "SELECT \"partnering\" FROM \"doubles_runner_ups_5\" WHERE \"opponents_in_final\"='marcelo melo andr\u00e9 s\u00e1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_runner_ups_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the score on February 14, 1999?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"doubles_runner_ups_5\" WHERE \"date\"='february 14, 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_runner_ups_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What date was the score 6\u20137(9), 6\u20132, (10\u20137)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_runner_ups_5\" WHERE \"score_in_final\"='6\u20137(9), 6\u20132, (10\u20137)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"sydney\" real,\n \"melbourne\" real,\n \"brisbane\" real,\n \"adelaide\" real,\n \"perth\" real,\n \"total\" real,\n \"weekly_rank\" real,\n \"nightly_rank\" real\n);\n\nQuestion: What is the lowest value for Sydney, when Perth is less than 169,000, and when NIGHTLY RANK is less than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"sydney\") FROM \"ratings\" WHERE \"perth\"<'169,000' AND \"nightly_rank\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"sydney\" real,\n \"melbourne\" real,\n \"brisbane\" real,\n \"adelaide\" real,\n \"perth\" real,\n \"total\" real,\n \"weekly_rank\" real,\n \"nightly_rank\" real\n);\n\nQuestion: What is the lowest value for Sydney, when WEEKLY RANK is less than 8, and when Brisbane is greater than 252,000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"sydney\") FROM \"ratings\" WHERE \"weekly_rank\"<8 AND \"brisbane\">'252,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"sydney\" real,\n \"melbourne\" real,\n \"brisbane\" real,\n \"adelaide\" real,\n \"perth\" real,\n \"total\" real,\n \"weekly_rank\" real,\n \"nightly_rank\" real\n);\n\nQuestion: What is the sum of the values for Melbourne, when Episode Number Production Number is 19 2-06, and when Sydney is less than 389,000?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"melbourne\") FROM \"ratings\" WHERE \"episode_number_production_number\"='19 2-06' AND \"sydney\"<'389,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"sydney\" real,\n \"melbourne\" real,\n \"brisbane\" real,\n \"adelaide\" real,\n \"perth\" real,\n \"total\" real,\n \"weekly_rank\" real,\n \"nightly_rank\" real\n);\n\nQuestion: What is the lowest value for Perth, when Melbourne is greater than 461,000, and when Sydney is less than 430,000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"perth\") FROM \"ratings\" WHERE \"melbourne\">'461,000' AND \"sydney\"<'430,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How many rounds had a time of 5:00 at UFC 155?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"time\"='5:00' AND \"event\"='ufc 155';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which event had a time of 2:34?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:34';"
}
] |
[
{
"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: Who was the opponent in the bout that led to a win in a time of 1:21?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"time\"='1:21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the method of resolution for the fight against akihiro gono?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='akihiro gono';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the average number of rounds that Lance Gibson fought when his record was 1-1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Country of the Player with a Score of 69-71-66=206?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='69-71-66=206';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place of the Player from Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"country\"='scotland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Steve Lowery's Place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='steve lowery';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was 1961's qual?"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"year\"='1961';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was 13's finish?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"start\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: How many laps were in 1969?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"indy_500_results\" WHERE \"year\"='1969';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which Rank has a Qual of 145.144?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"qual\"='145.144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_urban_areas_ranked_by_2010_proje\" (\n \"rank\" real,\n \"city\" text,\n \"country\" text,\n \"population\" real,\n \"area_km\" real,\n \"sources_of_pop_area\" text\n);\n\nQuestion: What is the sources for Bandung?"
},
{
"role": "assistant",
"content": "SELECT \"sources_of_pop_area\" FROM \"largest_urban_areas_ranked_by_2010_proje\" WHERE \"city\"='bandung';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"winner\" text,\n \"reports\" text\n);\n\nQuestion: What race happened at Iowa Speedway?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"results\" WHERE \"track\"='iowa speedway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"winner\" text,\n \"reports\" text\n);\n\nQuestion: Who won the Food World 250?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"results\" WHERE \"race\"='food world 250';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"winner\" text,\n \"reports\" text\n);\n\nQuestion: What race happened at pocono on 08-02-2008?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"results\" WHERE \"track\"='pocono' AND \"date\"='08-02-2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"winner\" text,\n \"reports\" text\n);\n\nQuestion: What race happened on 04-25-2008?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"results\" WHERE \"date\"='04-25-2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"winner\" text,\n \"reports\" text\n);\n\nQuestion: Where was the race on 09-13-2008?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"results\" WHERE \"date\"='09-13-2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which game number was played after March 11 and ended with a record of 26-30-10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"record\"='26-30-10' AND \"march\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: How many games total were played against @ Boston Bruins this season?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='@ boston bruins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"march\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: When was the earliest game date in March where the match ended with a record of 25-29-10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"march\") FROM \"schedule_and_results\" WHERE \"record\"='25-29-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mjhl_scoring_champions\" (\n \"season\" real,\n \"winner\" text,\n \"team\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many points when John Vopni won a season before 1977?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"mjhl_scoring_champions\" WHERE \"season\"<1977 AND \"winner\"='john vopni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mjhl_scoring_champions\" (\n \"season\" real,\n \"winner\" text,\n \"team\" text,\n \"goals\" text,\n \"assists\" text,\n \"points\" text\n);\n\nQuestion: How many points when Bill Benson was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"mjhl_scoring_champions\" WHERE \"winner\"='bill benson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which team did Tyson Chandler (7) have high rebounds for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_rebounds\"='tyson chandler (7)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: How many high assists were on November 27?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='november 27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_6\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: What was the winning score in 1980?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_6\" WHERE \"year\"=1980;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_6\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: What was the winning score in 1985 for Championship of u.s. women's open?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"wins_6\" WHERE \"year\"<1985 AND \"championship\"='u.s. women''s open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_6\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: When was the runner-up Jane Geddes?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"wins_6\" WHERE \"runner_up\"='jane geddes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_6\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_up\" text\n);\n\nQuestion: Which championship after 1985 had a winning score of \u20138 (68-72-69-71=280)?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"wins_6\" WHERE \"year\">1985 AND \"winning_score\"='\u20138 (68-72-69-71=280)';"
}
] |
[
{
"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\" text\n);\n\nQuestion: What was the method of resolution for the fight against jake brown?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jake brown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"round_winner\" text,\n \"team\" text\n);\n\nQuestion: On what team did John Bowe round winner at Winton Motor Raceway belong to?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"round_winner\"='john bowe' AND \"circuit\"='winton motor raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"round_winner\" text,\n \"team\" text\n);\n\nQuestion: What was the team features at Oran Park Raceway?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"circuit\"='oran park raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"round_winner\" text,\n \"team\" text\n);\n\nQuestion: Where is the Eastern Creek Raceway located?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"circuit\"='eastern creek raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: Which state was Dai from?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"vassal_states\" WHERE \"name\"='dai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: What was Mu's title?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"vassal_states\" WHERE \"name\"='mu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vassal_states\" (\n \"state\" text,\n \"type\" text,\n \"name\" text,\n \"title\" text,\n \"royal_house\" text,\n \"from\" text\n);\n\nQuestion: When was Xiong Xun a vassal?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"vassal_states\" WHERE \"name\"='xiong xun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what is the highest attendance for week 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"week\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what is the result for the week higher than 7 on november 4, 1979?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">7 AND \"date\"='november 4, 1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: what is the lowest week when the date is september 16, 1979 and the attendance less than 54,212?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='september 16, 1979' AND \"attendance\"<'54,212';"
}
] |
[
{
"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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Which competition has stuart potts as the man of the match?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"november\" WHERE \"man_of_the_match\"='stuart potts';"
}
] |
[
{
"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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Which venue had a lost 5-4 result?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"november\" WHERE \"result\"='lost 5-4';"
}
] |
[
{
"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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: What is the venue of the match with the wightlink raiders as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"november\" WHERE \"opponent\"='wightlink raiders';"
}
] |
[
{
"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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: What is the result of the league/cup competition with the swindon wildcats as the opponent and neil liddiard as the man of the match?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"november\" WHERE \"competition\"='league/cup' AND \"opponent\"='swindon wildcats' AND \"man_of_the_match\"='neil liddiard';"
}
] |
[
{
"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 \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: What is the attendance of the match on the 2nd with the slough jets as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"november\" WHERE \"opponent\"='slough jets' AND \"date\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_l\" (\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 was the score when the total was 75\u201353?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pool_l\" WHERE \"total\"='75\u201353';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_l\" (\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 was the total when the set 3 was 25\u201314?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"pool_l\" WHERE \"set_3\"='25\u201314';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_l\" (\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 date was the set 1 25\u201323, and a Set 3 of 25\u201314?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_l\" WHERE \"set_1\"='25\u201323' AND \"set_3\"='25\u201314';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_l\" (\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 date was the Set 3 of 12\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_l\" WHERE \"set_3\"='12\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_l\" (\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 when the total was 53\u201375?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"pool_l\" WHERE \"total\"='53\u201375';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What is the average win with a top 5 greater than 2 and a top 10 less than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"nascar_nationwide_series\" WHERE \"top_5\">2 AND \"top_10\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many poles have 4 Starts of 4 and position of 46th?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"poles\") FROM \"nascar_nationwide_series\" WHERE \"starts\"=4 AND \"position\"='46th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2002\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: Sum of m. night shyamalan ranks?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"highest_grossing_films_of_2002\" WHERE \"director_s\"='m. night shyamalan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2002\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: Director for Star Wars Episode II: attack of the clones?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"highest_grossing_films_of_2002\" WHERE \"title\"='star wars episode ii: attack of the clones';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_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 tie no when Oxford city was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"away_team\"='oxford city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_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 tie no when Wrexham was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"first_round_proper\" WHERE \"away_team\"='wrexham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_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 when Spennymoor United as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"away_team\"='spennymoor united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was Grimsby Town the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"away_team\"='grimsby town';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants_and_final_ranking\" (\n \"name\" text,\n \"category\" text,\n \"eliminated\" text,\n \"date\" text,\n \"special_guest\" text\n);\n\nQuestion: Who was eliminated on Banana Night?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"contestants_and_final_ranking\" WHERE \"eliminated\"='banana night';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants_and_final_ranking\" (\n \"name\" text,\n \"category\" text,\n \"eliminated\" text,\n \"date\" text,\n \"special_guest\" text\n);\n\nQuestion: Who was the special guest when the category was vocal groups and the name was Romantic?"
},
{
"role": "assistant",
"content": "SELECT \"special_guest\" FROM \"contestants_and_final_ranking\" WHERE \"category\"='vocal groups' AND \"name\"='romantic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants_and_final_ranking\" (\n \"name\" text,\n \"category\" text,\n \"eliminated\" text,\n \"date\" text,\n \"special_guest\" text\n);\n\nQuestion: On what date was elimination on final night?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"contestants_and_final_ranking\" WHERE \"eliminated\"='final night';"
}
] |
[
{
"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 \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the total number of games for the opponent in Washington?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"opponent\"='washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"name\" text,\n \"location\" text,\n \"height_m\" real,\n \"stories\" real,\n \"year_of_completion\" real\n);\n\nQuestion: How many stories have a height less than 138 meters with a completion date in 1971?"
},
{
"role": "assistant",
"content": "SELECT \"stories\" FROM \"tallest_buildings\" WHERE \"height_m\"<138 AND \"year_of_completion\"=1971;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.