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 \"series_three\" (\n \"num\" real,\n \"title\" text,\n \"original_airdate\" text,\n \"timeslot\" text,\n \"viewers_millions\" text,\n \"nightly_rank\" real,\n \"weekly_rank\" real\n);\n\nQuestion: When did \"Man in the Machine\" originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"series_three\" WHERE \"title\"='\\\"Man in the Machine\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the original air date of the episode that was directed by David Paymer?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_23399481_2\" WHERE \"directed_by\"='David Paymer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: If the amount of U.S. viewers is 2.14 million, who was the episode directed by?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23399481_2\" WHERE \"u_s_viewers_in_millions\"='2.14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: If the amount of U.S. viewers is 2.05 milliom, who was the episode directed by?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23399481_2\" WHERE \"u_s_viewers_in_millions\"='2.05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the director name is the U.S. viewers is 2.22 million?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23399481_2\" WHERE \"u_s_viewers_in_millions\"='2.22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_ratings\" (\n \"num\" real,\n \"airdate\" text,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real\n);\n\nQuestion: What date did \"we are no longer in the bible belt\" air on?"
},
{
"role": "assistant",
"content": "SELECT \"airdate\" FROM \"us_ratings\" WHERE \"episode\"='\\\"We Are No Longer in the Bible Belt\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_ratings\" (\n \"num\" real,\n \"airdate\" text,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real\n);\n\nQuestion: How many million viewers watched the episode that had a 2.6/7 rating/share (18-49)"
},
{
"role": "assistant",
"content": "SELECT \"viewers_millions\" FROM \"us_ratings\" WHERE \"rating_share_18_49\"='2.6/7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_ratings\" (\n \"num\" real,\n \"airdate\" text,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real\n);\n\nQuestion: How many million viewers watched \"nanna is kickin' your butt\"?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_millions\" FROM \"us_ratings\" WHERE \"episode\"='\\\"Nanna Is Kickin'' Your Butt\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_ratings\" (\n \"num\" real,\n \"airdate\" text,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real\n);\n\nQuestion: How many million viewers watched the episode that aired on March 28, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_millions\" FROM \"us_ratings\" WHERE \"airdate\"='March 28, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"us_ratings\" (\n \"num\" real,\n \"airdate\" text,\n \"episode\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" text,\n \"rank_timeslot\" real,\n \"rank_night\" real\n);\n\nQuestion: How many rankings (timeslot) were there for the episode that aired on May 2, 2010?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank_timeslot\") FROM \"us_ratings\" WHERE \"airdate\"='May 2, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who was the writer for the episode called \"What Are You Made of?\""
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_23399481_3\" WHERE \"title\"='\\\"What Are You Made Of?\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What episode had 1.42 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"series_num\" FROM \"table1_23399481_3\" WHERE \"u_s_viewers_in_millions\"='1.42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the original air date for episode 4? "
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_23399481_3\" WHERE \"season_num\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23399481_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who was the writer for the show titled \"and the rocky goes to...\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_23399481_3\" WHERE \"title\"='\\\"And the Rocky Goes To...\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"pos\" real,\n \"no\" real,\n \"driver\" text,\n \"team\" text,\n \"chassis_engine\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" real\n);\n\nQuestion: Which team uses lola t92/00/ buick for their chassis/engine?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_results\" WHERE \"chassis_engine\"='Lola T92/00/ Buick';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"pos\" real,\n \"no\" real,\n \"driver\" text,\n \"team\" text,\n \"chassis_engine\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" real\n);\n\nQuestion: When the pos equals 18 what is the max amount of points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"race_results\" WHERE \"pos\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"pos\" real,\n \"no\" real,\n \"driver\" text,\n \"team\" text,\n \"chassis_engine\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" real\n);\n\nQuestion: How many drivers used lola t92/00/ buick for their chassis/engine?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"race_results\" WHERE \"chassis_engine\"='Lola T92/00/ Buick';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23403578_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 \"prod_code\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What's the series number of the episode with a season number 5, written by Bernie Ancheta?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_series\") FROM \"table1_23403578_3\" WHERE \"written_by\"='Bernie Ancheta' AND \"no_in_season\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23403578_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 \"prod_code\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: When did the episode with production code 213 air for the first time?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_23403578_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 \"table1_23403578_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 \"prod_code\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: Who directed the episode with production code 208?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23403578_3\" WHERE \"prod_code\"='208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23403578_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 \"prod_code\" text,\n \"u_s_viewers_in_millions\" text\n);\n\nQuestion: How many millions of people in the US saw the episode titled \"Ball of Trash\"?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_in_millions\" FROM \"table1_23403578_3\" WHERE \"title\"='\\\"Ball of Trash\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_mountains\" (\n \"direction\" text,\n \"number\" real,\n \"trigram\" text,\n \"24_mountains\" text,\n \"bearing_degrees\" text,\n \"nature\" text\n);\n\nQuestion: What is every direction with 24 mountains as Wei \u672a Kun \u5764 Shen \u7533?"
},
{
"role": "assistant",
"content": "SELECT \"direction\" FROM \"24_mountains\" WHERE \"24_mountains\"='Wei \u672a Kun \u5764 Shen \u7533';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_mountains\" (\n \"direction\" text,\n \"number\" real,\n \"trigram\" text,\n \"24_mountains\" text,\n \"bearing_degrees\" text,\n \"nature\" text\n);\n\nQuestion: How many values for 24 mountains when the bearing or degrees is 67.6 - 82.5 82.6 - 97.5 97.6 - 112.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"24_mountains\") FROM \"24_mountains\" WHERE \"bearing_degrees\"='67.6 - 82.5 82.6 - 97.5 97.6 - 112.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_mountains\" (\n \"direction\" text,\n \"number\" real,\n \"trigram\" text,\n \"24_mountains\" text,\n \"bearing_degrees\" text,\n \"nature\" text\n);\n\nQuestion: What is every trigram when direction is Northwest?"
},
{
"role": "assistant",
"content": "SELECT \"trigram\" FROM \"24_mountains\" WHERE \"direction\"='Northwest';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_mountains\" (\n \"direction\" text,\n \"number\" real,\n \"trigram\" text,\n \"24_mountains\" text,\n \"bearing_degrees\" text,\n \"nature\" text\n);\n\nQuestion: What are all values for 24 mountains when direction is Northeast?"
},
{
"role": "assistant",
"content": "SELECT \"24_mountains\" FROM \"24_mountains\" WHERE \"direction\"='Northeast';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chronological_list_of_grand_slam_singles\" (\n \"years_led\" text,\n \"span_of_years_led\" real,\n \"player\" text,\n \"titles_won_at_point_of_lead\" real,\n \"total_career_titles\" real,\n \"tournament_at_which_lead_began\" text\n);\n\nQuestion: How many career titles does roy emerson have?"
},
{
"role": "assistant",
"content": "SELECT \"total_career_titles\" FROM \"chronological_list_of_grand_slam_singles\" WHERE \"player\"='Roy Emerson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chronological_list_of_grand_slam_singles\" (\n \"years_led\" text,\n \"span_of_years_led\" real,\n \"player\" text,\n \"titles_won_at_point_of_lead\" real,\n \"total_career_titles\" real,\n \"tournament_at_which_lead_began\" text\n);\n\nQuestion: What were the total career titles of the player who led for 5 years?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_career_titles\") FROM \"chronological_list_of_grand_slam_singles\" WHERE \"span_of_years_led\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chronological_list_of_grand_slam_singles\" (\n \"years_led\" text,\n \"span_of_years_led\" real,\n \"player\" text,\n \"titles_won_at_point_of_lead\" real,\n \"total_career_titles\" real,\n \"tournament_at_which_lead_began\" text\n);\n\nQuestion: Of the players whose lead began at the australian championships, what was the shortest span of years led?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"span_of_years_led\") FROM \"chronological_list_of_grand_slam_singles\" WHERE \"tournament_at_which_lead_began\"='Australian Championships';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chronological_list_of_grand_slam_singles\" (\n \"years_led\" text,\n \"span_of_years_led\" real,\n \"player\" text,\n \"titles_won_at_point_of_lead\" real,\n \"total_career_titles\" real,\n \"tournament_at_which_lead_began\" text\n);\n\nQuestion: At which tournament did william renshaw begin his lead when he had won 7 titles?"
},
{
"role": "assistant",
"content": "SELECT \"tournament_at_which_lead_began\" FROM \"chronological_list_of_grand_slam_singles\" WHERE \"player\"='William Renshaw' AND \"titles_won_at_point_of_lead\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chronological_list_of_grand_slam_singles\" (\n \"years_led\" text,\n \"span_of_years_led\" real,\n \"player\" text,\n \"titles_won_at_point_of_lead\" real,\n \"total_career_titles\" real,\n \"tournament_at_which_lead_began\" text\n);\n\nQuestion: At what tournament did pete sampras begin his lead?"
},
{
"role": "assistant",
"content": "SELECT \"tournament_at_which_lead_began\" FROM \"chronological_list_of_grand_slam_singles\" WHERE \"player\"='Pete Sampras';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_2\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_order_they_were_made_num\" real\n);\n\nQuestion: Who are all directors when Sherwood Schwartz is the writer?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_2342078_2\" WHERE \"written_by\"='Sherwood Schwartz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_2\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_order_they_were_made_num\" real\n);\n\nQuestion: What is the highest episode# with the writer Paul West?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episode_num\") FROM \"table1_2342078_2\" WHERE \"written_by\"='Paul West';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_2\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_order_they_were_made_num\" real\n);\n\nQuestion: What is every production code for episode # 13?"
},
{
"role": "assistant",
"content": "SELECT \"production_code_order_they_were_made_num\" FROM \"table1_2342078_2\" WHERE \"episode_num\"=13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_4\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: What is the highest episode number written by Harry Winkler?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episode_num\") FROM \"table1_2342078_4\" WHERE \"written_by\"='Harry Winkler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_4\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: List all directors when Brad Radnitz was the writer?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_2342078_4\" WHERE \"written_by\"='Brad Radnitz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_6\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: Name the airdate for the episode written by howard ostroff"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"table1_2342078_6\" WHERE \"written_by\"='Howard Ostroff';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_6\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: Name the production code # for episode 109"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"production_code_num\") FROM \"table1_2342078_6\" WHERE \"episode_num\"=109;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_6\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: Name who drected the episode written by george tibbles"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_2342078_6\" WHERE \"written_by\"='George Tibbles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_5\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: How many different people directed the episode titled \"Fright Night\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_2342078_5\" WHERE \"title\"='\\\"Fright Night\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_5\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: What's the number of the episode titled \"Everyone can't be George Washington\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"episode_num\") FROM \"table1_2342078_5\" WHERE \"title\"='\\\"Everyone Can''t Be George Washington\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_5\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: How many original air dates are there for the episode titled \"Everyone can't be George Washington\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"original_airdate\") FROM \"table1_2342078_5\" WHERE \"title\"='\\\"Everyone Can''t Be George Washington\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_5\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: What's the title of the episode written by Harry Winkler?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_2342078_5\" WHERE \"written_by\"='Harry Winkler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2342078_5\" (\n \"episode_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"production_code_num\" real\n);\n\nQuestion: What's the production code of the episode titled \"The subject was noses\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"production_code_num\") FROM \"table1_2342078_5\" WHERE \"title\"='\\\"The Subject Was Noses\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: During the 1st Place (Won the Series), who was the act?"
},
{
"role": "assistant",
"content": "SELECT \"act\" FROM \"final\" WHERE \"place_came\"='1st Place (Won the Series)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: During the act, Playing on Glasses, what was the semi-final?"
},
{
"role": "assistant",
"content": "SELECT \"semi_final\" FROM \"final\" WHERE \"act\"='Playing on Glasses';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: During the act, Performance of \"Lost\" by Anouk, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"final\" WHERE \"act\"='Performance of \\\"Lost\\\" by Anouk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: During the act, Performance of \"Lost\" by Anouk, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"final\" WHERE \"act\"='Performance of \\\"Lost\\\" by Anouk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: What was the final place came for the performance of Erlend Bratland?"
},
{
"role": "assistant",
"content": "SELECT \"place_came\" FROM \"final\" WHERE \"artist\"='Erlend Bratland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"place_came\" text,\n \"artist\" text,\n \"category\" text,\n \"act\" text,\n \"semi_final\" text,\n \"result\" text\n);\n\nQuestion: During the act, Performance of \"Lost\" by Anouk, what was the result?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"final\" WHERE \"act\"='Performance of \\\"Lost\\\" by Anouk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23423_2\" (\n \"period\" text,\n \"live_births_per_year\" text,\n \"deaths_per_year\" text,\n \"natural_change_per_year\" text,\n \"cbr\" text,\n \"cdr\" text,\n \"nc\" text,\n \"tfr\" text,\n \"imr\" real,\n \"life_expectancy_total\" text,\n \"life_expectancy_males\" text,\n \"life_expectancy_females\" text\n);\n\nQuestion: How many imr* have 64.3 life expectancy males?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"imr\") FROM \"table1_23423_2\" WHERE \"life_expectancy_males\"='64.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23423_2\" (\n \"period\" text,\n \"live_births_per_year\" text,\n \"deaths_per_year\" text,\n \"natural_change_per_year\" text,\n \"cbr\" text,\n \"cdr\" text,\n \"nc\" text,\n \"tfr\" text,\n \"imr\" real,\n \"life_expectancy_total\" text,\n \"life_expectancy_males\" text,\n \"life_expectancy_females\" text\n);\n\nQuestion: How many imr* have tfr* of 4.31?"
},
{
"role": "assistant",
"content": "SELECT \"imr\" FROM \"table1_23423_2\" WHERE \"tfr\"='4.31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23423_2\" (\n \"period\" text,\n \"live_births_per_year\" text,\n \"deaths_per_year\" text,\n \"natural_change_per_year\" text,\n \"cbr\" text,\n \"cdr\" text,\n \"nc\" text,\n \"tfr\" text,\n \"imr\" real,\n \"life_expectancy_total\" text,\n \"life_expectancy_males\" text,\n \"life_expectancy_females\" text\n);\n\nQuestion: How many deaths per year have 66.3 as the life expectancy females?"
},
{
"role": "assistant",
"content": "SELECT \"deaths_per_year\" FROM \"table1_23423_2\" WHERE \"life_expectancy_females\"='66.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23423_2\" (\n \"period\" text,\n \"live_births_per_year\" text,\n \"deaths_per_year\" text,\n \"natural_change_per_year\" text,\n \"cbr\" text,\n \"cdr\" text,\n \"nc\" text,\n \"tfr\" text,\n \"imr\" real,\n \"life_expectancy_total\" text,\n \"life_expectancy_males\" text,\n \"life_expectancy_females\" text\n);\n\nQuestion: How many imr* have tfr* 5.35?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"imr\") FROM \"table1_23423_2\" WHERE \"tfr\"='5.35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: Which leagues entered in rounds where there were 16 winners from the previous round?"
},
{
"role": "assistant",
"content": "SELECT \"leagues_entering_at_this_round\" FROM \"teams\" WHERE \"winners_from_previous_round\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: Which rounds had 32 clubs involved?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"teams\" WHERE \"clubs_involved\"=32;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: Which round had 24 new entries?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"teams\" WHERE \"new_entries_this_round\"='24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text,\n \"leagues_entering_at_this_round\" text\n);\n\nQuestion: Which leagues entered an extra preliminary round?"
},
{
"role": "assistant",
"content": "SELECT \"leagues_entering_at_this_round\" FROM \"teams\" WHERE \"round\"='Extra Preliminary Round';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Name the location of buffalo sabres"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"game_log\" WHERE \"opponent\"='Buffalo Sabres';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Name the game for 13\u201317\u20139"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"record\"='13\u201317\u20139';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Name the score for december 19"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='December 19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Name the date for new york islanders"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='New York Islanders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Name the opponents for december 3"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponent\") FROM \"game_log\" WHERE \"date\"='December 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many games did they play the carolina hurricanes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"opponent\"='Carolina Hurricanes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score when they had 62 points?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"points\"=62;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What team did the Maple Leafs score 9 points against?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"points\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_junior_classic_practice_times_and_l\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text,\n \"sat_29_aug\" text\n);\n\nQuestion: What time was achieved on Saturday 29th August by the rider who recorded 23' 18.82 97.102mph on Tuesday 25th August?"
},
{
"role": "assistant",
"content": "SELECT \"sat_29_aug\" FROM \"2009_junior_classic_practice_times_and_l\" WHERE \"tues_25_aug\"='23'' 18.82 97.102mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_junior_classic_practice_times_and_l\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text,\n \"sat_29_aug\" text\n);\n\nQuestion: What time was achieved on Saturday 29th August by the rider who recorded 24' 17.26 93.208mph on Monday 24th August?"
},
{
"role": "assistant",
"content": "SELECT \"sat_29_aug\" FROM \"2009_junior_classic_practice_times_and_l\" WHERE \"mon_24_aug\"='24'' 17.26 93.208mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_junior_classic_practice_times_and_l\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text,\n \"sat_29_aug\" text\n);\n\nQuestion: What time was achieved on Saturday 29th August by the rider who recorded 22' 54.20 98.842mph on Tuesday 25th August?"
},
{
"role": "assistant",
"content": "SELECT \"sat_29_aug\" FROM \"2009_junior_classic_practice_times_and_l\" WHERE \"tues_25_aug\"='22'' 54.20 98.842mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_junior_classic_practice_times_and_l\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text,\n \"sat_29_aug\" text\n);\n\nQuestion: What time was achieved on Saturday 29th August by the rider who recorded 25' 01.89 90.438mph on Friday 28th August?"
},
{
"role": "assistant",
"content": "SELECT \"sat_29_aug\" FROM \"2009_junior_classic_practice_times_and_l\" WHERE \"fri_28_aug\"='25'' 01.89 90.438mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_newcomers_race_b_practice_times_and\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text\n);\n\nQuestion: What was the event on Wed 26 Aug where rider is Andrew Farrell 400cc Kawasaki?"
},
{
"role": "assistant",
"content": "SELECT \"wed_26_aug\" FROM \"2009_newcomers_race_b_practice_times_and\" WHERE \"rider\"='Andrew Farrell 400cc Kawasaki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_newcomers_race_b_practice_times_and\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text\n);\n\nQuestion: What was the event on Thurs 27 Aug when Tues 25 Aug was 23' 00.59 98.384mph?"
},
{
"role": "assistant",
"content": "SELECT \"thurs_27_aug\" FROM \"2009_newcomers_race_b_practice_times_and\" WHERE \"tues_25_aug\"='23'' 00.59 98.384mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_newcomers_race_b_practice_times_and\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text\n);\n\nQuestion: What was the Tues 25 Aug time and speed when Mon 24 Aug was 22' 24.56 101.021mph?"
},
{
"role": "assistant",
"content": "SELECT \"tues_25_aug\" FROM \"2009_newcomers_race_b_practice_times_and\" WHERE \"mon_24_aug\"='22'' 24.56 101.021mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_newcomers_race_b_practice_times_and\" (\n \"rank\" real,\n \"rider\" text,\n \"mon_24_aug\" text,\n \"tues_25_aug\" text,\n \"wed_26_aug\" text,\n \"thurs_27_aug\" text,\n \"fri_28_aug\" text\n);\n\nQuestion: Who was the rider when Fri 28 Aug was 24' 23.36 92.820mph?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"2009_newcomers_race_b_practice_times_and\" WHERE \"fri_28_aug\"='24'' 23.36 92.820mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponent has 32194 as the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"=32194;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponent has 36102 is the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"=36102;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_mt\" text,\n \"hometown\" text\n);\n\nQuestion: What is the hometown of contestants who are from the province of Huesca?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"delegates\" WHERE \"province\"='Huesca';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_mt\" text,\n \"hometown\" text\n);\n\nQuestion: What is the height in inches of contestants who are from the province of La Rioja?"
},
{
"role": "assistant",
"content": "SELECT \"height_in\" FROM \"delegates\" WHERE \"province\"='La Rioja';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_mt\" text,\n \"hometown\" text\n);\n\nQuestion: How many contestants of whatever age are there whose hometown of Andujar?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"age\") FROM \"delegates\" WHERE \"hometown\"='Andujar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_mt\" text,\n \"hometown\" text\n);\n\nQuestion: How tall are contestants whose home province is La Rioja?"
},
{
"role": "assistant",
"content": "SELECT \"height_in\" FROM \"delegates\" WHERE \"province\"='La Rioja';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_duronto_express_trains\" (\n \"service\" real,\n \"train_number\" real,\n \"train_name\" text,\n \"source\" text,\n \"departure\" text,\n \"destination\" text,\n \"arrival\" text\n);\n\nQuestion: What's the service number of the Jammu Duronto train? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"service\") FROM \"list_of_duronto_express_trains\" WHERE \"train_name\"='Jammu Duronto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_duronto_express_trains\" (\n \"service\" real,\n \"train_number\" real,\n \"train_name\" text,\n \"source\" text,\n \"departure\" text,\n \"destination\" text,\n \"arrival\" text\n);\n\nQuestion: What's the name of the train to Madurai Junction?"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"list_of_duronto_express_trains\" WHERE \"destination\"='Madurai Junction';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_duronto_express_trains\" (\n \"service\" real,\n \"train_number\" real,\n \"train_name\" text,\n \"source\" text,\n \"departure\" text,\n \"destination\" text,\n \"arrival\" text\n);\n\nQuestion: What's the service number of the Pune Duronto train that departures at 21:35?"
},
{
"role": "assistant",
"content": "SELECT \"service\" FROM \"list_of_duronto_express_trains\" WHERE \"train_name\"='Pune Duronto' AND \"departure\"='21:35';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_duronto_express_trains\" (\n \"service\" real,\n \"train_number\" real,\n \"train_name\" text,\n \"source\" text,\n \"departure\" text,\n \"destination\" text,\n \"arrival\" text\n);\n\nQuestion: What's the name of the train that goes to Bhubaneswar?"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"list_of_duronto_express_trains\" WHERE \"destination\"='Bhubaneswar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record when the opposing team was the Pittsburgh Penguins?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='Pittsburgh Penguins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the game number when the opposing team was the Buffalo Sabres?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"opponent\"='Buffalo Sabres';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_234886_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 \"prod_code\" text\n);\n\nQuestion: What is the product code for the episode titled \"Kafelnikov\"?"
},
{
"role": "assistant",
"content": "SELECT \"prod_code\" FROM \"table1_234886_3\" WHERE \"title\"='\\\"Kafelnikov\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_234886_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 \"prod_code\" text\n);\n\nQuestion: Who directed episode no. 44 in the series?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_234886_3\" WHERE \"no_in_series\"=44;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_234886_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 \"prod_code\" text\n);\n\nQuestion: What is the number in the season of the episode with a production code of 2-05?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_season\") FROM \"table1_234886_3\" WHERE \"prod_code\"='2-05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_234886_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 \"prod_code\" text\n);\n\nQuestion: What is the title of the episode with the production code 2-19?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_234886_3\" WHERE \"prod_code\"='2-19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_234886_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 \"prod_code\" text\n);\n\nQuestion: What is the total number of titles for the episode numbered 29 in the series?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_234886_3\" WHERE \"no_in_series\"=29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23492454_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the name of the episode directed by Jessica Yu?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_23492454_1\" WHERE \"directed_by\"='Jessica Yu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23492454_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: who directed the episode written by Shonda Rhimes?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23492454_1\" WHERE \"written_by\"='Shonda Rhimes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23492454_1\" (\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 \"u_s_viewers_millions\" text\n);\n\nQuestion: How many episodes in the series are also episode 18 in the season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_series\") FROM \"table1_23492454_1\" WHERE \"no_in_season\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who is every opponent on the date of March 16?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='March 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is every score for the opponent of Atlanta Thrashers?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='Atlanta Thrashers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is every location for the date of March 20?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"game_log\" WHERE \"date\"='March 20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is every score at the location of Verizon Center and points of 68?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"location\"='Verizon Center' AND \"points\"=68;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is every date with a record of 30\u201334\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='30\u201334\u201312';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"growth_personnel\" (\n \"date\" text,\n \"total_usaaf\" real,\n \"tot_officers\" real,\n \"tot_enlisted\" real,\n \"num_overseas\" real,\n \"officers_o_s\" real,\n \"enlisted_o_s\" real\n);\n\nQuestion: How many officers o/s were there on the day when the number of USAAF was 2373882?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"officers_o_s\") FROM \"growth_personnel\" WHERE \"total_usaaf\"=2373882;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.