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 \"u_s_broadcast_and_ratings\" (\n \"season\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_millions\" text\n);\n\nQuestion: What is the season year where the rank is 39?"
},
{
"role": "assistant",
"content": "SELECT \"tv_season\" FROM \"u_s_broadcast_and_ratings\" WHERE \"rank\"='39';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_broadcast_and_ratings\" (\n \"season\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_millions\" text\n);\n\nQuestion: What is the number of season premieres were 10.17 people watched?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season_premiere\") FROM \"u_s_broadcast_and_ratings\" WHERE \"viewers_millions\"='10.17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_broadcast_and_ratings\" (\n \"season\" real,\n \"timeslot_et\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_millions\" text\n);\n\nQuestion: What is the year of the season that was 12?"
},
{
"role": "assistant",
"content": "SELECT \"tv_season\" FROM \"u_s_broadcast_and_ratings\" WHERE \"season\"=12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: In 2012 what was the average finish?"
},
{
"role": "assistant",
"content": "SELECT \"avg_finish\" FROM \"nascar_sprint_cup_series\" WHERE \"year\"=2012;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many wins happened in 1983?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"year\"=1983;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many top tens had an average start of 29.4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"top_10\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_start\"='29.4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many poles had an average finish of 19.1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"poles\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"='19.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many starts did Hendrick motorsports have?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"starts\") FROM \"nascar_sprint_cup_series\" WHERE \"team_s\"='Hendrick Motorsports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_ten\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: NHL players are all centre in Florida panthers."
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_ten\" WHERE \"position\"='Centre' AND \"nhl_team\"='Florida Panthers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_ten\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: NHL team player San Jose Sharks is United States nationally."
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_ten\" WHERE \"nhl_team\"='San Jose Sharks' AND \"nationality\"='United States';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_ten\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: All players are position mark polak."
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_ten\" WHERE \"player\"='Mark Polak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_ten\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Position in nhl team centre are all smaller pick than 243.0"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_ten\" WHERE \"position\"='Centre' AND \"pick\"<243.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eleven\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What college/junior/club teams do the players from the St. Louis Blues come from?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_eleven\" WHERE \"nhl_team\"='St. Louis Blues';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eleven\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What teams do the players from TPS (Finland) play for?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_eleven\" WHERE \"college_junior_club_team\"='TPS (Finland)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eleven\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What high school team did Doug Nolan play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_eleven\" WHERE \"player\"='Doug Nolan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eleven\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What club team is Per Gustafsson play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_eleven\" WHERE \"player\"='Per Gustafsson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eleven\" (\n \"pick\" real,\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 nationality of Shayne Wright?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_eleven\" WHERE \"player\"='Shayne Wright';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting\" (\n \"song\" text,\n \"mobiles\" real,\n \"northern_ireland\" real,\n \"northern_england\" real,\n \"scotland\" real,\n \"southern_england\" real,\n \"wales\" real,\n \"total\" real\n);\n\nQuestion: How many votes did Southern England cast whilst Northern Ireland cast 3?"
},
{
"role": "assistant",
"content": "SELECT \"southern_england\" FROM \"voting\" WHERE \"northern_ireland\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting\" (\n \"song\" text,\n \"mobiles\" real,\n \"northern_ireland\" real,\n \"northern_england\" real,\n \"scotland\" real,\n \"southern_england\" real,\n \"wales\" real,\n \"total\" real\n);\n\nQuestion: What was the lowest number of votes Scotland cast?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"scotland\") FROM \"voting\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting\" (\n \"song\" text,\n \"mobiles\" real,\n \"northern_ireland\" real,\n \"northern_england\" real,\n \"scotland\" real,\n \"southern_england\" real,\n \"wales\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of votes if Scotland cast 35?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scotland\") FROM \"voting\" WHERE \"total\"=35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting\" (\n \"song\" text,\n \"mobiles\" real,\n \"northern_ireland\" real,\n \"northern_england\" real,\n \"scotland\" real,\n \"southern_england\" real,\n \"wales\" real,\n \"total\" real\n);\n\nQuestion: How many votes did Northern Ireland cast if the total was 35?"
},
{
"role": "assistant",
"content": "SELECT \"northern_ireland\" FROM \"voting\" WHERE \"total\"=35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting\" (\n \"song\" text,\n \"mobiles\" real,\n \"northern_ireland\" real,\n \"northern_england\" real,\n \"scotland\" real,\n \"southern_england\" real,\n \"wales\" real,\n \"total\" real\n);\n\nQuestion: How many votes did Wales cast when Northern England cast 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wales\") FROM \"voting\" WHERE \"northern_england\"=6;"
}
]
|
[
{
"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\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What teams had 9 in the top 5 and 1 wins?"
},
{
"role": "assistant",
"content": "SELECT \"team_s\" FROM \"nascar_nationwide_series\" WHERE \"top_5\"=9 AND \"wins\"=1;"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What teams did the player vadim sharifijanov play for?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_one\" WHERE \"player\"='Vadim Sharifijanov';"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What positions do the hartford whalers nhl team have?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"nhl_team\"='Hartford Whalers';"
}
]
|
[
{
"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\" real,\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 smallest pick for the player, brett lindros?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"round_one\" WHERE \"player\"='Brett Lindros';"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What positions does the college/junior/club team, molot perm (russia) have?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"college_junior_club_team\"='Molot Perm (Russia)';"
}
]
|
[
{
"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\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: The nhl team new york islanders is what nationality?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_one\" WHERE \"nhl_team\"='New York Islanders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1013168_3\" (\n \"district\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_successor_seated\" text\n);\n\nQuestion: What is the name of the vacator for district Louisiana 1st?"
},
{
"role": "assistant",
"content": "SELECT \"vacator\" FROM \"table1_1013168_3\" WHERE \"district\"='Louisiana 1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"critical_temperature_t_c_crystal_structu\" (\n \"formula\" text,\n \"notation\" text,\n \"t_c_k\" real,\n \"no_of_cu_o_planes_in_unit_cell\" real,\n \"crystal_structure\" text\n);\n\nQuestion: What is the notion when the crystal structure is tetragonal and the formula is bi 2 sr 2 cacu 2 o 8"
},
{
"role": "assistant",
"content": "SELECT \"notation\" FROM \"critical_temperature_t_c_crystal_structu\" WHERE \"crystal_structure\"='Tetragonal' AND \"formula\"='Bi 2 Sr 2 CaCu 2 O 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"critical_temperature_t_c_crystal_structu\" (\n \"formula\" text,\n \"notation\" text,\n \"t_c_k\" real,\n \"no_of_cu_o_planes_in_unit_cell\" real,\n \"crystal_structure\" text\n);\n\nQuestion: How many times is the formula tl 2 ba 2 cuo 6?"
},
{
"role": "assistant",
"content": "SELECT \"no_of_cu_o_planes_in_unit_cell\" FROM \"critical_temperature_t_c_crystal_structu\" WHERE \"formula\"='Tl 2 Ba 2 CuO 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"critical_temperature_t_c_crystal_structu\" (\n \"formula\" text,\n \"notation\" text,\n \"t_c_k\" real,\n \"no_of_cu_o_planes_in_unit_cell\" real,\n \"crystal_structure\" text\n);\n\nQuestion: What is the crystal structure for the formula yba 2 cu 3 o 7?"
},
{
"role": "assistant",
"content": "SELECT \"crystal_structure\" FROM \"critical_temperature_t_c_crystal_structu\" WHERE \"formula\"='YBa 2 Cu 3 O 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"critical_temperature_t_c_crystal_structu\" (\n \"formula\" text,\n \"notation\" text,\n \"t_c_k\" real,\n \"no_of_cu_o_planes_in_unit_cell\" real,\n \"crystal_structure\" text\n);\n\nQuestion: What is the number for t c (k) when the notation is tl-2212?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"t_c_k\") FROM \"critical_temperature_t_c_crystal_structu\" WHERE \"notation\"='Tl-2212';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"num\" real,\n \"city\" text,\n \"1981_census\" real,\n \"1991_census\" real,\n \"2001_census\" real,\n \"2010_est\" real,\n \"region\" text\n);\n\nQuestion: How many 2010 estimations have been done in the city of Cremona?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2010_est\") FROM \"references\" WHERE \"city\"='Cremona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"num\" real,\n \"city\" text,\n \"1981_census\" real,\n \"1991_census\" real,\n \"2001_census\" real,\n \"2010_est\" real,\n \"region\" text\n);\n\nQuestion: What's the 2001 census of the region of Abruzzo where the 1871 census is bigger than 51092.0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"2001_census\") FROM \"references\" WHERE \"region\"='Abruzzo' AND \"1981_census\">51092.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"num\" real,\n \"city\" text,\n \"1981_census\" real,\n \"1991_census\" real,\n \"2001_census\" real,\n \"2010_est\" real,\n \"region\" text\n);\n\nQuestion: What's the 1991 census of the city of Carpi?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1991_census\") FROM \"references\" WHERE \"city\"='Carpi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"num\" real,\n \"city\" text,\n \"1981_census\" real,\n \"1991_census\" real,\n \"2001_census\" real,\n \"2010_est\" real,\n \"region\" text\n);\n\nQuestion: How many 2001 censuses are there on number 13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2001_census\") FROM \"references\" WHERE \"num\"=13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"num\" real,\n \"city\" text,\n \"1981_census\" real,\n \"1991_census\" real,\n \"2001_census\" real,\n \"2010_est\" real,\n \"region\" text\n);\n\nQuestion: What's the 1981 census of Livorno?"
},
{
"role": "assistant",
"content": "SELECT \"1981_census\" FROM \"references\" WHERE \"city\"='Livorno';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which NHL team has player Mike Loach?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_eight\" WHERE \"player\"='Mike Loach';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick\" real,\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 NHL team that has Peter Strom?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_eight\" WHERE \"player\"='Peter Strom';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What team is Keith Mccambridge on?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_eight\" WHERE \"player\"='Keith McCambridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many nationalities are the pick 193?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nationality\") FROM \"round_eight\" WHERE \"pick\"=193;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1013168_2\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successors_formal_installation\" text\n);\n\nQuestion: Who was the succesor that was formally installed on November 8, 1978?"
},
{
"role": "assistant",
"content": "SELECT \"successor\" FROM \"table1_1013168_2\" WHERE \"date_of_successors_formal_installation\"='November 8, 1978';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1014319_1\" (\n \"week\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: How many songs received a 10 from Goodman and were rated by Tonioli?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tonioli\") FROM \"table1_1014319_1\" WHERE \"goodman\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1014319_1\" (\n \"week\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: What score did Goodman give to all songs with safe results, which received a 7 from Horwood and have a total score of 31?"
},
{
"role": "assistant",
"content": "SELECT \"goodman\" FROM \"table1_1014319_1\" WHERE \"total\"='31' AND \"horwood\"='7' AND \"result\"='Safe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1014319_1\" (\n \"week\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: What score did Dixon give to the song \"samba / young hearts run free\", which was in second place?"
},
{
"role": "assistant",
"content": "SELECT \"dixon\" FROM \"table1_1014319_1\" WHERE \"dance_song\"='Samba / Young Hearts Run Free' AND \"result\"='Second place';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1014319_1\" (\n \"week\" real,\n \"dance_song\" text,\n \"horwood\" text,\n \"goodman\" text,\n \"dixon\" text,\n \"tonioli\" text,\n \"total\" text,\n \"result\" text\n);\n\nQuestion: How many scores did Goodman give to \"samba / young hearts run free\", which was in second place?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goodman\") FROM \"table1_1014319_1\" WHERE \"result\"='Second place' AND \"dance_song\"='Samba / Young Hearts Run Free';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_fleet_details\" (\n \"class\" text,\n \"operator\" text,\n \"no_built\" real,\n \"year_built\" text,\n \"cars_per_set\" real,\n \"unit_nos\" text\n);\n\nQuestion: What year was number 7 built?"
},
{
"role": "assistant",
"content": "SELECT \"year_built\" FROM \"current_fleet_details\" WHERE \"no_built\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is we two when the case/suffix is loc.?"
},
{
"role": "assistant",
"content": "SELECT \"we_two\" FROM \"nominal_morphology\" WHERE \"case_suffix\"='loc.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is them two (the two) when we two is ngalbelpa?"
},
{
"role": "assistant",
"content": "SELECT \"them_two_the_two\" FROM \"nominal_morphology\" WHERE \"we_two\"='ngalbelpa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is them two (the two) when you and i is ng\u0153balngu?"
},
{
"role": "assistant",
"content": "SELECT \"them_two_the_two\" FROM \"nominal_morphology\" WHERE \"you_and_i\"='ng\u0153balngu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is who-two where you and i is ng\u0153ban?"
},
{
"role": "assistant",
"content": "SELECT \"who_two\" FROM \"nominal_morphology\" WHERE \"you_and_i\"='ng\u0153ban';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is we two where you two is ngipen?"
},
{
"role": "assistant",
"content": "SELECT \"we_two\" FROM \"nominal_morphology\" WHERE \"you_two\"='ngipen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominal_morphology\" (\n \"case_suffix\" text,\n \"we_two\" text,\n \"you_and_i\" text,\n \"you_two\" text,\n \"them_two_the_two\" text,\n \"who_two\" text\n);\n\nQuestion: What is who-two when you two is ngipelngu?"
},
{
"role": "assistant",
"content": "SELECT \"who_two\" FROM \"nominal_morphology\" WHERE \"you_two\"='ngipelngu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"position\" real,\n \"driver\" text,\n \"points\" real,\n \"winnings\" text,\n \"series\" text\n);\n\nQuestion: what's the\u00a0points\u00a0with\u00a0driver\u00a0 mark martin"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race_results\" WHERE \"driver\"='Mark Martin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"position\" real,\n \"driver\" text,\n \"points\" real,\n \"winnings\" text,\n \"series\" text\n);\n\nQuestion: what's the\u00a0points\u00a0with\u00a0driver\u00a0 rusty wallace"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race_results\" WHERE \"driver\"='Rusty Wallace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"position\" real,\n \"driver\" text,\n \"points\" real,\n \"winnings\" text,\n \"series\" text\n);\n\nQuestion: what's the total number of\u00a0position\u00a0with\u00a0driver\u00a0 robby gordon"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"race_results\" WHERE \"driver\"='Robby Gordon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"position\" real,\n \"driver\" text,\n \"points\" real,\n \"winnings\" text,\n \"series\" text\n);\n\nQuestion: what's the maximum\u00a0position\u00a0with\u00a0winnings\u00a0 $50,000"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"race_results\" WHERE \"winnings\"='$50,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What actor was nominted for an award in the film Anastasiya Slutskaya?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_2003_prize_winners\" WHERE \"film_name\"='Anastasiya Slutskaya';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the film Falling up nominated for?"
},
{
"role": "assistant",
"content": "SELECT \"nomination\" FROM \"stozhary_2003_prize_winners\" WHERE \"film_name\"='Falling Up';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What is the name of the actress that was nominated for best actress in a leading role in the film Chopin: Desire for love?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_2003_prize_winners\" WHERE \"film_name\"='Chopin: Desire for Love' AND \"nomination\"='Best Actress in a Leading Role';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What is the name of the actress that was nominated for best actress in a leading role in the film Chopin: Desire for love?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_2003_prize_winners\" WHERE \"film_name\"='Chopin: Desire for Love' AND \"nomination\"='Best Actress in a Leading Role';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Which films does the actor Alla Sergiyko star in?"
},
{
"role": "assistant",
"content": "SELECT \"film_name\" FROM \"stozhary_2003_prize_winners\" WHERE \"actors_name\"='Alla Sergiyko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_2003_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Which nominations was the film 27 Stolen Kisses nominated for?"
},
{
"role": "assistant",
"content": "SELECT \"nomination\" FROM \"stozhary_2003_prize_winners\" WHERE \"film_name\"='27 Stolen Kisses';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_99_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Which actor from Serbia was nominated for best actor in a supporting role?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_99_prize_winners\" WHERE \"nomination\"='Best Actor in a Supporting Role' AND \"country\"='Serbia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_99_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Vsevolod Shilovskiy is from what country?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"stozhary_99_prize_winners\" WHERE \"actors_name\"='Vsevolod Shilovskiy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_99_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Which nominations are connected to the film Totalitarian Romance?"
},
{
"role": "assistant",
"content": "SELECT \"nomination\" FROM \"stozhary_99_prize_winners\" WHERE \"film_name\"='Totalitarian Romance';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_99_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Srdjan Dragojevic worked on a film which earned what nomination?"
},
{
"role": "assistant",
"content": "SELECT \"nomination\" FROM \"stozhary_99_prize_winners\" WHERE \"director\"='Srdjan Dragojevic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_99_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: Which actors are from Ukraine?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_99_prize_winners\" WHERE \"country\"='Ukraine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the film that vadim ilyenko directed?"
},
{
"role": "assistant",
"content": "SELECT \"film_name\" FROM \"stozhary_95_prize_winners\" WHERE \"director\"='Vadim Ilyenko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the actors name that vadim ilyenko directed?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_95_prize_winners\" WHERE \"director\"='Vadim Ilyenko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the actors name for fuchzhou and nomination was best non-professional actor?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_95_prize_winners\" WHERE \"film_name\"='Fuchzhou' AND \"nomination\"='Best Non-Professional Actor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What film did michaylo ilyenko make with best actor in a supporting role?"
},
{
"role": "assistant",
"content": "SELECT \"film_name\" FROM \"stozhary_95_prize_winners\" WHERE \"director\"='Michaylo Ilyenko' AND \"nomination\"='Best Actor in a Supporting Role';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the actor's name for best debut?"
},
{
"role": "assistant",
"content": "SELECT \"actors_name\" FROM \"stozhary_95_prize_winners\" WHERE \"nomination\"='Best Debut';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stozhary_95_prize_winners\" (\n \"nomination\" text,\n \"actors_name\" text,\n \"film_name\" text,\n \"director\" text,\n \"country\" text\n);\n\nQuestion: What was the number of nominations for natalia raskokoha?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nomination\") FROM \"stozhary_95_prize_winners\" WHERE \"actors_name\"='Natalia Raskokoha';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barnsley\" (\n \"season\" text,\n \"division\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the highest value of Total Goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_goals\") FROM \"barnsley\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barnsley\" (\n \"season\" text,\n \"division\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: When FA Cup Apps is 9 what is the smallest number of FA Cup Goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"fa_cup_goals\") FROM \"barnsley\" WHERE \"fa_cup_apps\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barnsley\" (\n \"season\" text,\n \"division\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the smallest number of Total Goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_goals\") FROM \"barnsley\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What circuit was the race where Hideki Mutoh had the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar_and_results\" WHERE \"fastest_lap\"='Hideki Mutoh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_10269427_3\" (\n \"episode_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"airdate\" text\n);\n\nQuestion: what is the minimum production code with title \"foreign exchange problem / turn about\""
},
{
"role": "assistant",
"content": "SELECT MIN(\"production_code\") FROM \"table1_10269427_3\" WHERE \"title\"='\\\"Foreign Exchange Problem / Turn About\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_10269427_3\" (\n \"episode_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"airdate\" text\n);\n\nQuestion: what is the episode # for title \"the yindianapolis 500 / personality problem\""
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"table1_10269427_3\" WHERE \"title\"='\\\"The Yindianapolis 500 / Personality Problem\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_10269427_3\" (\n \"episode_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"airdate\" text\n);\n\nQuestion: what is the episode # for production code 227"
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"table1_10269427_3\" WHERE \"production_code\"=227;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_10269427_3\" (\n \"episode_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"airdate\" text\n);\n\nQuestion: who directed the movie written by is sib ventress / aydrea ten bosch"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_10269427_3\" WHERE \"written_by\"='Sib Ventress / Aydrea ten Bosch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_10269427_3\" (\n \"episode_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"airdate\" text\n);\n\nQuestion: what is the production code with title \"skirting the issue / moon over my yinnie\""
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_10269427_3\" WHERE \"title\"='\\\"Skirting the Issue / Moon Over my Yinnie\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sheffield_united\" (\n \"season\" text,\n \"division\" text,\n \"league_apps\" real,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"total_apps\" real,\n \"total_goals\" real\n);\n\nQuestion: Whatis the number of total goals maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_goals\") FROM \"sheffield_united\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"technology_overview\" (\n \"assembly_type\" text,\n \"adhesive_type\" text,\n \"time_sec\" text,\n \"temp_c\" text,\n \"pressure\" text\n);\n\nQuestion: HOW MANY TEMPERATURE INTERVALS ARE POSSIBLE TO USE WITH ACRYL? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"temp_c\") FROM \"technology_overview\" WHERE \"adhesive_type\"='Acryl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: How many matches where played with Jim Pugh?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponents\") FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"partner\"='Jim Pugh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the score with partner Jim Pugh?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"partner\"='Jim Pugh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: How many matched scored 3\u20136, 7\u20136(5), 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"surface\") FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"score\"='3\u20136, 7\u20136(5), 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the score of the match with partner Jim Pugh?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"partner\"='Jim Pugh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What year was the championship in Wimbledon (2)?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"championship\"='Wimbledon (2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the score of the match with opponents Gretchen Magers Kelly Jones?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mixed_doubles_6_3_titles_3_runner_ups\" WHERE \"opponents\"='Gretchen Magers Kelly Jones';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical\" (\n \"begin_date\" text,\n \"end_date\" text,\n \"representative\" text,\n \"date_of_birth\" text,\n \"house_term\" text,\n \"state_served\" text,\n \"party\" text,\n \"age_years_days\" text\n);\n\nQuestion: How many birthdays does Earl Hanley Beshlin have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date_of_birth\") FROM \"historical\" WHERE \"representative\"='Earl Hanley Beshlin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical\" (\n \"begin_date\" text,\n \"end_date\" text,\n \"representative\" text,\n \"date_of_birth\" text,\n \"house_term\" text,\n \"state_served\" text,\n \"party\" text,\n \"age_years_days\" text\n);\n\nQuestion: Which politican party has a birthday of November 10, 1880"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"historical\" WHERE \"date_of_birth\"='November 10, 1880';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"historical\" (\n \"begin_date\" text,\n \"end_date\" text,\n \"representative\" text,\n \"date_of_birth\" text,\n \"house_term\" text,\n \"state_served\" text,\n \"party\" text,\n \"age_years_days\" text\n);\n\nQuestion: Which representative has a birthday of January 31, 1866?"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"historical\" WHERE \"date_of_birth\"='January 31, 1866';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_team\" (\n \"player\" text,\n \"current_singles_ranking\" text,\n \"current_doubles_ranking\" text,\n \"first_year_played\" real,\n \"ties_played\" real,\n \"total_w_l\" text,\n \"singles_w_l\" text,\n \"doubles_w_l\" text\n);\n\nQuestion: What is the Singles W-L for the players named Laurynas Grigelis?"
},
{
"role": "assistant",
"content": "SELECT \"singles_w_l\" FROM \"current_team\" WHERE \"player\"='Laurynas Grigelis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_team\" (\n \"player\" text,\n \"current_singles_ranking\" text,\n \"current_doubles_ranking\" text,\n \"first_year_played\" real,\n \"ties_played\" real,\n \"total_w_l\" text,\n \"singles_w_l\" text,\n \"doubles_w_l\" text\n);\n\nQuestion: What is the Current singles ranking for the player named Mantas Bugaili\u0161kis?"
},
{
"role": "assistant",
"content": "SELECT \"current_singles_ranking\" FROM \"current_team\" WHERE \"player\"='Mantas Bugaili\u0161kis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast_of_major_productions_1954_1999\" (\n \"character\" text,\n \"1954_broadway\" text,\n \"1955_broadcast\" text,\n \"1960_broadcast\" text,\n \"1979_broadway\" text,\n \"1990_broadway\" text,\n \"1991_broadway\" text,\n \"1998_broadway\" text,\n \"1999_broadway\" text\n);\n\nQuestion: How many playerd Mrs. Darling in the 1999 Broadway?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1999_broadway\") FROM \"cast_of_major_productions_1954_1999\" WHERE \"character\"='Mrs. Darling';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast_of_major_productions_1954_1999\" (\n \"character\" text,\n \"1954_broadway\" text,\n \"1955_broadcast\" text,\n \"1960_broadcast\" text,\n \"1979_broadway\" text,\n \"1990_broadway\" text,\n \"1991_broadway\" text,\n \"1998_broadway\" text,\n \"1999_broadway\" text\n);\n\nQuestion: Who played Peter Pan in the 1990 Broadway?"
},
{
"role": "assistant",
"content": "SELECT \"1990_broadway\" FROM \"cast_of_major_productions_1954_1999\" WHERE \"character\"='Peter Pan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cast_of_major_productions_1954_1999\" (\n \"character\" text,\n \"1954_broadway\" text,\n \"1955_broadcast\" text,\n \"1960_broadcast\" text,\n \"1979_broadway\" text,\n \"1990_broadway\" text,\n \"1991_broadway\" text,\n \"1998_broadway\" text,\n \"1999_broadway\" text\n);\n\nQuestion: Who played in the 1991 Broadway before Barbara McCulloh played the part in the 1999 Broadway?"
},
{
"role": "assistant",
"content": "SELECT \"1991_broadway\" FROM \"cast_of_major_productions_1954_1999\" WHERE \"1999_broadway\"='Barbara McCulloh';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.