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 \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: Which years have a displacement of 1816cc?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"engines\" WHERE \"displacement\"='1816cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: How much power does the fuel injection system have with a displacement of 1991cc?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"engines\" WHERE \"fuel_system\"='fuel injection' AND \"displacement\"='1991cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: Which fuel system has a displacement of 1490cc?"
},
{
"role": "assistant",
"content": "SELECT \"fuel_system\" FROM \"engines\" WHERE \"displacement\"='1490cc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: Which fuel system has a displacement of 1500cc for the Berlina model?"
},
{
"role": "assistant",
"content": "SELECT \"fuel_system\" FROM \"engines\" WHERE \"displacement\"='1500cc' AND \"model\"='berlina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the lowest Industry, when Year is greater than 2005, and when Agriculture is greater than 11?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"industry\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"year\">2005 AND \"agriculture\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the average Industry, when Agriculture is greater than 11?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"industry\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"agriculture\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the average Services, when Year is greater than 2003, when Industry is greater than 1,465, and when Regional GVA is greater than 9,432?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"services\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"year\">2003 AND \"industry\">'1,465' AND \"regional_gva\">'9,432';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the sum of Agriculture, when Regional GVA is greater than 6,584, when Services is greater than 7,502, and when Industry is greater than 1,565?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"agriculture\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"regional_gva\">'6,584' AND \"services\">'7,502' AND \"industry\">'1,565';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the sum of Year, when Regional GVA is 6,584, and when Services is less than 5,277?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"regional_gva\"='6,584' AND \"services\"<'5,277';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trend_of_regional_gross_value_added_of_c\" (\n \"year\" real,\n \"regional_gva\" real,\n \"agriculture\" real,\n \"industry\" real,\n \"services\" real\n);\n\nQuestion: What is the highest Regional GVA, when Year is greater than 2000, when Services is 7,502, and when Agriculture is greater than 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"regional_gva\") FROM \"trend_of_regional_gross_value_added_of_c\" WHERE \"year\">2000 AND \"services\"='7,502' AND \"agriculture\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladder\" (\n \"team\" text,\n \"lost\" real,\n \"last_5\" text,\n \"streak\" text,\n \"home\" text,\n \"away\" text,\n \"pct_pts\" real,\n \"pct_won\" real\n);\n\nQuestion: When the points scored was over 110.25%, what's the average amount lost?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"ladder\" WHERE \"pct_pts\">110.25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladder\" (\n \"team\" text,\n \"lost\" real,\n \"last_5\" text,\n \"streak\" text,\n \"home\" text,\n \"away\" text,\n \"pct_pts\" real,\n \"pct_won\" real\n);\n\nQuestion: If the points scored were 93.45%, what's the lowest amount of games lost?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"ladder\" WHERE \"pct_pts\"=93.45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What is the rank of the film directed by Kevin Costner?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"highest_grossing_films\" WHERE \"director\"='kevin costner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What director grossed $200,512,643"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"highest_grossing_films\" WHERE \"gross\"='$200,512,643';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What is the average rank of the movie from Paramount Studios that grossed $200,512,643?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"highest_grossing_films\" WHERE \"studio\"='paramount' AND \"gross\"='$200,512,643';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: Who directed Teenage Mutant Ninja Turtles?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"highest_grossing_films\" WHERE \"title\"='teenage mutant ninja turtles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What director ranked higher than 1 from Universal Studios and grossed $201,957,688?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"highest_grossing_films\" WHERE \"rank\">1 AND \"studio\"='universal' AND \"gross\"='$201,957,688';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: When the rider is Garry Mccoy and the manufacturer was Kawasaki, what was the time retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"manufacturer\"='kawasaki' AND \"rider\"='garry mccoy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the highest amount of laps Garry Mccoy drove?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='garry mccoy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: If the manufacturer is Proton Kr and the grid was over 10, what was the time retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"grid\">10 AND \"manufacturer\"='proton kr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time\" (\n \"continent\" text,\n \"structure\" text,\n \"height\" text,\n \"year\" real,\n \"country\" text\n);\n\nQuestion: The year 1974 has what listed as the Height?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"all_time\" WHERE \"year\"=1974;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time\" (\n \"continent\" text,\n \"structure\" text,\n \"height\" text,\n \"year\" real,\n \"country\" text\n);\n\nQuestion: The OMEGA transmitter Chabrier has what country listed?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"all_time\" WHERE \"structure\"='omega transmitter chabrier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time\" (\n \"continent\" text,\n \"structure\" text,\n \"height\" text,\n \"year\" real,\n \"country\" text\n);\n\nQuestion: Listed with a continent of Africa and before 2009 this structure is called what?"
},
{
"role": "assistant",
"content": "SELECT \"structure\" FROM \"all_time\" WHERE \"year\"<2009 AND \"continent\"='africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time\" (\n \"continent\" text,\n \"structure\" text,\n \"height\" text,\n \"year\" real,\n \"country\" text\n);\n\nQuestion: The year 1972 has what written in Height column?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"all_time\" WHERE \"year\"=1972;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time\" (\n \"continent\" text,\n \"structure\" text,\n \"height\" text,\n \"year\" real,\n \"country\" text\n);\n\nQuestion: What is the Continent that also has the United States listed as a country?"
},
{
"role": "assistant",
"content": "SELECT \"continent\" FROM \"all_time\" WHERE \"country\"='united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the highest number of ends won of 47 Ends Lost and a Shot % less than 73?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ends_won\") FROM \"standings\" WHERE \"ends_lost\"=47 AND \"shot_pct\"<73;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What Poll was on April 14 of 13?"
},
{
"role": "assistant",
"content": "SELECT \"poll\" FROM \"ranking_movement\" WHERE \"april_14\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What is the rank for Mar 17 when the April 21 rank is 10?"
},
{
"role": "assistant",
"content": "SELECT \"mar_17\" FROM \"ranking_movement\" WHERE \"april_21\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What is the Mar 24 rank when the May 26 is 13, and the May 12 is 6?"
},
{
"role": "assistant",
"content": "SELECT \"mar_24\" FROM \"ranking_movement\" WHERE \"may_26\"='13' AND \"may_12\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What is the April 28 rank when the Mar 24 is 17?"
},
{
"role": "assistant",
"content": "SELECT \"april_28\" FROM \"ranking_movement\" WHERE \"mar_24\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What is the April 14 rank when the Mar 3rd is nr, and the April 21 is 13?"
},
{
"role": "assistant",
"content": "SELECT \"april_14\" FROM \"ranking_movement\" WHERE \"mar_3\"='nr' AND \"april_21\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"pre_season\" text,\n \"mar_3\" text,\n \"mar_17\" text,\n \"mar_24\" text,\n \"mar_31\" text,\n \"april_7\" text,\n \"april_14\" text,\n \"april_21\" text,\n \"april_28\" text,\n \"may_5\" text,\n \"may_12\" text,\n \"may_19\" text,\n \"may_26\" text,\n \"final\" text\n);\n\nQuestion: What is the April 28th rank when the Final is 20, and Mar 17 is 22?"
},
{
"role": "assistant",
"content": "SELECT \"april_28\" FROM \"ranking_movement\" WHERE \"final\"='20' AND \"mar_17\"='22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"position\" text\n);\n\nQuestion: What is the total number of Podiums, when Position is \"2nd\", when Wins is less than 6, and when Poles is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"podiums\") FROM \"career_summary\" WHERE \"position\"='2nd' AND \"wins\"<6 AND \"poles\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"position\" text\n);\n\nQuestion: What is the sum of Poles, when Season is greater than 2004, and when Podiums is less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"poles\") FROM \"career_summary\" WHERE \"season\"<2004 AND \"podiums\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"position\" text\n);\n\nQuestion: What is the average Poles, when Wins is 0, when Position is \"nc\", and when Season is before 2004?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"poles\") FROM \"career_summary\" WHERE \"wins\"=0 AND \"position\"='nc' AND \"season\"<2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"wins\" real,\n \"poles\" real,\n \"podiums\" real,\n \"position\" text\n);\n\nQuestion: What is the sum of Poles, when Season is before 2005, when Position is \"2nd\", and when Wins is less than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"poles\") FROM \"career_summary\" WHERE \"season\"<2005 AND \"position\"='2nd' AND \"wins\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the 2012 club of the cf pos. player?"
},
{
"role": "assistant",
"content": "SELECT \"2012_club\" FROM \"current\" WHERE \"pos\"='cf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"years_in_the_acc\" text,\n \"school_type\" text,\n \"enrollment\" real\n);\n\nQuestion: What are the years in the ACC of an institution that was founded before 1885 and is located in College Park, Maryland?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_the_acc\" FROM \"members\" WHERE \"founded\"<1885 AND \"location\"='college park, maryland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_35_20_15\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the partner for the tournament in Lyon, France?"
},
{
"role": "assistant",
"content": "SELECT \"partnering\" FROM \"doubles_35_20_15\" WHERE \"tournament\"='lyon, france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_35_20_15\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who were the opponents for the event in Milan, Italy?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"doubles_35_20_15\" WHERE \"tournament\"='milan, italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the record on the date of december 1, 1968?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='december 1, 1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the record on the date of september 15, 1968?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='september 15, 1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the record on the date of november 10, 1968?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='november 10, 1968';"
}
] |
[
{
"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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the first game played on February 28?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"date\"='february 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_average_1\" real,\n \"points_2\" real\n);\n\nQuestion: What is the sum of Altrincham's Points 2 when they had more than 52 Goals For?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points_2\") FROM \"final_table\" WHERE \"goals_for\">52 AND \"team\"='altrincham';"
}
] |
[
{
"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: What date was the team @ Detroit?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='@ detroit';"
}
] |
[
{
"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: What was the score of the game when Maurice Williams (7) had the high assists?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"high_assists\"='maurice williams (7)';"
}
] |
[
{
"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: What was the record of the game when Lebron James (4) had the high assists?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"high_assists\"='lebron james (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 \"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: What is the total of the game that the team was @ new york?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"team\"='@ new york';"
}
] |
[
{
"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 \"college\" text\n);\n\nQuestion: Which round was Joe Taylor selected in?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"nba_draft\" WHERE \"player\"='joe taylor';"
}
] |
[
{
"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 \"college\" text\n);\n\nQuestion: Which player went to Wake Forest and was selected with a pick after 145?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nba_draft\" WHERE \"pick\">145 AND \"college\"='wake forest';"
}
] |
[
{
"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 \"college\" text\n);\n\nQuestion: How many picks were from round 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nba_draft\" WHERE \"round\"=6;"
}
] |
[
{
"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 \"college\" text\n);\n\nQuestion: What is the largest round of a pick smaller than 92 from Toledo University?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nba_draft\" WHERE \"college\"='toledo' AND \"pick\"<92;"
}
] |
[
{
"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 \"college\" text\n);\n\nQuestion: Which nationality is Dick Walker?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"nba_draft\" WHERE \"player\"='dick walker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college has a pick greater than 4 and an overall of 21?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"washington_redskins_draft_history\" WHERE \"pick\">4 AND \"overall\"=21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall sum of round 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player with a round less than 8 and an overall of 48?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"round\"<8 AND \"overall\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player from the college of North Carolina with an overall less than 100?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"overall\"<100 AND \"college\"='north carolina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of the pick in round 17?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg when team 2 was nov milenium?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"team_2\"='nov milenium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg for a team 1 of Teteks?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"second_round\" WHERE \"team_1\"='teteks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_between_100_000_and_1_000_000_pop\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real\n);\n\nQuestion: What is the sum of Date of Official Foundation of Municipality, when Province is \"Kerm\u0101n\", when 2006 us \"167014\", and when Rank is less than 46?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"date_of_official_foundation_of_municipality\") FROM \"cities_between_100_000_and_1_000_000_pop\" WHERE \"province\"='kerm\u0101n' AND \"2006\"=167014 AND \"rank\"<46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_between_100_000_and_1_000_000_pop\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real\n);\n\nQuestion: What is the total number of Rank, when Date of Official Foundation of Municipality is after 1926, when Province is \"Sistan and Baluchestan\", and when 2006 is greater than 567449?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"cities_between_100_000_and_1_000_000_pop\" WHERE \"date_of_official_foundation_of_municipality\">1926 AND \"province\"='sistan and baluchestan' AND \"2006\">567449;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_between_100_000_and_1_000_000_pop\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real\n);\n\nQuestion: What is the sum of Rank, when Province is G\u012bl\u0101n, when Date of Official Foundation of Municipality is after 1922, and when 2006 is greater than 557366?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"cities_between_100_000_and_1_000_000_pop\" WHERE \"province\"='g\u012bl\u0101n' AND \"date_of_official_foundation_of_municipality\">1922 AND \"2006\">557366;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_between_100_000_and_1_000_000_pop\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real\n);\n\nQuestion: What is the highest Rank, when Date of Official Foundation of Municipality is \"1952\", and when 2006 is less than 189120?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"cities_between_100_000_and_1_000_000_pop\" WHERE \"date_of_official_foundation_of_municipality\"=1952 AND \"2006\"<189120;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_between_100_000_and_1_000_000_pop\" (\n \"rank\" real,\n \"city\" text,\n \"province\" text,\n \"date_of_official_foundation_of_municipality\" real,\n \"2006\" real\n);\n\nQuestion: What is Province, when 2006 is less than 153748, when Date of Official Foundation of Municipality is after 1958, and when City is \"Pakdasht\"?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"cities_between_100_000_and_1_000_000_pop\" WHERE \"2006\"<153748 AND \"date_of_official_foundation_of_municipality\">1958 AND \"city\"='pakdasht';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the place when the score is 68-70-68=206?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='68-70-68=206';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the country when the score is 71-65-69=205?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='71-65-69=205';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the country when the score is 72-68-67=207?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='72-68-67=207';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the country when the score is 68-72-67=207?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='68-72-67=207';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: who is the player when the place is t5 and the score is 69-66-71=206?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"place\"='t5' AND \"score\"='69-66-71=206';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"pos\" text,\n \"class\" text,\n \"entrant\" text,\n \"drivers\" text,\n \"laps\" real\n);\n\nQuestion: What was the highest amount of laps when the class was v8 and the entrant was diet-coke racing?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"results\" WHERE \"class\"='v8' AND \"entrant\"='diet-coke racing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What is the tie with a win of 0?"
},
{
"role": "assistant",
"content": "SELECT \"ties\" FROM \"senior_team_season_records\" WHERE \"wins\"='0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What is the final position with ties of 0, and wins of 5?"
},
{
"role": "assistant",
"content": "SELECT \"final_position\" FROM \"senior_team_season_records\" WHERE \"ties\"='0' AND \"wins\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What are the ties for division of bafl division two south?"
},
{
"role": "assistant",
"content": "SELECT \"ties\" FROM \"senior_team_season_records\" WHERE \"division\"='bafl division two south';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What is the final position for the season 2008?"
},
{
"role": "assistant",
"content": "SELECT \"final_position\" FROM \"senior_team_season_records\" WHERE \"season\"='2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What is the final position for the season 2012?"
},
{
"role": "assistant",
"content": "SELECT \"final_position\" FROM \"senior_team_season_records\" WHERE \"season\"='2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_team_season_records\" (\n \"season\" text,\n \"division\" text,\n \"wins\" text,\n \"ties\" text,\n \"final_position\" text\n);\n\nQuestion: What is the division with wins of 2?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"senior_team_season_records\" WHERE \"wins\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text\n);\n\nQuestion: What is the Location of the Hietalahti Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"overview\" WHERE \"stadium\"='hietalahti stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text\n);\n\nQuestion: What is the Location of the Tapiolan Urheilupuisto Stadium with a Capacity or more than 15,000?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"overview\" WHERE \"capacity\">'15,000' AND \"stadium\"='tapiolan urheilupuisto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"club\" text,\n \"location\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"manager\" text\n);\n\nQuestion: What is the Location of the Stadium where Job Dragtsma is Manager?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"overview\" WHERE \"manager\"='job dragtsma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: what is the react when the lane is 3 and heat is 2?"
},
{
"role": "assistant",
"content": "SELECT \"react\" FROM \"semifinals\" WHERE \"lane\"=3 AND \"heat\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: what is the highest lane number for johan wissman when the react is less than 0.242?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"semifinals\" WHERE \"name\"='johan wissman' AND \"react\"<0.242;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: what is the heat when the country is united kingdom and react is less than 0.232?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"heat\") FROM \"semifinals\" WHERE \"country\"='united kingdom' AND \"react\"<0.232;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: what is the react when the country is sweden and the lane is higher than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"react\") FROM \"semifinals\" WHERE \"country\"='sweden' AND \"lane\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg of the UEFA Champions League Compeition in the Skonto Riga Club?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"european_record\" WHERE \"competition\"='uefa champions league' AND \"club\"='skonto riga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which season has the Renova Club?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"european_record\" WHERE \"club\"='renova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which season has the Werder Bremen Club and is in Round 2r?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"european_record\" WHERE \"club\"='werder bremen' AND \"round\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which round is the UEFA Cup Compeition and the Kolkheti-1913 Poti Cub?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"european_record\" WHERE \"competition\"='uefa cup' AND \"club\"='kolkheti-1913 poti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"color_standards\" (\n \"ntsc_m\" text,\n \"pal_b_g_h\" text,\n \"pal_i\" text,\n \"pal_n\" text,\n \"pal_m\" text\n);\n\nQuestion: What is the PAL B, G, H for the PAL I 4.43361875mhz?"
},
{
"role": "assistant",
"content": "SELECT \"pal_b_g_h\" FROM \"color_standards\" WHERE \"pal_i\"='4.43361875mhz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"color_standards\" (\n \"ntsc_m\" text,\n \"pal_b_g_h\" text,\n \"pal_i\" text,\n \"pal_n\" text,\n \"pal_m\" text\n);\n\nQuestion: Which PAL has a PAL B, G, H of 4.43361875mhz?"
},
{
"role": "assistant",
"content": "SELECT \"pal_n\" FROM \"color_standards\" WHERE \"pal_b_g_h\"='4.43361875mhz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"color_standards\" (\n \"ntsc_m\" text,\n \"pal_b_g_h\" text,\n \"pal_i\" text,\n \"pal_n\" text,\n \"pal_m\" text\n);\n\nQuestion: Which PAL M has a PAL I of 50HZ?"
},
{
"role": "assistant",
"content": "SELECT \"pal_m\" FROM \"color_standards\" WHERE \"pal_i\"='50hz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"color_standards\" (\n \"ntsc_m\" text,\n \"pal_b_g_h\" text,\n \"pal_i\" text,\n \"pal_n\" text,\n \"pal_m\" text\n);\n\nQuestion: What is the NTSC M for Pal M 525/60?"
},
{
"role": "assistant",
"content": "SELECT \"ntsc_m\" FROM \"color_standards\" WHERE \"pal_m\"='525/60';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"color_standards\" (\n \"ntsc_m\" text,\n \"pal_b_g_h\" text,\n \"pal_i\" text,\n \"pal_n\" text,\n \"pal_m\" text\n);\n\nQuestion: What is the PAL M for the NTSC M 4.5mhz?"
},
{
"role": "assistant",
"content": "SELECT \"pal_m\" FROM \"color_standards\" WHERE \"ntsc_m\"='4.5mhz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is the sum of Year, when Rank is less than 19?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"accolades\" WHERE \"rank\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is the sum of Year, when Publication is \"VH1\", and when Rank is greater than 11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"accolades\" WHERE \"publication\"='vh1' AND \"rank\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is Accolade, when Year is less than 2002, when Publication is \"Rolling Stone\", and when Rank is \"48\"?"
},
{
"role": "assistant",
"content": "SELECT \"accolade\" FROM \"accolades\" WHERE \"year\"<2002 AND \"publication\"='rolling stone' AND \"rank\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is the lowest Year, when Rank is greater than 85?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"accolades\" WHERE \"rank\">85;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is Accolade, when Country is \"United States\", and when Year is \"1999\"?"
},
{
"role": "assistant",
"content": "SELECT \"accolade\" FROM \"accolades\" WHERE \"country\"='united states' AND \"year\"=1999;"
}
] |
[
{
"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 \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is Pick, when Player is \"Dexter Bailey\"?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"draft_picks\" WHERE \"player\"='dexter bailey';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.