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 \"table1_29273182_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 \"production_code\" text\n);\n\nQuestion: Who wrote the episode with a production code of ip03007?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29273182_1\" WHERE \"production_code\"='IP03007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273182_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 \"production_code\" text\n);\n\nQuestion: What is the name of episode number 29 in the series?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_29273182_1\" 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_29273182_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 \"production_code\" text\n);\n\nQuestion: Who wrote the episode with ip03012 as the production code?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29273182_1\" WHERE \"production_code\"='IP03012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273182_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 \"production_code\" text\n);\n\nQuestion: Who directed the episode with production code ip03010?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_29273182_1\" WHERE \"production_code\"='IP03010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273390_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the least amount in each season? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_season\") FROM \"table1_29273390_1\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273390_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What is the least number in a season?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_season\") FROM \"table1_29273390_1\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273390_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 \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who directed an episode with 1.19 million? "
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_29273390_1\" WHERE \"u_s_viewers_million\"='1.19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" real,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: At what location was the March 17 race held?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"race_calendar_and_results\" WHERE \"date\"='March 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" real,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: What location did Zach Veach have the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"race_calendar_and_results\" WHERE \"fastest_lap\"='Zach Veach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"rnd\" real,\n \"circuit\" text,\n \"location\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"supporting\" text\n);\n\nQuestion: Where was the race with Luke Ellery as fastest lap and Wayne Boyd as winning driver?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"race_calendar_and_results\" WHERE \"fastest_lap\"='Luke Ellery' AND \"winning_driver\"='Wayne Boyd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29289372_1\" (\n \"city_municipality\" text,\n \"population_2010\" real,\n \"area_km\" text,\n \"pop_density_per_km\" text,\n \"income_classification\" text\n);\n\nQuestion: When 318676 is the population of 2010 and 1st class is the income classification what is the area in kilometers squared?"
},
{
"role": "assistant",
"content": "SELECT \"area_km\" FROM \"table1_29289372_1\" WHERE \"income_classification\"='1st Class' AND \"population_2010\"=318676;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29289372_1\" (\n \"city_municipality\" text,\n \"population_2010\" real,\n \"area_km\" text,\n \"pop_density_per_km\" text,\n \"income_classification\" text\n);\n\nQuestion: When itogon, benguet is the city/municipality and 1st class is the income classification how many measurements of population in 2010?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_2010\") FROM \"table1_29289372_1\" WHERE \"income_classification\"='1st Class' AND \"city_municipality\"='Itogon, Benguet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29289372_1\" (\n \"city_municipality\" text,\n \"population_2010\" real,\n \"area_km\" text,\n \"pop_density_per_km\" text,\n \"income_classification\" text\n);\n\nQuestion: When 82.74 is the area in kilometers squared what is the pop.density (per km2)?"
},
{
"role": "assistant",
"content": "SELECT \"pop_density_per_km\" FROM \"table1_29289372_1\" WHERE \"area_km\"='82.74';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29289372_1\" (\n \"city_municipality\" text,\n \"population_2010\" real,\n \"area_km\" text,\n \"pop_density_per_km\" text,\n \"income_classification\" text\n);\n\nQuestion: When 106 is the area in kilometers squared what is the city/municipality?"
},
{
"role": "assistant",
"content": "SELECT \"city_municipality\" FROM \"table1_29289372_1\" WHERE \"area_km\"='106';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273243_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 \"production_code\" text\n);\n\nQuestion: How many episodes have the production code ip04004?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_29273243_1\" WHERE \"production_code\"='IP04004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273243_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 \"production_code\" text\n);\n\nQuestion: What season number is the episode \"The Gang Cracks The Liberty Bell\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_season\") FROM \"table1_29273243_1\" WHERE \"title\"='\\\"The Gang Cracks the Liberty Bell\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273243_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 \"production_code\" text\n);\n\nQuestion: How many people wrote \"Paddy's Pub: The Worst Bar in Philadelphia\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"written_by\") FROM \"table1_29273243_1\" WHERE \"title\"='\\\"Paddy''s Pub: The Worst Bar in Philadelphia\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273243_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 \"production_code\" text\n);\n\nQuestion: Who wrote episode number 11?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29273243_1\" WHERE \"no_in_season\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29273243_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 \"production_code\" text\n);\n\nQuestion: Who wrote the episode \"The Gang Gets Extreme: Home Makeover Edition\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29273243_1\" WHERE \"title\"='\\\"The Gang Gets Extreme: Home Makeover Edition\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"episode\" real,\n \"airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the challenger when guillaume brahimi was the iron chef?"
},
{
"role": "assistant",
"content": "SELECT \"challenger\" FROM \"results\" WHERE \"iron_chef\"='Guillaume Brahimi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"episode\" real,\n \"airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: Who was the iron chef when herb Faust was the challenger?"
},
{
"role": "assistant",
"content": "SELECT \"iron_chef\" FROM \"results\" WHERE \"challenger\"='Herb Faust';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"episode\" real,\n \"airdate\" text,\n \"iron_chef\" text,\n \"challenger\" text,\n \"theme_ingredient\" text,\n \"winner\" text\n);\n\nQuestion: What date did the episode air when guy grossi won?"
},
{
"role": "assistant",
"content": "SELECT \"airdate\" FROM \"results\" WHERE \"winner\"='Guy Grossi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: In the 2010 revival, who played the character that was played by Morgan Albrecht in the New Zealand 2012 production?"
},
{
"role": "assistant",
"content": "SELECT \"revival_cast_2010\" FROM \"characters\" WHERE \"new_zealand_cast_2012\"='Morgan Albrecht';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: In the 2012 production in Wales, who played the character that Owen Little played in Australia?"
},
{
"role": "assistant",
"content": "SELECT \"wales_cast_2012\" FROM \"characters\" WHERE \"australian_cast_2012\"='Owen Little';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: Who played Lily Cahill in the Australian 2012 production?"
},
{
"role": "assistant",
"content": "SELECT \"australian_cast_2012\" FROM \"characters\" WHERE \"character\"='Lily Cahill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: In the 2012 Wales production, who played the character that Clementine Mills played in Australia?"
},
{
"role": "assistant",
"content": "SELECT \"wales_cast_2012\" FROM \"characters\" WHERE \"australian_cast_2012\"='Clementine Mills';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: In the original cast, who played the character portrayed by Edward Franklin in the revival?"
},
{
"role": "assistant",
"content": "SELECT \"original_cast_2009\" FROM \"characters\" WHERE \"revival_cast_2010\"='Edward Franklin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"character\" text,\n \"original_cast_2009\" text,\n \"revival_cast_2010\" text,\n \"wales_cast_2012\" text,\n \"new_zealand_cast_2012\" text,\n \"australian_cast_2012\" text\n);\n\nQuestion: In the original cast, who played the character portrayed by Christopher Harris in Wales?"
},
{
"role": "assistant",
"content": "SELECT \"original_cast_2009\" FROM \"characters\" WHERE \"wales_cast_2012\"='Christopher Harris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: which tournament was the champion nick saviano florin seg\u0103rceanu 6\u20133, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"table1_29296103_10\" WHERE \"champion\"='Nick Saviano Florin Seg\u0103rceanu 6\u20133, 6\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Which tournament was runner-up paul annacone eric korita?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"table1_29296103_10\" WHERE \"runner_up\"='Paul Annacone Eric Korita';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the semifinalists when sammy giammalva was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"table1_29296103_10\" WHERE \"runner_up\"='Sammy Giammalva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: which tournament was the champion pat cash 4\u20136, 6\u20134, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"table1_29296103_10\" WHERE \"champion\"='Pat Cash 4\u20136, 6\u20134, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Which tournament was on the week of 24 october and champion is matt doyle 1\u20136, 6\u20131, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"table1_29296103_10\" WHERE \"week_of\"='24 October' AND \"champion\"='Matt Doyle 1\u20136, 6\u20131, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29296103_10\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: How many runner ups were there for the cologne , germany carpet \u2013 $75,000 \u2013 s32/d16 when the champion was matt doyle 1\u20136, 6\u20131, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runner_up\") FROM \"table1_29296103_10\" WHERE \"tournament\"='Cologne , Germany Carpet \u2013 $75,000 \u2013 S32/D16' AND \"champion\"='Matt Doyle 1\u20136, 6\u20131, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: which train number departs pune at 13:00"
},
{
"role": "assistant",
"content": "SELECT \"train_number\" FROM \"pune_lonavala_service\" WHERE \"departure_pune\"='13:00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: which train number arrives in lonavla at 17:45"
},
{
"role": "assistant",
"content": "SELECT \"train_number\" FROM \"pune_lonavala_service\" WHERE \"arrival_lonavla\"='17:45';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: which train name arrives in lonavla at 17:45"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"pune_lonavala_service\" WHERE \"arrival_lonavla\"='17:45';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: how many trains run daily to lonavla and arrive at 12:25"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"train_number\") FROM \"pune_lonavala_service\" WHERE \"frequency\"='Daily' AND \"arrival_lonavla\"='12:25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: how many trains have the number 99808"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"train_name\") FROM \"pune_lonavala_service\" WHERE \"train_number\"=99808;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pune_lonavala_service\" (\n \"train_number\" real,\n \"train_name\" text,\n \"departure_pune\" text,\n \"arrival_lonavla\" text,\n \"frequency\" text,\n \"origin\" text\n);\n\nQuestion: what time does the train that arrives in lonavla at 22:22 depart pune"
},
{
"role": "assistant",
"content": "SELECT \"departure_pune\" FROM \"pune_lonavala_service\" WHERE \"arrival_lonavla\"='22:22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29295463_9\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who became the champion for the 1984 Grand Prix where Marty Davis was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"table1_29295463_9\" WHERE \"runner_up\"='Marty Davis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29295463_9\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the quarter-finalists in the event where the champion was Terry Moor 3-6, 7-6, 6-2?"
},
{
"role": "assistant",
"content": "SELECT \"quarterfinalists\" FROM \"table1_29295463_9\" WHERE \"champion\"='Terry Moor 3-6, 7-6, 6-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29295463_9\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who was the champion in the tournament where Scott Davis Chris Dunk was the runner up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"table1_29295463_9\" WHERE \"runner_up\"='Scott Davis Chris Dunk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29295463_9\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the semifinalists in the tournament where Mats Wilander 7-6, 6-3 was declared the champion?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"table1_29295463_9\" WHERE \"champion\"='Mats Wilander 7-6, 6-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1850s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: How many years saw 3 hurricanes wherein the strongest storm was level three?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"1850s\" WHERE \"number_of_hurricanes\"=3 AND \"strongest_storm\"='Three';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1860s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: What is the largest overall number of major hurricanes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_major_hurricanes\") FROM \"1860s\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1860s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: When the death is none what is the number of major hurricanes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_major_hurricanes\") FROM \"1860s\" WHERE \"deaths\"='None';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1860s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: What is the lowest overall number of hurricanes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_hurricanes\") FROM \"1860s\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302711_13\" (\n \"rk\" real,\n \"name\" text,\n \"country\" text,\n \"matches_played\" real,\n \"matches_won\" real,\n \"points\" real,\n \"prize_money_usd\" real\n);\n\nQuestion: What country offered a prize of 66400 US dollars?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_29302711_13\" WHERE \"prize_money_usd\"=66400;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302711_13\" (\n \"rk\" real,\n \"name\" text,\n \"country\" text,\n \"matches_played\" real,\n \"matches_won\" real,\n \"points\" real,\n \"prize_money_usd\" real\n);\n\nQuestion: What country does the player named Mark Cox play for?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_29302711_13\" WHERE \"name\"='Mark Cox';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1870s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: How many deaths did the eyar with exactly 6 hurricanes have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"deaths\") FROM \"1870s\" WHERE \"number_of_hurricanes\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1870s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: What is the maximum number of tropical storms in the year that had exactly 34 deaths?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_tropical_storms\") FROM \"1870s\" WHERE \"deaths\"='34';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1870s\" (\n \"year\" real,\n \"number_of_tropical_storms\" real,\n \"number_of_hurricanes\" real,\n \"number_of_major_hurricanes\" real,\n \"deaths\" text,\n \"strongest_storm\" text\n);\n\nQuestion: How many deaths did the year with 10 hurricanes and exactly 1 major hurricane have?"
},
{
"role": "assistant",
"content": "SELECT \"deaths\" FROM \"1870s\" WHERE \"number_of_hurricanes\"=10 AND \"number_of_major_hurricanes\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29329432_1\" (\n \"no\" 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: Name the number of episodes that jim barnes wrote for 1.82 million viewers"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"table1_29329432_1\" WHERE \"written_by\"='Jim Barnes' AND \"u_s_viewers_million\"='1.82';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29329432_1\" (\n \"no\" 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: Name the least number for production code 3x6266"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no\") FROM \"table1_29329432_1\" WHERE \"production_code\"='3X6266';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cube_film_series\" (\n \"name\" text,\n \"occupation\" text,\n \"gender\" text,\n \"prison_connection\" text,\n \"played_by\" text,\n \"status\" text\n);\n\nQuestion: How many characters does Maurice Dean Wint play in the movie Cube?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"status\") FROM \"cube_film_series\" WHERE \"played_by\"='Maurice Dean Wint';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cube_film_series\" (\n \"name\" text,\n \"occupation\" text,\n \"gender\" text,\n \"prison_connection\" text,\n \"played_by\" text,\n \"status\" text\n);\n\nQuestion: What is Joan Leaven's occupation?"
},
{
"role": "assistant",
"content": "SELECT \"occupation\" FROM \"cube_film_series\" WHERE \"name\"='Joan Leaven';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cube_film_series\" (\n \"name\" text,\n \"occupation\" text,\n \"gender\" text,\n \"prison_connection\" text,\n \"played_by\" text,\n \"status\" text\n);\n\nQuestion: What gender is Quentin?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"cube_film_series\" WHERE \"name\"='Quentin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cube_film_series\" (\n \"name\" text,\n \"occupation\" text,\n \"gender\" text,\n \"prison_connection\" text,\n \"played_by\" text,\n \"status\" text\n);\n\nQuestion: Who played the mathematics student?"
},
{
"role": "assistant",
"content": "SELECT \"played_by\" FROM \"cube_film_series\" WHERE \"occupation\"='Mathematics Student';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cube_film_series\" (\n \"name\" text,\n \"occupation\" text,\n \"gender\" text,\n \"prison_connection\" text,\n \"played_by\" text,\n \"status\" text\n);\n\nQuestion: How many prisons is Joan Leaven connected with?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prison_connection\") FROM \"cube_film_series\" WHERE \"name\"='Joan Leaven';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"aggressive_rider\" text\n);\n\nQuestion: What is aggressive rider Richie Porte's team classifaction?"
},
{
"role": "assistant",
"content": "SELECT \"team_classification\" FROM \"classification_leadership\" WHERE \"aggressive_rider\"='Richie Porte';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"aggressive_rider\" text\n);\n\nQuestion: Thomas de Gendt performed on what stage as aggressive rider?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"stage\") FROM \"classification_leadership\" WHERE \"aggressive_rider\"='Thomas De Gendt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"aggressive_rider\" text\n);\n\nQuestion: Where Luke Durbridge is the aggressive rider who is listed as the young rider classification?"
},
{
"role": "assistant",
"content": "SELECT \"young_rider_classification\" FROM \"classification_leadership\" WHERE \"aggressive_rider\"='Luke Durbridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"aggressive_rider\" text\n);\n\nQuestion: Who is listed under the general classifcation where Ben Swift won and Cameron Meyer was listed under the young rider?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Ben Swift' AND \"young_rider_classification\"='Cameron Meyer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text,\n \"aggressive_rider\" text\n);\n\nQuestion: Who is the sprint classification where Francisco Ventoso wins?"
},
{
"role": "assistant",
"content": "SELECT \"sprint_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Francisco Ventoso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302781_12\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: In the week of what was the runner-up Pat Du Pr\u00e9?"
},
{
"role": "assistant",
"content": "SELECT \"week_of\" FROM \"table1_29302781_12\" WHERE \"runner_up\"='Pat Du Pr\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302781_12\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the semifinalists when the runner-up was Peter Feigl?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"table1_29302781_12\" WHERE \"runner_up\"='Peter Feigl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302781_12\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the semifinalists when the runner-up was Pat Du Pr\u00e9?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"table1_29302781_12\" WHERE \"runner_up\"='Pat Du Pr\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302781_12\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: Who were the semifinalists in the week of 13 November when the runner-up was Pat Du Pr\u00e9?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"table1_29302781_12\" WHERE \"week_of\"='13 November' AND \"runner_up\"='Pat Du Pr\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29302816_8\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"semifinalists\" text,\n \"quarterfinalists\" text\n);\n\nQuestion: What are the quarterfinalists when the runner up is andrew pattison?"
},
{
"role": "assistant",
"content": "SELECT \"quarterfinalists\" FROM \"table1_29302816_8\" WHERE \"runner_up\"='Andrew Pattison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_293465_1\" (\n \"rank_2011\" real,\n \"country\" text,\n \"production_in_2011_1_000_ton\" real,\n \"share_2011\" text,\n \"rank_2010\" real,\n \"production_in_2010_1_000_ton\" real\n);\n\nQuestion: When indonesia is the country what is the rank of 2010?"
},
{
"role": "assistant",
"content": "SELECT \"rank_2010\" FROM \"table1_293465_1\" WHERE \"country\"='Indonesia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_293465_1\" (\n \"rank_2011\" real,\n \"country\" text,\n \"production_in_2011_1_000_ton\" real,\n \"share_2011\" text,\n \"rank_2010\" real,\n \"production_in_2010_1_000_ton\" real\n);\n\nQuestion: When 5 is the rank of 2011 what is the country?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_293465_1\" WHERE \"rank_2011\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_293465_1\" (\n \"rank_2011\" real,\n \"country\" text,\n \"production_in_2011_1_000_ton\" real,\n \"share_2011\" text,\n \"rank_2010\" real,\n \"production_in_2010_1_000_ton\" real\n);\n\nQuestion: When sweden is the country what is the highest production in 2010 (1,000 ton)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"production_in_2010_1_000_ton\") FROM \"table1_293465_1\" WHERE \"country\"='Sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_293465_1\" (\n \"rank_2011\" real,\n \"country\" text,\n \"production_in_2011_1_000_ton\" real,\n \"share_2011\" text,\n \"rank_2010\" real,\n \"production_in_2010_1_000_ton\" real\n);\n\nQuestion: When 75849 is the production in 2010 (1,000 ton) what is the production in 2011 (1,000 ton)?"
},
{
"role": "assistant",
"content": "SELECT \"production_in_2011_1_000_ton\" FROM \"table1_293465_1\" WHERE \"production_in_2010_1_000_ton\"=75849;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Valmir Benavides won pole position at which circuit?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar_and_results\" WHERE \"pole_position\"='Valmir Benavides';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"round\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winner at the track where Roberval Andrade won pole, Felipe Giaffone had the fastest lap, and RVR Corinthians Motorsport was the winning team?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"race_calendar_and_results\" WHERE \"pole_position\"='Roberval Andrade' AND \"fastest_lap\"='Felipe Giaffone' AND \"winning_team\"='RVR Corinthians Motorsport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_situation\" (\n \"provider\" text,\n \"country\" text,\n \"subscribers_2005_thousands\" real,\n \"subscribers_2006_thousands\" real,\n \"growth_pct\" text\n);\n\nQuestion: What is the fewest number of 2005 subscribers for Vodafone?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"subscribers_2005_thousands\") FROM \"current_situation\" WHERE \"provider\"='Vodafone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_situation\" (\n \"provider\" text,\n \"country\" text,\n \"subscribers_2005_thousands\" real,\n \"subscribers_2006_thousands\" real,\n \"growth_pct\" text\n);\n\nQuestion: What is the maximum number of 2006 subscribers for Glo Mobile?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"subscribers_2006_thousands\") FROM \"current_situation\" WHERE \"provider\"='Glo Mobile';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_situation\" (\n \"provider\" text,\n \"country\" text,\n \"subscribers_2005_thousands\" real,\n \"subscribers_2006_thousands\" real,\n \"growth_pct\" text\n);\n\nQuestion: What is the maximum number of 2006 subscribers for Mobilis?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"subscribers_2006_thousands\") FROM \"current_situation\" WHERE \"provider\"='Mobilis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_situation\" (\n \"provider\" text,\n \"country\" text,\n \"subscribers_2005_thousands\" real,\n \"subscribers_2006_thousands\" real,\n \"growth_pct\" text\n);\n\nQuestion: How many subscribers, in 2006, does Glo Mobile have?"
},
{
"role": "assistant",
"content": "SELECT \"subscribers_2006_thousands\" FROM \"current_situation\" WHERE \"provider\"='Glo Mobile';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_situation\" (\n \"provider\" text,\n \"country\" text,\n \"subscribers_2005_thousands\" real,\n \"subscribers_2006_thousands\" real,\n \"growth_pct\" text\n);\n\nQuestion: How many 2006 subscribers are named Vodafone?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"subscribers_2006_thousands\") FROM \"current_situation\" WHERE \"provider\"='Vodafone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Name the number of captains for barcelona"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"captain\") FROM \"personnel_and_sponsorship\" WHERE \"team\"='Barcelona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Name the chairman for iker casillas"
},
{
"role": "assistant",
"content": "SELECT \"chairman\" FROM \"personnel_and_sponsorship\" WHERE \"captain\"='Iker Casillas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_sponsorship\" (\n \"team\" text,\n \"chairman\" text,\n \"head_coach\" text,\n \"captain\" text,\n \"kitmaker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Name the team for javier clemente"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_sponsorship\" WHERE \"head_coach\"='Javier Clemente';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: What is the season # for the production code 3.89?"
},
{
"role": "assistant",
"content": "SELECT \"season_num\" FROM \"table1_29391888_1\" WHERE \"production_code\"='3.89';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: What is the series # for the episode titled \"words\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"series_num\") FROM \"table1_29391888_1\" WHERE \"title\"='\\\"Words\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: Who wrote the episode that was directed by Kevin Inch?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29391888_1\" WHERE \"directed_by\"='Kevin Inch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: What is the original air date for the season# 2?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_29391888_1\" WHERE \"season_num\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: What is the production code for the episode whose original air date was May15,2000?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_29391888_1\" WHERE \"original_air_date\"='May15,2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29391888_1\" (\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 \"production_code\" text\n);\n\nQuestion: Who directed the episode titled \"who nose\"?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_29391888_1\" WHERE \"title\"='\\\"Who Nose\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What is the former school of the player from Detroit, MI?"
},
{
"role": "assistant",
"content": "SELECT \"former_school\" FROM \"roster\" WHERE \"hometown\"='Detroit, MI';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What is the hometown of Jarrid Famous?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"roster\" WHERE \"name\"='Jarrid Famous';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What number is the player whose hometown is Tampa, FL?"
},
{
"role": "assistant",
"content": "SELECT \"num\" FROM \"roster\" WHERE \"hometown\"='Tampa, FL';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What year is the player whose number is 31?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"roster\" WHERE \"num\"=31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What is the height of Anthony Crater? "
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"roster\" WHERE \"name\"='Anthony Crater';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"num\" real,\n \"name\" text,\n \"position\" text,\n \"height\" text,\n \"weight\" real,\n \"year\" text,\n \"former_school\" text,\n \"hometown\" text\n);\n\nQuestion: What is the former school of the player from North Port, FL? "
},
{
"role": "assistant",
"content": "SELECT \"former_school\" FROM \"roster\" WHERE \"hometown\"='North Port, FL';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_recipient_countries_of_remittances_i\" (\n \"country\" text,\n \"remittances_2008\" text,\n \"remittances_2009\" text,\n \"remittances_2010\" text,\n \"remittances_2011\" text\n);\n\nQuestion: how many countries have remittances in 2008 of 9.07?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"country\") FROM \"top_recipient_countries_of_remittances_i\" WHERE \"remittances_2008\"='9.07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_recipient_countries_of_remittances_i\" (\n \"country\" text,\n \"remittances_2008\" text,\n \"remittances_2009\" text,\n \"remittances_2010\" text,\n \"remittances_2011\" text\n);\n\nQuestion: how many remittances in 2010 where the remittances is 19.73?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"remittances_2010\") FROM \"top_recipient_countries_of_remittances_i\" WHERE \"remittances_2009\"='19.73';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_recipient_countries_of_remittances_i\" (\n \"country\" text,\n \"remittances_2008\" text,\n \"remittances_2009\" text,\n \"remittances_2010\" text,\n \"remittances_2011\" text\n);\n\nQuestion: how many remittances in 2010 for nigeria?"
},
{
"role": "assistant",
"content": "SELECT \"remittances_2010\" FROM \"top_recipient_countries_of_remittances_i\" WHERE \"country\"='Nigeria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_recipient_countries_of_remittances_i\" (\n \"country\" text,\n \"remittances_2008\" text,\n \"remittances_2009\" text,\n \"remittances_2010\" text,\n \"remittances_2011\" text\n);\n\nQuestion: how many countiers had 2009 remittances of 6.02?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"country\") FROM \"top_recipient_countries_of_remittances_i\" WHERE \"remittances_2009\"='6.02';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.