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 \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Year is the highest one that has a Venue of edmonton, canada?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"venue\"='edmonton, canada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Position has a Competition of world championships, and a Year larger than 1997?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievements\" WHERE \"competition\"='world championships' AND \"year\">1997;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which Venue has a Notes of heptathlon, and a Year of 1991?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"notes\"='heptathlon' AND \"year\"=1991;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pro_wrestling_zero1_version_disputed_bra\" (\n \"wrestler\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What days held has noiz as the wrestler?"
},
{
"role": "assistant",
"content": "SELECT \"days_held\" FROM \"pro_wrestling_zero1_version_disputed_bra\" WHERE \"wrestler\"='noiz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pro_wrestling_zero1_version_disputed_bra\" (\n \"wrestler\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What location has tatsuhito takaiwa as the wrestler?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"pro_wrestling_zero1_version_disputed_bra\" WHERE \"wrestler\"='tatsuhito takaiwa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pro_wrestling_zero1_version_disputed_bra\" (\n \"wrestler\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What event has 8 as the days held?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"pro_wrestling_zero1_version_disputed_bra\" WHERE \"days_held\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pro_wrestling_zero1_version_disputed_bra\" (\n \"wrestler\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What event has unknown as the days held.?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"pro_wrestling_zero1_version_disputed_bra\" WHERE \"days_held\"='unknown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text\n);\n\nQuestion: What is the Displacement of the Iveco F1CE3481E Engine?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"2011\" WHERE \"engine\"='iveco f1ce3481e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text\n);\n\nQuestion: What is the Displacement of the 180 Multijet Power/3.0 HDI Model?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"2011\" WHERE \"model\"='180 multijet power/3.0 hdi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"model\" text,\n \"engine\" text,\n \"displacement\" text,\n \"valvetrain\" text,\n \"fuel_system\" text,\n \"max_power_at_rpm\" text,\n \"max_torque_at_rpm\" text\n);\n\nQuestion: What is the Valvetrain of the Diesel Engines Model?"
},
{
"role": "assistant",
"content": "SELECT \"valvetrain\" FROM \"2011\" WHERE \"model\"='diesel engines';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: Year(s) won of 1994 , 1997 has what average total?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"year_s_won\"='1994 , 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: Player of corey pavin, and a To par larger than 5 has what average total?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"player\"='corey pavin' AND \"to_par\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: Total smaller than 285, and a To par larger than 1 belongs to what player?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"<285 AND \"to_par\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real,\n \"finish\" text\n);\n\nQuestion: Total larger than 285, and a Finish of t30 belongs to what player?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\">285 AND \"finish\"='t30';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which player for a team with an 18-20 record had the most rebounds in a game?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"record\"='18-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"islands_km\" (\n \"rank\" real,\n \"island_s_name\" text,\n \"area_sqmi\" real,\n \"area_km_2\" real,\n \"location\" text,\n \"population_2000\" text\n);\n\nQuestion: What is the total area of Kruzof island?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"area_km_2\") FROM \"islands_km\" WHERE \"island_s_name\"='kruzof island';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Name the total number of frequency Mhz with class of d and call sign of k201bm and ERP W less than 74"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"frequency_m_hz\") FROM \"external_links\" WHERE \"class\"='d' AND \"call_sign\"='k201bm' AND \"erp_w\"<74;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Name the least frequency Mhz with call sign of k202ag"
},
{
"role": "assistant",
"content": "SELECT MIN(\"frequency_m_hz\") FROM \"external_links\" WHERE \"call_sign\"='k202ag';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Name the class with call sign of k220cp"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"external_links\" WHERE \"call_sign\"='k220cp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Winnipeg Jets record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"opponent\"='winnipeg jets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What's the stadium on November 8?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='november 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor on March 17?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" 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 \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What's the score for Toronto Maple Leafs on November 10?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='toronto maple leafs' AND \"date\"='november 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor on October 31?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"regular_season\" WHERE \"date\"='october 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the rank associated with 0 wins and a 350cc class?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"=0 AND \"class\"='350cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the run 2 of the athlete from Australia with a run 1 less than 53.75?"
},
{
"role": "assistant",
"content": "SELECT \"run_2\" FROM \"women\" WHERE \"country\"='australia' AND \"run_1\"<53.75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the run 2 of athlete Maria Orlova from Russia?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"run_2\") FROM \"women\" WHERE \"country\"='russia' AND \"athlete\"='maria orlova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the run 3 of the athlete with a run 1 more than 53.75 and a run 2 less than 52.91?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"run_3\") FROM \"women\" WHERE \"run_1\">53.75 AND \"run_2\"<52.91;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the lowest run 3 an athlete with a run 2 less than 53.72 and a run 1 of 53.1 has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"run_3\") FROM \"women\" WHERE \"run_2\"<53.72 AND \"run_1\"=53.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the lowest run 2 of the athlete with a run 1 of 52.44 and a run 3 less than 52.35?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"run_2\") FROM \"women\" WHERE \"run_1\"=52.44 AND \"run_3\"<52.35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"position\" real,\n \"driver\" text,\n \"wins\" real,\n \"poles\" real,\n \"top_5_s\" real,\n \"points\" real\n);\n\nQuestion: How many points are associated with over 1 top 5, 1 win, over 0 poles, and andrew ranger as the driver?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"standings\" WHERE \"top_5_s\">1 AND \"wins\"=1 AND \"poles\">0 AND \"driver\"='andrew ranger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"position\" real,\n \"driver\" text,\n \"wins\" real,\n \"poles\" real,\n \"top_5_s\" real,\n \"points\" real\n);\n\nQuestion: How many points are associated with 0 poles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"standings\" WHERE \"poles\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"position\" real,\n \"driver\" text,\n \"wins\" real,\n \"poles\" real,\n \"top_5_s\" real,\n \"points\" real\n);\n\nQuestion: How many wins are associated with a position of under 6, over 8 top 5s, and 1793 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"standings\" WHERE \"position\"<6 AND \"top_5_s\"=8 AND \"points\"=1793;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the first game that has a home team of Detroit?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game_num\") FROM \"march\" WHERE \"home\"='detroit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which home team has higher than 92 points?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"march\" WHERE \"points\">92;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_centuries_by_nightwatchmen\" (\n \"player\" text,\n \"team\" text,\n \"score\" text,\n \"versus\" text,\n \"year\" real\n);\n\nQuestion: what team's score is 101?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"test_centuries_by_nightwatchmen\" WHERE \"score\"='101';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_centuries_by_nightwatchmen\" (\n \"player\" text,\n \"team\" text,\n \"score\" text,\n \"versus\" text,\n \"year\" real\n);\n\nQuestion: what team played against zimbabwe in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"test_centuries_by_nightwatchmen\" WHERE \"year\"=1999 AND \"versus\"='zimbabwe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_centuries_by_nightwatchmen\" (\n \"player\" text,\n \"team\" text,\n \"score\" text,\n \"versus\" text,\n \"year\" real\n);\n\nQuestion: what is the team that played in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"test_centuries_by_nightwatchmen\" WHERE \"year\"=2006;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_average_points_per_race_entered\" (\n \"driver\" text,\n \"entries\" real,\n \"points\" real,\n \"average_points_per_race_entered\" real,\n \"average_pre_2010\" real\n);\n\nQuestion: What is the lowest amount of points driver Romain Grosjean, who has an average pre-2010 less than 0, has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"highest_average_points_per_race_entered\" WHERE \"driver\"='romain grosjean' AND \"average_pre_2010\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_average_points_per_race_entered\" (\n \"driver\" text,\n \"entries\" real,\n \"points\" real,\n \"average_points_per_race_entered\" real,\n \"average_pre_2010\" real\n);\n\nQuestion: What is the average number of entries driver Mark Webber, who has more than 1014.5 points, has?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"entries\") FROM \"highest_average_points_per_race_entered\" WHERE \"driver\"='mark webber' AND \"points\">1014.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_average_points_per_race_entered\" (\n \"driver\" text,\n \"entries\" real,\n \"points\" real,\n \"average_points_per_race_entered\" real,\n \"average_pre_2010\" real\n);\n\nQuestion: What is the highest average points per race of the driver with less than 969 points and an average pre-2010 less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"average_points_per_race_entered\") FROM \"highest_average_points_per_race_entered\" WHERE \"points\"<969 AND \"average_pre_2010\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_average_points_per_race_entered\" (\n \"driver\" text,\n \"entries\" real,\n \"points\" real,\n \"average_points_per_race_entered\" real,\n \"average_pre_2010\" real\n);\n\nQuestion: What is the lowest average points per race entered of driver kimi r\u00e4ikk\u00f6nen, who has more than 194 entries?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average_points_per_race_entered\") FROM \"highest_average_points_per_race_entered\" WHERE \"driver\"='kimi r\u00e4ikk\u00f6nen' AND \"entries\">194;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the first game played against the Chicago Black Hawks?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='chicago black hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"premier_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Name the opponent for 9 november 1991"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"premier_division\" WHERE \"date\"='9 november 1991';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_teams_with_one_or_no_wins_in_a_seaso\" (\n \"season\" real,\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: Which Losses is the lowest one that has Wins smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"cfl_teams_with_one_or_no_wins_in_a_seaso\" WHERE \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_teams_with_one_or_no_wins_in_a_seaso\" (\n \"season\" real,\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: Which Losses have a Season larger than 1941, and a Team of hamilton wildcats, and Ties of 0?"
},
{
"role": "assistant",
"content": "SELECT \"losses\" FROM \"cfl_teams_with_one_or_no_wins_in_a_seaso\" WHERE \"season\">1941 AND \"team\"='hamilton wildcats' AND \"ties\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_teams_with_one_or_no_wins_in_a_seaso\" (\n \"season\" real,\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: Which Season has Ties smaller than 1, and a Team of vancouver grizzlies, and Wins smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"cfl_teams_with_one_or_no_wins_in_a_seaso\" WHERE \"ties\"<1 AND \"team\"='vancouver grizzlies' AND \"wins\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_teams_with_one_or_no_wins_in_a_seaso\" (\n \"season\" real,\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: How many Ties have Wins smaller than 1, and Games of 6, and Losses of 6, and a Season larger than 1941?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ties\") FROM \"cfl_teams_with_one_or_no_wins_in_a_seaso\" WHERE \"wins\"<1 AND \"games\"=6 AND \"losses\"=6 AND \"season\">1941;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cfl_teams_with_one_or_no_wins_in_a_seaso\" (\n \"season\" real,\n \"team\" text,\n \"games\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"cfl_teams_with_one_or_no_wins_in_a_seaso\" WHERE \"team\"='winnipeg blue bombers' AND \"season\">1964;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What engine class is associated with a year after 1985 and over 0 wins?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"motorcycle_grand_prix_results\" WHERE \"year\">1985 AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Which opponent has a loss of trout (7-4)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='trout (7-4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Which opponent has a save of smith (22)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"save\"='smith (22)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Gold has a Bronze larger than 1, and a Silver larger than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Nation of japan (jpn), and a Silver smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"nation\"='japan (jpn)' AND \"silver\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the margin of victory in WGC-Accenture Match Play Championship?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_13\" WHERE \"tournament\"='wgc-accenture match play championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what date was Nick Price the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_13\" WHERE \"runner_s_up\"='nick price';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the margin of victory for Nick Price as a runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_13\" WHERE \"runner_s_up\"='nick price';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the margin of victory for PGA Championship?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_13\" WHERE \"tournament\"='pga championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_13\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On what date was the winning score \u201320 (68-67-65-64=264)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_13\" WHERE \"winning_score\"='\u201320 (68-67-65-64=264)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which player was D past Round 3?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"position\"='d' AND \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which Round was F picked?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"position\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What Position is Ryan Russell?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='ryan russell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What country does Round 4 come from?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which opponent was present on April 14?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"date\"='april 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: what team lost on april 15"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='april 15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: what team played on april 21"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: what team scored on april 10"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_card\" (\n \"weight_division\" text,\n \"winner\" text,\n \"loser\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: Who lost with a time of 0:58?"
},
{
"role": "assistant",
"content": "SELECT \"loser\" FROM \"preliminary_card\" WHERE \"time\"='0:58';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_card\" (\n \"weight_division\" text,\n \"winner\" text,\n \"loser\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What is the average number of rounds for winner Rafael Cavalcante?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"preliminary_card\" WHERE \"winner\"='rafael cavalcante';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_card\" (\n \"weight_division\" text,\n \"winner\" text,\n \"loser\" text,\n \"method\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What win method has a time of 2:32?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"preliminary_card\" WHERE \"time\"='2:32';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"double_double_bonus\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: If Four aces yields 800 for 5 credits, what would the result be for 1 Credit?"
},
{
"role": "assistant",
"content": "SELECT \"1_credit\" FROM \"double_double_bonus\" WHERE \"5_credits\"='800' AND \"hand\"='four aces';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of points values that are associated with 0 losses and more than 8 games?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"world_championship_group_c_denmark\" WHERE \"lost\"=0 AND \"games\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the fewest losses associated with more than 13 points and fewer than 8 games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"world_championship_group_c_denmark\" WHERE \"points\">13 AND \"games\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the difference associated with more than 2 points, fewer than 3 losses, and fewer than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT \"points_difference\" FROM \"world_championship_group_c_denmark\" WHERE \"points\">2 AND \"lost\"<3 AND \"drawn\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the fewest number of points associated with more than 8 games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"world_championship_group_c_denmark\" WHERE \"games\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1921_1930\" (\n \"title\" text,\n \"date\" text,\n \"theatre\" text,\n \"role\" text,\n \"dance_partner\" text,\n \"director\" text,\n \"lyrics\" text,\n \"music\" text\n);\n\nQuestion: Which title did richard kolner play?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1921_1930\" WHERE \"role\"='richard kolner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1921_1930\" (\n \"title\" text,\n \"date\" text,\n \"theatre\" text,\n \"role\" text,\n \"dance_partner\" text,\n \"director\" text,\n \"lyrics\" text,\n \"music\" text\n);\n\nQuestion: Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1921_1930\" WHERE \"dance_partner\"='adele astaire' AND \"lyrics\"='ira gershwin' AND \"director\"='felix edwardes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1921_1930\" (\n \"title\" text,\n \"date\" text,\n \"theatre\" text,\n \"role\" text,\n \"dance_partner\" text,\n \"director\" text,\n \"lyrics\" text,\n \"music\" text\n);\n\nQuestion: Which Role has a Theatre of globe, and a Music of jerome kern?"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"1921_1930\" WHERE \"theatre\"='globe' AND \"music\"='jerome kern';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposed\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"year_est\" text,\n \"city\" text\n);\n\nQuestion: what name was on the year 2012"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"proposed\" WHERE \"year_est\"='2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_lorraine_1765_1918\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Which member of house of Habsburg-Lorraine had the spouse Charles II?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"house_of_habsburg_lorraine_1765_1918\" WHERE \"spouse\"='charles ii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_lorraine_1765_1918\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the marriage date for the Habsburg-Lorraine house member who died 29 December 1829?"
},
{
"role": "assistant",
"content": "SELECT \"marriage\" FROM \"house_of_habsburg_lorraine_1765_1918\" WHERE \"death\"='29 december 1829';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_lorraine_1765_1918\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the duchess who became duchess on 7/8 April 1766 cease to be duchess?"
},
{
"role": "assistant",
"content": "SELECT \"ceased_to_be_duchess\" FROM \"house_of_habsburg_lorraine_1765_1918\" WHERE \"became_duchess\"='7/8 april 1766';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_lorraine_1765_1918\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the date of death of the duchess born on 30 October 1797?"
},
{
"role": "assistant",
"content": "SELECT \"death\" FROM \"house_of_habsburg_lorraine_1765_1918\" WHERE \"birth\"='30 october 1797';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_habsburg_lorraine_1765_1918\" (\n \"name\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: What is the birth date of the duchess who married on 1 May 1844?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_habsburg_lorraine_1765_1918\" WHERE \"marriage\"='1 may 1844';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nba_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the highest numbered pick from round 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"nba_draft\" WHERE \"round\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How much Played has an Against larger than 11, and a Team of botafogo, and a Position smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"against\">11 AND \"team\"='botafogo' AND \"position\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"torneio_rio_s_o_paulo\" WHERE \"points\"<14 AND \"lost\"<4 AND \"played\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Played is the lowest one that has a Team of vasco da gama, and an Against smaller than 11?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"team\"='vasco da gama' AND \"against\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Played has a Lost larger than 4, and a Team of am\u00e9rica, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"lost\">4 AND \"team\"='am\u00e9rica' AND \"points\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Lost has a Position of 3, and a Drawn larger than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"torneio_rio_s_o_paulo\" WHERE \"position\"=3 AND \"drawn\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How much Lost has a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"torneio_rio_s_o_paulo\" WHERE \"drawn\">1 AND \"points\"<14 AND \"against\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_2_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament has yvonne vermaak as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_6_2_titles_4_runners_up\" WHERE \"opponent\"='yvonne vermaak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_2_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What outcome has yvonne vermaak as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_6_2_titles_4_runners_up\" WHERE \"opponent\"='yvonne vermaak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_2_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the outcome for the Hershey tournament?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_6_2_titles_4_runners_up\" WHERE \"tournament\"='hershey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Who played against Save Of Ni Fu-Deh?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"save\"='ni fu-deh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: What's the loss of who has a Save of Miguel Saladin and played against Chinatrust Whales?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"regular_season\" WHERE \"opponent\"='chinatrust whales' AND \"save\"='miguel saladin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Who's the opponent when Diegomar Markwell is the loss?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"loss\"='diegomar markwell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: what game had a score of 86-71"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"record\"='86-71';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: what game took place on september 14"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: what game had an attendance of 21,629"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='21,629';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.