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 \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When was the game on Taylor Field played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"location\"='Taylor Field';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: Who placed fourth when the winner was Greg Hancock?"
},
{
"role": "assistant",
"content": "SELECT \"4th_placed\" FROM \"calendar\" WHERE \"winner\"='Greg Hancock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: Who was the runner-up on September 11?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"calendar\" WHERE \"date\"='September 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"city_and_venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"3rd_placed\" text,\n \"4th_placed\" text,\n \"results\" text\n);\n\nQuestion: How many rounds were on July 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"calendar\" WHERE \"date\"='July 10';"
}
]
|
[
{
"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: Name the number of years for 18.5"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"='18.5';"
}
]
|
[
{
"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: Name the max top 5 for avg finish being 27.6"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_5\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"='27.6';"
}
]
|
[
{
"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: Name the number of wins for 30 starts"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"starts\"=30;"
}
]
|
[
{
"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: Name the year for donlavey racing bill davis racing"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"nascar_sprint_cup_series\" WHERE \"team_s\"='Donlavey Racing Bill Davis Racing';"
}
]
|
[
{
"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: Name the starts for 23.7"
},
{
"role": "assistant",
"content": "SELECT \"starts\" FROM \"nascar_sprint_cup_series\" WHERE \"avg_start\"='23.7';"
}
]
|
[
{
"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: Name the position for 23.7 avg start"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_start\"='23.7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_time_entries\" (\n \"team\" text,\n \"car_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: What is the car number for the Chevrolet Monte Carlo that Teresa Earnhardt owns and Paul Menard is her driver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num\") FROM \"full_time_entries\" WHERE \"car_s\"='Chevrolet Monte Carlo' AND \"listed_owner_s\"='Teresa Earnhardt' AND \"driver_s\"='Paul Menard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_time_entries\" (\n \"team\" text,\n \"car_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: What type of car does Jeff Fuller drive?"
},
{
"role": "assistant",
"content": "SELECT \"car_s\" FROM \"full_time_entries\" WHERE \"driver_s\"='Jeff Fuller';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_time_entries\" (\n \"team\" text,\n \"car_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: How many cars does Gregg Mixon own?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"car_s\") FROM \"full_time_entries\" WHERE \"listed_owner_s\"='Gregg Mixon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_time_entries\" (\n \"team\" text,\n \"car_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Who is Wayne Day's crew chief?"
},
{
"role": "assistant",
"content": "SELECT \"crew_chief\" FROM \"full_time_entries\" WHERE \"listed_owner_s\"='Wayne Day';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"full_time_entries\" (\n \"team\" text,\n \"car_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: What number is on the car that Geoffrey Bodine drives?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num\") FROM \"full_time_entries\" WHERE \"driver_s\"='Geoffrey Bodine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2182654_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What episode number in the season is episode 24 in the series?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_season\" FROM \"table1_2182654_3\" WHERE \"no_in_series\"=24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2182654_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes in the season were directed by Jeremy Podeswa?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_season\") FROM \"table1_2182654_3\" WHERE \"directed_by\"='Jeremy Podeswa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2182654_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the name of the episode directed by Miguel Arteta?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_2182654_3\" WHERE \"directed_by\"='Miguel Arteta';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2182654_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes in the series were directed by Alan Taylor?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_series\") FROM \"table1_2182654_3\" WHERE \"directed_by\"='Alan Taylor';"
}
]
|
[
{
"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: How many different teams had an average start of 12.9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"team_s\") FROM \"nascar_nationwide_series\" WHERE \"avg_start\"='12.9';"
}
]
|
[
{
"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: How high was the amount of winnings (in $) in the year with 15 starts?"
},
{
"role": "assistant",
"content": "SELECT \"winnings\" FROM \"nascar_nationwide_series\" WHERE \"starts\"=15;"
}
]
|
[
{
"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: How many different amounts of winnings were there for the year when the team had an average finish of 17.4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"winnings\") FROM \"nascar_nationwide_series\" WHERE \"avg_finish\"='17.4';"
}
]
|
[
{
"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 was the top 5 in the year with an average finish of 8.2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"top_5\") FROM \"nascar_nationwide_series\" WHERE \"avg_finish\"='8.2';"
}
]
|
[
{
"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 was the position of the team with an average finish of 21.5?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nascar_nationwide_series\" WHERE \"avg_finish\"='21.5';"
}
]
|
[
{
"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 years was the position 97th?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"nascar_sprint_cup_series\" WHERE \"position\"='97th';"
}
]
|
[
{
"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 when the average start is 29.0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"avg_start\"='29.0';"
}
]
|
[
{
"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: What is the average finish when winnings equals $71,200?"
},
{
"role": "assistant",
"content": "SELECT \"avg_finish\" FROM \"nascar_sprint_cup_series\" WHERE \"winnings\"='$71,200';"
}
]
|
[
{
"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: What year did the winnings equal $281,945?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"nascar_sprint_cup_series\" WHERE \"winnings\"='$281,945';"
}
]
|
[
{
"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: What are the top 5 average finishes equalling 40.3?"
},
{
"role": "assistant",
"content": "SELECT \"top_5\" FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"='40.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21831229_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Who wrote episode 31 in the series?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21831229_3\" WHERE \"no_in_series\"=31;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21831229_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_u_s_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What was the date that the episode with a production code of 213 was originally aired?"
},
{
"role": "assistant",
"content": "SELECT \"original_u_s_air_date\" FROM \"table1_21831229_3\" WHERE \"prod_code\"=213;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_3_4\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was playing when the score was 5\u20137, 6\u20137 (4\u20137)?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_7_3_4\" WHERE \"score\"='5\u20137, 6\u20137 (4\u20137)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_3_4\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was playing when the score was 5\u20137, 5\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_7_3_4\" WHERE \"score\"='5\u20137, 5\u20137';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_3_4\" (\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 partners were there when the score was 7\u20136 (7\u20134) , 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"partner\") FROM \"doubles_7_3_4\" WHERE \"score\"='7\u20136 (7\u20134) , 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was their record when they played the stampeders?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"opponent\"='Stampeders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was their record in week 11?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"week\"=11;"
}
]
|
[
{
"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: Name the least wins"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"nascar_sprint_cup_series\";"
}
]
|
[
{
"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: Name the avg start for avg finish of 18.3"
},
{
"role": "assistant",
"content": "SELECT \"avg_start\" FROM \"nascar_sprint_cup_series\" WHERE \"avg_finish\"='18.3';"
}
]
|
[
{
"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: Name the year for #16 roush racing for poles less than smaller 1.0"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"nascar_sprint_cup_series\" WHERE \"team_s\"='#16 Roush Racing' AND \"poles\"<1.0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21888587_1\" (\n \"model\" text,\n \"engine\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text,\n \"0_100km_h_acceleration\" text,\n \"top_speed\" text,\n \"transmission\" text,\n \"co_2_emissions\" text\n);\n\nQuestion: Name the transmission for ps (kw; hp) @4500-6000"
},
{
"role": "assistant",
"content": "SELECT \"transmission\" FROM \"table1_21888587_1\" WHERE \"power_rpm\"='PS (kW; hp) @4500-6000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21888587_1\" (\n \"model\" text,\n \"engine\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text,\n \"0_100km_h_acceleration\" text,\n \"top_speed\" text,\n \"transmission\" text,\n \"co_2_emissions\" text\n);\n\nQuestion: Name the 0\u2013100km/h acceleration for ps (kw; hp) @5400"
},
{
"role": "assistant",
"content": "SELECT \"0_100km_h_acceleration\" FROM \"table1_21888587_1\" WHERE \"power_rpm\"='PS (kW; hp) @5400';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_chart\" (\n \"team\" text,\n \"truck_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Name the listen owners for repairone"
},
{
"role": "assistant",
"content": "SELECT \"listed_owner_s\" FROM \"team_chart\" WHERE \"primary_sponsor_s\"='RepairOne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_chart\" (\n \"team\" text,\n \"truck_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Name the trucks for scott neal"
},
{
"role": "assistant",
"content": "SELECT \"truck_s\" FROM \"team_chart\" WHERE \"crew_chief\"='Scott Neal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_chart\" (\n \"team\" text,\n \"truck_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Name the listed owners for brevak racing"
},
{
"role": "assistant",
"content": "SELECT \"listed_owner_s\" FROM \"team_chart\" WHERE \"team\"='Brevak Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_chart\" (\n \"team\" text,\n \"truck_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Name the crew chief for ricky craven"
},
{
"role": "assistant",
"content": "SELECT \"crew_chief\" FROM \"team_chart\" WHERE \"driver_s\"='Ricky Craven';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_chart\" (\n \"team\" text,\n \"truck_s\" text,\n \"num\" real,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"listed_owner_s\" text,\n \"crew_chief\" text\n);\n\nQuestion: Name the drivers for superchips"
},
{
"role": "assistant",
"content": "SELECT \"driver_s\" FROM \"team_chart\" WHERE \"primary_sponsor_s\"='Superchips';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21904740_1\" (\n \"year_ceremony\" text,\n \"english_title\" text,\n \"spanish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: When was Viva Cuba submitted?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"table1_21904740_1\" WHERE \"spanish_title\"='Viva Cuba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_most_powerful_nuclear_tests\" (\n \"date_gmt\" text,\n \"yield_megatons\" text,\n \"deployment\" text,\n \"country\" text,\n \"test_site\" text,\n \"name_or_number\" text\n);\n\nQuestion: Name the name for 15 yield"
},
{
"role": "assistant",
"content": "SELECT \"name_or_number\" FROM \"list_of_most_powerful_nuclear_tests\" WHERE \"yield_megatons\"='15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"public_companies\" (\n \"state_rank_by_revenue\" real,\n \"company_name\" text,\n \"national_rank\" real,\n \"revenue_billions_2012_estimate\" text,\n \"headquarters_city\" text,\n \"known_for\" text\n);\n\nQuestion: What is the rank of the company known for retailing?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"state_rank_by_revenue\") FROM \"public_companies\" WHERE \"known_for\"='Retailing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"public_companies\" (\n \"state_rank_by_revenue\" real,\n \"company_name\" text,\n \"national_rank\" real,\n \"revenue_billions_2012_estimate\" text,\n \"headquarters_city\" text,\n \"known_for\" text\n);\n\nQuestion: What is the rank for Murphy Oil?"
},
{
"role": "assistant",
"content": "SELECT \"state_rank_by_revenue\" FROM \"public_companies\" WHERE \"company_name\"='Murphy Oil';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"public_companies\" (\n \"state_rank_by_revenue\" real,\n \"company_name\" text,\n \"national_rank\" real,\n \"revenue_billions_2012_estimate\" text,\n \"headquarters_city\" text,\n \"known_for\" text\n);\n\nQuestion: Where is the company with estimated revenue of 33.3 billion headquartered?"
},
{
"role": "assistant",
"content": "SELECT \"headquarters_city\" FROM \"public_companies\" WHERE \"revenue_billions_2012_estimate\"='33.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"public_companies\" (\n \"state_rank_by_revenue\" real,\n \"company_name\" text,\n \"national_rank\" real,\n \"revenue_billions_2012_estimate\" text,\n \"headquarters_city\" text,\n \"known_for\" text\n);\n\nQuestion: What is the national rank of Windstream?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"national_rank\") FROM \"public_companies\" WHERE \"company_name\"='Windstream';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"public_companies\" (\n \"state_rank_by_revenue\" real,\n \"company_name\" text,\n \"national_rank\" real,\n \"revenue_billions_2012_estimate\" text,\n \"headquarters_city\" text,\n \"known_for\" text\n);\n\nQuestion: What is the state rank of the company with 6.8 billion in revenue?"
},
{
"role": "assistant",
"content": "SELECT \"state_rank_by_revenue\" FROM \"public_companies\" WHERE \"revenue_billions_2012_estimate\"='6.8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the entrant for benedicto campos"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"entries\" WHERE \"driver\"='Benedicto Campos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the number for autom\u00f3vil club argentino for juan manuel fangio"
},
{
"role": "assistant",
"content": "SELECT \"no\" FROM \"entries\" WHERE \"entrant\"='Autom\u00f3vil Club Argentino' AND \"driver\"='Juan Manuel Fangio';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the most number for autom\u00f3vil club argentino for benedicto campos"
},
{
"role": "assistant",
"content": "SELECT MAX(\"no\") FROM \"entries\" WHERE \"entrant\"='Autom\u00f3vil Club Argentino' AND \"driver\"='Benedicto Campos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the driver for talbot l6"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"entries\" WHERE \"engine\"='Talbot L6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the constructor for alberto ascari"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"entries\" WHERE \"driver\"='Alberto Ascari';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the chassis for alta"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"entries\" WHERE \"constructor\"='Alta';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21977627_1\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: The Maserati 4cl's minimum no was?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no\") FROM \"table1_21977627_1\" WHERE \"chassis\"='Maserati 4CL';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21977627_1\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: How many entrants was yves giraud-cabantous?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"entrant\") FROM \"table1_21977627_1\" WHERE \"driver\"='Yves Giraud-Cabantous';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21977627_1\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: What chasis did the maserati l6s have?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"table1_21977627_1\" WHERE \"engine\"='Maserati L6s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21977627_1\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: How many drivers did Bob Gerard Racing have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"driver\") FROM \"table1_21977627_1\" WHERE \"entrant\"='Bob Gerard Racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"h_win\" real,\n \"h_draw\" real,\n \"a_win\" real,\n \"a_draw\" real,\n \"lost\" real,\n \"def\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"pair\" real,\n \"long\" real,\n \"points\" real,\n \"average\" text\n);\n\nQuestion: For the team with 7 points, how many points were scored against this season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pts_agst\") FROM \"season_2006\" WHERE \"points\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"h_win\" real,\n \"h_draw\" real,\n \"a_win\" real,\n \"a_draw\" real,\n \"lost\" real,\n \"def\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"pair\" real,\n \"long\" real,\n \"points\" real,\n \"average\" text\n);\n\nQuestion: What is the maximum number of points scored against?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pts_agst\") FROM \"season_2006\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"h_win\" real,\n \"h_draw\" real,\n \"a_win\" real,\n \"a_draw\" real,\n \"lost\" real,\n \"def\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"pair\" real,\n \"long\" real,\n \"points\" real,\n \"average\" text\n);\n\nQuestion: What is Chesterfield Spires average?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"season_2006\" WHERE \"club\"='Chesterfield Spires';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_daily_maximum_and_minimum_temper\" (\n \"location\" text,\n \"july_c\" text,\n \"july_f\" text,\n \"january_c\" text,\n \"january_f\" text\n);\n\nQuestion: What is the total number of January (\u00b0C) temperatures when the July (\u00b0C) temperatures were 22/13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"january_c\") FROM \"average_daily_maximum_and_minimum_temper\" WHERE \"july_c\"='22/13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_daily_maximum_and_minimum_temper\" (\n \"location\" text,\n \"july_c\" text,\n \"july_f\" text,\n \"january_c\" text,\n \"january_f\" text\n);\n\nQuestion: What is the total number of January (\u00b0C) temperatures when the July (\u00b0C) temperatures were 23/15?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"january_c\") FROM \"average_daily_maximum_and_minimum_temper\" WHERE \"july_c\"='23/15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_daily_maximum_and_minimum_temper\" (\n \"location\" text,\n \"july_c\" text,\n \"july_f\" text,\n \"january_c\" text,\n \"january_f\" text\n);\n\nQuestion: In what location were the January (\u00b0F) temperatures 30/17?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"average_daily_maximum_and_minimum_temper\" WHERE \"january_f\"='30/17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_daily_maximum_and_minimum_temper\" (\n \"location\" text,\n \"july_c\" text,\n \"july_f\" text,\n \"january_c\" text,\n \"january_f\" text\n);\n\nQuestion: What were the July (\u00b0C) temperatures when the July (\u00b0F) temperatures were 71/55?"
},
{
"role": "assistant",
"content": "SELECT \"july_c\" FROM \"average_daily_maximum_and_minimum_temper\" WHERE \"july_f\"='71/55';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_daily_maximum_and_minimum_temper\" (\n \"location\" text,\n \"july_c\" text,\n \"july_f\" text,\n \"january_c\" text,\n \"january_f\" text\n);\n\nQuestion: What were the January (\u00b0F) temperatures in the Corner Brook location?"
},
{
"role": "assistant",
"content": "SELECT \"january_f\" FROM \"average_daily_maximum_and_minimum_temper\" WHERE \"location\"='Corner Brook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2008\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"def\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"long\" real,\n \"points\" real,\n \"average\" text\n);\n\nQuestion: Name the most points agst"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pts_agst\") FROM \"season_2008\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2008\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"def\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"long\" real,\n \"points\" real,\n \"average\" text\n);\n\nQuestion: Name the least lost"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"season_2008\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21979779_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: who are the writers of the episode that had 3.07 millions of North American spectators?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21979779_1\" WHERE \"u_s_viewers_million\"='3.07';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21979779_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: what is the biggest series episode number whose production code is 2t7211?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"no\") FROM \"table1_21979779_1\" WHERE \"production_code\"='2T7211';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21979779_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: what is the smallest series episode number whose production code is 2t7211?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no\") FROM \"table1_21979779_1\" WHERE \"production_code\"='2T7211';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21979779_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: when was the premiere of the episode where the amount of North American spectators was 1.76 millions?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21979779_1\" WHERE \"u_s_viewers_million\"='1.76';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21994729_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: how many maximum series number have 2apx05 prod. code."
},
{
"role": "assistant",
"content": "SELECT MAX(\"series_num\") FROM \"table1_21994729_3\" WHERE \"prod_code\"='2APX05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21994729_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: What are all the title directed by reginald hudlin"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_21994729_3\" WHERE \"directed_by\"='Reginald Hudlin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21994729_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: reginald hudlin directed how many written by."
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21994729_3\" WHERE \"directed_by\"='Reginald Hudlin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21994729_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: Who wore the episode with the production code of 1apx11?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21994729_2\" WHERE \"prod_code\"='1APX11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21994729_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: Who wrote the episode titled \"heroes\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21994729_2\" WHERE \"title\"='\\\"Heroes\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"rank\" real,\n \"school\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses\" text,\n \"pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: If the rank is 11, what is the total amount?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"college\" WHERE \"rank\"=11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"rank\" real,\n \"school\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses\" text,\n \"pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: If the school is Central Colleges of the Philippines CCP Bobcats, what is the stunts number?"
},
{
"role": "assistant",
"content": "SELECT \"stunts\" FROM \"college\" WHERE \"school\"='Central Colleges of the Philippines CCP Bobcats';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"pos\" real,\n \"team\" text,\n \"07_pts\" real,\n \"08_pts\" real,\n \"09_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real,\n \"avg\" text\n);\n\nQuestion: What is the 07 points minimum if the 08 points is 50?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"07_pts\") FROM \"relegation\" WHERE \"08_pts\"=50;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"pos\" real,\n \"team\" text,\n \"07_pts\" real,\n \"08_pts\" real,\n \"09_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real,\n \"avg\" text\n);\n\nQuestion: If the POS is 3, what is the 08 points?"
},
{
"role": "assistant",
"content": "SELECT \"08_pts\" FROM \"relegation\" WHERE \"pos\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"pos\" real,\n \"team\" text,\n \"07_pts\" real,\n \"08_pts\" real,\n \"09_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real,\n \"avg\" text\n);\n\nQuestion: If the team is Rubio \u00f1\u00fa, what is the 08 points?"
},
{
"role": "assistant",
"content": "SELECT \"08_pts\" FROM \"relegation\" WHERE \"team\"='Rubio \u00d1\u00fa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"pos\" real,\n \"team\" text,\n \"07_pts\" real,\n \"08_pts\" real,\n \"09_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real,\n \"avg\" text\n);\n\nQuestion: If the average is 1.2803, what is the total points maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_pts\") FROM \"relegation\" WHERE \"avg\"='1.2803';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"pos\" real,\n \"team\" text,\n \"07_pts\" real,\n \"08_pts\" real,\n \"09_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real,\n \"avg\" text\n);\n\nQuestion: If the POS is 4, what is the total PLD?"
},
{
"role": "assistant",
"content": "SELECT \"total_pld\" FROM \"relegation\" WHERE \"pos\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: What is the team name when 243 is the total?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"open_qualifiers\" WHERE \"total\"='243';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: Which team names have 44.5 for tumbling?"
},
{
"role": "assistant",
"content": "SELECT \"team_name\" FROM \"open_qualifiers\" WHERE \"tumbling\"='44.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: What is the total if 44 is tosses/pyramids?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"open_qualifiers\" WHERE \"tosses_pyramids\"='44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: How many deductions have 56.5 as tosses/pyramids?"
},
{
"role": "assistant",
"content": "SELECT \"deductions\" FROM \"open_qualifiers\" WHERE \"tosses_pyramids\"='56.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: What is the rank when 36.5 is tumbling?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"open_qualifiers\" WHERE \"tumbling\"='36.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"open_qualifiers\" (\n \"rank\" real,\n \"team_name\" text,\n \"basic_elements\" text,\n \"tumbling\" text,\n \"stunts\" text,\n \"tosses_pyramids\" text,\n \"deductions\" text,\n \"total\" text\n);\n\nQuestion: What is the rank when 64.5 is tosses/pyramids?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"open_qualifiers\" WHERE \"tosses_pyramids\"='64.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_16_10_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many different outcomes of the French Championships were there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"outcome\") FROM \"men_s_doubles_16_10_titles_6_runner_ups\" WHERE \"championship\"='French Championships';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_16_10_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many different final scores were there in 1963?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score_in_the_final\") FROM \"men_s_doubles_16_10_titles_6_runner_ups\" WHERE \"year\"=1963;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"title_in_the_original_language\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Who directed the film titled 'Steam of Life'?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='Steam of Life';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"title_in_the_original_language\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What year was the ceremony where the film 'Tummien Perhosten Koti' was submitted?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"title_in_the_original_language\"='Tummien perhosten koti';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"title_in_the_original_language\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What are the results for the film titled 'Joki'?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"submissions\" WHERE \"title_in_the_original_language\"='Joki';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.