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 \"by_season\" (\n \"year\" text,\n \"class\" text,\n \"team\" text,\n \"bike\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"points\" real\n);\n\nQuestion: How many Poles have a Class of 125cc, and a Team of matteoni racing team, and Points larger than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"poles\") FROM \"by_season\" WHERE \"class\"='125cc' AND \"team\"='matteoni racing team' AND \"points\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_season\" (\n \"year\" text,\n \"class\" text,\n \"team\" text,\n \"bike\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"points\" real\n);\n\nQuestion: How many Podiums have a Class of 250cc, and an F laps of 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"podiums\") FROM \"by_season\" WHERE \"class\"='250cc' AND \"f_laps\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadia_and_attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Team of elgin city, and a Highest smaller than 537 had what total number of average?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average\") FROM \"stadia_and_attendances\" WHERE \"team\"='elgin city' AND \"highest\"<537;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadia_and_attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Average larger than 450, and a Capacity smaller than 5,177, and a Stadium of ochilview park is what sum of the highest?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"highest\") FROM \"stadia_and_attendances\" WHERE \"average\">450 AND \"capacity\"<'5,177' AND \"stadium\"='ochilview park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadia_and_attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Capacity smaller than 3,292, and a Highest larger than 812, and a Stadium of strathclyde homes stadium has what sum of the average?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"stadia_and_attendances\" WHERE \"capacity\"<'3,292' AND \"highest\">812 AND \"stadium\"='strathclyde homes stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadia_and_attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: Lowest larger than 288, and a Team of east stirlingshire has what lowest average?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average\") FROM \"stadia_and_attendances\" WHERE \"lowest\">288 AND \"team\"='east stirlingshire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"locomotive\" text,\n \"entered_service\" text,\n \"owner\" text,\n \"operator\" text,\n \"livery\" text,\n \"status\" text\n);\n\nQuestion: what is the owner of the c501"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"locomotives\" WHERE \"locomotive\"='c501';"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has a Game larger than 32, and a December smaller than 21?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"game\">32 AND \"december\"<21;"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has Points larger than 46, and a Game smaller than 35, and a December of 21?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"points\">46 AND \"game\"<35 AND \"december\"=21;"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which December is the lowest one that has Points of 52?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"december\") FROM \"regular_season\" WHERE \"points\"=52;"
}
] |
[
{
"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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which December has Points of 48, and a Game larger than 33?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"december\") FROM \"regular_season\" WHERE \"points\"=48 AND \"game\">33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: WHich Regular Season Champions has a Year of 1943\u201344?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_champion_s\" FROM \"champions_by_year\" WHERE \"year\"='1943\u201344';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: WHich Tournament venue has a Tournament Champion of duke and a Record of 15\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"tournament_venue\" FROM \"champions_by_year\" WHERE \"tournament_champion\"='duke' AND \"record\"='15\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: When has a Tournament venue of richmond arena, and a Record of 12\u20131, and a Regular Season Champion(s) of virginia tech?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"champions_by_year\" WHERE \"tournament_venue\"='richmond arena' AND \"record\"='12\u20131' AND \"regular_season_champion_s\"='virginia tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: When has a Record of 9\u20131, and a Tournament Champion of duke?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"champions_by_year\" WHERE \"record\"='9\u20131' AND \"tournament_champion\"='duke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: Which Regular Season Champion(s) has a Tournament Champion of west virginia in 1955\u201356?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_champion_s\" FROM \"champions_by_year\" WHERE \"tournament_champion\"='west virginia' AND \"year\"='1955\u201356';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_by_year\" (\n \"year\" text,\n \"regular_season_champion_s\" text,\n \"record\" text,\n \"tournament_champion\" text,\n \"tournament_venue\" text,\n \"tournament_city\" text\n);\n\nQuestion: Which Regular Season Champion(s) has a Record of 9\u20130, and a Tournament Champion of north carolina?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_champion_s\" FROM \"champions_by_year\" WHERE \"record\"='9\u20130' AND \"tournament_champion\"='north carolina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the lowest round for a player selected from a college of New Hampshire?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='new hampshire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What nationality is Rod Langway?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='rod langway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What position is the player selected that has a round value over 3?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What college did the player selected in rounds over 3 play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the highest round that has a player selected from Clarkson University?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='clarkson university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"rank\" real,\n \"name\" text,\n \"headquarters\" text,\n \"primary_industry\" text,\n \"market_value_usd_million\" real\n);\n\nQuestion: What is the lowest rank of Deutsche Telekom with a market value over 209,628?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"2000\" WHERE \"name\"='deutsche telekom' AND \"market_value_usd_million\">'209,628';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"rank\" real,\n \"name\" text,\n \"headquarters\" text,\n \"primary_industry\" text,\n \"market_value_usd_million\" real\n);\n\nQuestion: What is the total market value of all corporations headquartered in Germany?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"market_value_usd_million\") FROM \"2000\" WHERE \"headquarters\"='germany';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the lowest earnings of Vijay Singh who had more than 24 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"player\"='vijay singh' AND \"wins\">24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking\" (\n \"rank\" real,\n \"centre\" text,\n \"country\" text,\n \"rating\" real,\n \"change\" real\n);\n\nQuestion: Which Rank is the highest one that has a Change smaller than 44, and a Centre of buenos aires, and a Rating larger than 628?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"ranking\" WHERE \"change\"<44 AND \"centre\"='buenos aires' AND \"rating\">628;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking\" (\n \"rank\" real,\n \"centre\" text,\n \"country\" text,\n \"rating\" real,\n \"change\" real\n);\n\nQuestion: Which Centre has a Rank of 42?"
},
{
"role": "assistant",
"content": "SELECT \"centre\" FROM \"ranking\" WHERE \"rank\"=42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking\" (\n \"rank\" real,\n \"centre\" text,\n \"country\" text,\n \"rating\" real,\n \"change\" real\n);\n\nQuestion: Which Rating has a Centre of helsinki?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rating\") FROM \"ranking\" WHERE \"centre\"='helsinki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking\" (\n \"rank\" real,\n \"centre\" text,\n \"country\" text,\n \"rating\" real,\n \"change\" real\n);\n\nQuestion: Which Change is the average one that has a Centre of buenos aires, and a Rank smaller than 46?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"change\") FROM \"ranking\" WHERE \"centre\"='buenos aires' AND \"rank\"<46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Binomial of \u03b8(log n), and a Strict Fibonacci Heap of o(log n) is what operation?"
},
{
"role": "assistant",
"content": "SELECT \"operation\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"binomial\"='\u03b8(log n)' AND \"strict_fibonacci_heap\"='o(log n)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Operation of find-min has what Fibonacci?"
},
{
"role": "assistant",
"content": "SELECT \"fibonacci\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"operation\"='find-min';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Binomial of \u03b8(1) has what pairing?"
},
{
"role": "assistant",
"content": "SELECT \"pairing\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"binomial\"='\u03b8(1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Pairing of \u03b8(1), and a Binomial of \u03b8(1) is what binary?"
},
{
"role": "assistant",
"content": "SELECT \"binary\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"pairing\"='\u03b8(1)' AND \"binomial\"='\u03b8(1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Operation of find-min has what binary?"
},
{
"role": "assistant",
"content": "SELECT \"binary\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"operation\"='find-min';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_theoretic_bounds_for_varia\" (\n \"operation\" text,\n \"binary\" text,\n \"binomial\" text,\n \"fibonacci\" text,\n \"pairing\" text,\n \"brodal\" text,\n \"strict_fibonacci_heap\" text\n);\n\nQuestion: Binary of \u03b8(log n), and a Fibonacci of \u03b8(1) has what binomial?"
},
{
"role": "assistant",
"content": "SELECT \"binomial\" FROM \"comparison_of_theoretic_bounds_for_varia\" WHERE \"binary\"='\u03b8(log n)' AND \"fibonacci\"='\u03b8(1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"translation\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"duration\" text\n);\n\nQuestion: Which of the titles have a duration time of 4:57?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"duration\"='4:57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"translation\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"duration\" text\n);\n\nQuestion: What composer has a duration time of 3:31?"
},
{
"role": "assistant",
"content": "SELECT \"composer\" FROM \"track_listing\" WHERE \"duration\"='3:31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"translation\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"duration\" text\n);\n\nQuestion: Which one of the duration has a translation of 1000 lies?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"track_listing\" WHERE \"translation\"='1000 lies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"translation\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"duration\" text\n);\n\nQuestion: Which title has a translation of I know in it?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"translation\"='i know';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"title\" text,\n \"translation\" text,\n \"lyricist\" text,\n \"composer\" text,\n \"duration\" text\n);\n\nQuestion: Which title has a translation in it of 1000 lies?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"translation\"='1000 lies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_winners\" (\n \"event\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"4th_place\" text\n);\n\nQuestion: Who won the gold when Bertil Ahlin Sweden won the silver?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_winners\" WHERE \"silver\"='bertil ahlin sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_winners\" (\n \"event\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"4th_place\" text\n);\n\nQuestion: Who won the gold when Jules van Dyk Belgium won bronze?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_winners\" WHERE \"bronze\"='jules van dyk belgium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the second for the curling team which has alternate Margarita Fomina?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"group_a\" WHERE \"alternate\"='margarita fomina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the second for the team with alternate Margarita Fomina?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"group_a\" WHERE \"alternate\"='margarita fomina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the alternate for the team for which Monika Wagner is the third?"
},
{
"role": "assistant",
"content": "SELECT \"alternate\" FROM \"group_a\" WHERE \"third\"='monika wagner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the lead for the team with Nkeiruka Ezekh as second?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"group_a\" WHERE \"second\"='nkeiruka ezekh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the lead for the team with Christina Haller as alternate?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"group_a\" WHERE \"alternate\"='christina haller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"monument_name\" text,\n \"year_built\" real,\n \"city_or_town\" text,\n \"latitude\" text,\n \"longitude\" text\n);\n\nQuestion: What County was built after 1920 with a Latitude of 37\u00b040\u203230\"n?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"references\" WHERE \"year_built\">1920 AND \"latitude\"='37\u00b040\u203230\\\"n';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"monument_name\" text,\n \"year_built\" real,\n \"city_or_town\" text,\n \"latitude\" text,\n \"longitude\" text\n);\n\nQuestion: What is the Latitude of the monument built in 1901?"
},
{
"role": "assistant",
"content": "SELECT \"latitude\" FROM \"references\" WHERE \"year_built\"=1901;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"monument_name\" text,\n \"year_built\" real,\n \"city_or_town\" text,\n \"latitude\" text,\n \"longitude\" text\n);\n\nQuestion: What is the City or Town of the monument with a Longitude of 89\u00b011\u2032w?"
},
{
"role": "assistant",
"content": "SELECT \"city_or_town\" FROM \"references\" WHERE \"longitude\"='89\u00b011\u2032w';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"monument_name\" text,\n \"year_built\" real,\n \"city_or_town\" text,\n \"latitude\" text,\n \"longitude\" text\n);\n\nQuestion: What Monument was built after 1887 in Warren County?"
},
{
"role": "assistant",
"content": "SELECT \"monument_name\" FROM \"references\" WHERE \"year_built\">1887 AND \"county\"='warren';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"county\" text,\n \"monument_name\" text,\n \"year_built\" real,\n \"city_or_town\" text,\n \"latitude\" text,\n \"longitude\" text\n);\n\nQuestion: What County has a Longitude of 85\u00b045\u203243\u2033w?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"references\" WHERE \"longitude\"='85\u00b045\u203243\u2033w';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent from the final with a Partner named jorgelina cravero?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"doubles_6\" WHERE \"partner\"='jorgelina cravero';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_12_11\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome for the match at the leipzig tournament with a score w/o?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_23_12_11\" WHERE \"tournament\"='leipzig' AND \"score\"='w/o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_12_11\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent that anke huber played against in the leipzig tournament?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_23_12_11\" WHERE \"tournament\"='leipzig';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_12_11\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the match against Magdalena Maleeva?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_23_12_11\" WHERE \"opponent\"='magdalena maleeva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the name of the player that was Pick 15?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"pick_num\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: To which college/junior/club team did the player that was Pick 12 belong?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_one\" WHERE \"pick_num\"='12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What NHL team has a player in the position of Left Wing that came from the Toronto Marlboros (omjhl)?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_one\" WHERE \"position\"='left wing' AND \"college_junior_club_team\"='toronto marlboros (omjhl)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: To which college/junior/club team did the player that was Pick 16 belong?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_one\" WHERE \"pick_num\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theatre_credits\" (\n \"year\" real,\n \"production\" text,\n \"role\" text,\n \"director\" text,\n \"company\" text\n);\n\nQuestion: What company does Simon Stone direct earlier than 2011?"
},
{
"role": "assistant",
"content": "SELECT \"company\" FROM \"theatre_credits\" WHERE \"director\"='simon stone' AND \"year\"<2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which Result has a Competition of world cup qualifying, and a Date of march 21, 1954?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"brazil_national_team\" WHERE \"competition\"='world cup qualifying' AND \"date\"='march 21, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which Competition has a Result of w, and a Score of 2-0, and a Date of may 9, 1954?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"brazil_national_team\" WHERE \"result\"='w' AND \"score\"='2-0' AND \"date\"='may 9, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which Result has a Score of 4-1, and a Competition of world cup qualifying?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"brazil_national_team\" WHERE \"score\"='4-1' AND \"competition\"='world cup qualifying';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which Score has a Competition of world cup qualifying, and a Brazil scorers of baltazar, and a Date of march 14, 1954?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"brazil_national_team\" WHERE \"competition\"='world cup qualifying' AND \"brazil_scorers\"='baltazar' AND \"date\"='march 14, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Which Brazil scorers have a Result of w, and a Competition of world cup qualifying, and a Date of february 28, 1954?"
},
{
"role": "assistant",
"content": "SELECT \"brazil_scorers\" FROM \"brazil_national_team\" WHERE \"result\"='w' AND \"competition\"='world cup qualifying' AND \"date\"='february 28, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: when first elected was 1900 what was the district?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"south_carolina\" WHERE \"first_elected\"='1900';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" text,\n \"result\" text\n);\n\nQuestion: when first elected was 1898 what was the party?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"south_carolina\" WHERE \"first_elected\"='1898';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_a_soviet_union\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many Games have a Lost of 6, and Points smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games\") FROM \"world_championship_group_a_soviet_union\" WHERE \"lost\"=6 AND \"points\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"number\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is Larry Centers' average number when there were less than 600 yards?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number\") FROM \"receiving\" WHERE \"player\"='larry centers' AND \"yards\"<600;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"number\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is the highest number when there were more than 50 long and less than 762 yards?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number\") FROM \"receiving\" WHERE \"long\">50 AND \"yards\"<762;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"number\" real,\n \"yards\" real,\n \"average\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is the highest amount of yards when the average is 9.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"yards\") FROM \"receiving\" WHERE \"average\"=9.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: Who was the runner-up on 5 aug 1990?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"european_tour_wins_7\" WHERE \"date\"='5 aug 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: Which Tournament has a Winning score of \u221214 (65-69-72-68=274)?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"european_tour_wins_7\" WHERE \"winning_score\"='\u221214 (65-69-72-68=274)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: Which Runner-up has a Winning score of \u221220 (70-69-64-65=268)?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"european_tour_wins_7\" WHERE \"winning_score\"='\u221220 (70-69-64-65=268)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: Which Date has a Winning score of \u221215 (71-69-68-65=273)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"european_tour_wins_7\" WHERE \"winning_score\"='\u221215 (71-69-68-65=273)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: In which tournament was vijay singh a runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"european_tour_wins_7\" WHERE \"runner_up\"='vijay singh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_7\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_up\" text\n);\n\nQuestion: In which tournament was vijay singh a runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"european_tour_wins_7\" WHERE \"runner_up\"='vijay singh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"five_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"description\" text,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"five_cent_test_tokens\" WHERE \"year_of_issue\"=1983 AND \"weight\"='3.50grams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"five_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"description\" text,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Thickness has a Year of Issue smaller than 1983?"
},
{
"role": "assistant",
"content": "SELECT \"thickness\" FROM \"five_cent_test_tokens\" WHERE \"year_of_issue\"<1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"five_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"description\" text,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Description has a Year of Issue of 1983, and a Thickness of 1.7mm, and a Weight of 3.50grams?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"five_cent_test_tokens\" WHERE \"year_of_issue\"=1983 AND \"thickness\"='1.7mm' AND \"weight\"='3.50grams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"five_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"description\" text,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Thickness has a Weight of 3.50grams?"
},
{
"role": "assistant",
"content": "SELECT \"thickness\" FROM \"five_cent_test_tokens\" WHERE \"weight\"='3.50grams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"five_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"description\" text,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Thickness has a Diameter of 21.9mm?"
},
{
"role": "assistant",
"content": "SELECT \"thickness\" FROM \"five_cent_test_tokens\" WHERE \"diameter\"='21.9mm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1958_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"independent_socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who was on the Socialist Labor ticket in the race against W. Averell Harriman?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_labor_ticket\" FROM \"1958_state_election_results\" WHERE \"liberal_ticket\"='w. averell harriman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1958_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"independent_socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who was the Republican candidate against the Democratic candidate Arthur Levitt?"
},
{
"role": "assistant",
"content": "SELECT \"republican_ticket\" FROM \"1958_state_election_results\" WHERE \"democratic_ticket\"='arthur levitt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1958_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"independent_socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who was the Independent Socialist candidate for the office of comptroller?"
},
{
"role": "assistant",
"content": "SELECT \"independent_socialist_ticket\" FROM \"1958_state_election_results\" WHERE \"office\"='comptroller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1958_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"liberal_ticket\" text,\n \"independent_socialist_ticket\" text,\n \"socialist_labor_ticket\" text\n);\n\nQuestion: Who was the Independent Socialist candidate who ran against the Liberal candidate Edward Goodell?"
},
{
"role": "assistant",
"content": "SELECT \"independent_socialist_ticket\" FROM \"1958_state_election_results\" WHERE \"liberal_ticket\"='edward goodell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: Which Att has a Time of 2:14?"
},
{
"role": "assistant",
"content": "SELECT \"att\" FROM \"game_log\" WHERE \"time\"='2:14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: when is Record of 66-95?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"game_log\" WHERE \"record\"='66-95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: Which Opponent has a Record of 65-95?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='65-95';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par that has ernie els as the player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='ernie els';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What player has money of (\u00a3) 159,500, and france is the country?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"money\"='159,500' AND \"country\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What player has 69-70-68-73=280 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"score\"='69-70-68-73=280';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the average year that has a win less than 1, yamaha as the team, with points greater than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"wins\"<1 AND \"team\"='yamaha' AND \"points\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the highest wins that has 350cc as the class, yamaha for the team, with points less than 37, and a year after 1979?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"class\"='350cc' AND \"team\"='yamaha' AND \"points\"<37 AND \"year\">1979;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many points have 500cc for the class, a win greater than 0, with a year after 1974?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"class\"='500cc' AND \"wins\">0 AND \"year\">1974;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many wins have a year after 1976, and 350cc as the class?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"year\">1976 AND \"class\"='350cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games\" (\n \"la_wins\" real,\n \"draws\" real,\n \"san_jose_wins\" real,\n \"la_goals\" real,\n \"san_jose_goals\" real\n);\n\nQuestion: How many San Jose wins have an LA goals larger than 6, and an LA wins smaller than 21?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"san_jose_wins\") FROM \"games\" WHERE \"la_goals\">6 AND \"la_wins\"<21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games\" (\n \"la_wins\" real,\n \"draws\" real,\n \"san_jose_wins\" real,\n \"la_goals\" real,\n \"san_jose_goals\" real\n);\n\nQuestion: Which San Jose goals have a San Jose wins smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"san_jose_goals\") FROM \"games\" WHERE \"san_jose_wins\"<0;"
}
] |
[
{
"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 \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Name the most april with record of 38-33-10"
},
{
"role": "assistant",
"content": "SELECT MAX(\"april\") FROM \"schedule_and_results\" WHERE \"record\"='38-33-10';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.