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 \"energy_efficient_e_series\" (\n \"model_number\" text,\n \"stepping\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"multi_1\" text,\n \"v_core\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: When was the release date for technology that has a Multi 1 of 10.5\u00d7?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"energy_efficient_e_series\" WHERE \"multi_1\"='10.5\u00d7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"energy_efficient_e_series\" (\n \"model_number\" text,\n \"stepping\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"multi_1\" text,\n \"v_core\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What's the stepping amount for adh4450iaa5do?"
},
{
"role": "assistant",
"content": "SELECT \"stepping\" FROM \"energy_efficient_e_series\" WHERE \"part_number_s\"='adh4450iaa5do';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart_career_results\" (\n \"year\" real,\n \"team\" text,\n \"wins\" real,\n \"points\" real,\n \"championship_finish\" text\n);\n\nQuestion: Which Wins is the highest one that has a Year larger than 1996, and a Championship Finish of 1st, and Points smaller than 168?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"cart_career_results\" WHERE \"year\">1996 AND \"championship_finish\"='1st' AND \"points\"<168;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart_career_results\" (\n \"year\" real,\n \"team\" text,\n \"wins\" real,\n \"points\" real,\n \"championship_finish\" text\n);\n\nQuestion: Which Year is the highest that has a Team of walker racing, and Wins larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"cart_career_results\" WHERE \"team\"='walker racing' AND \"wins\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart_career_results\" (\n \"year\" real,\n \"team\" text,\n \"wins\" real,\n \"points\" real,\n \"championship_finish\" text\n);\n\nQuestion: Which Points have a Year larger than 1998, and Wins of 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"cart_career_results\" WHERE \"year\">1998 AND \"wins\"=1;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest bronze number when silver shows 2, and the total is 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"=2 AND \"total\"=8;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the silver number when gold is more than 4, and the total is less than 24?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"gold\">4 AND \"total\"<24;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the gold number when the total is 8 and bronze is more than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\"=8 AND \"bronze\">4;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Total for 0 gold and less than 2, silver with a rank of 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"gold\"=0 AND \"silver\"<2 AND \"rank\"='6';"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Gold when silver is more than 2, and bronze is more than 1"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"silver\">2 AND \"bronze\">1;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Bronze when silver is more than 2, and rank is 2, and gold more than 2"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\">2 AND \"rank\"='2' AND \"gold\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities_by_latitude\" (\n \"latitude\" text,\n \"longitude\" text,\n \"city\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: What city in Svalbard has a longitude of 15\u00b039\u2032e?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"list_of_cities_by_latitude\" WHERE \"state\"='svalbard' AND \"longitude\"='15\u00b039\u2032e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities_by_latitude\" (\n \"latitude\" text,\n \"longitude\" text,\n \"city\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: If the latitude is 77\u00b028\u2032n, what is the longitude?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"list_of_cities_by_latitude\" WHERE \"latitude\"='77\u00b028\u2032n';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities_by_latitude\" (\n \"latitude\" text,\n \"longitude\" text,\n \"city\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: If the latitude is 76\u00b025\u2032n, what is the longitude?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"list_of_cities_by_latitude\" WHERE \"latitude\"='76\u00b025\u2032n';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities_by_latitude\" (\n \"latitude\" text,\n \"longitude\" text,\n \"city\" text,\n \"state\" text,\n \"country\" text\n);\n\nQuestion: If the latitude is 71\u00b018\u2032n, what is the longitude?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"list_of_cities_by_latitude\" WHERE \"latitude\"='71\u00b018\u2032n';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who is the partner facing the opponents florian Mayer & alexander waske in the final?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_titles_5\" WHERE \"opponents_in_the_final\"='florian mayer & alexander waske';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament has a hard surface and final opponents rohan bopanna & mustafa ghouse?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_titles_5\" WHERE \"surface\"='hard' AND \"opponents_in_the_final\"='rohan bopanna & mustafa ghouse';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On which date did the tournament final with the clay surface take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_titles_5\" WHERE \"surface\"='clay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament features the partner julian knowle?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_titles_5\" WHERE \"partner\"='julian knowle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On which date is the tournament final with the opponents michael berrer & kenneth carlsen?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_titles_5\" WHERE \"opponents_in_the_final\"='michael berrer & kenneth carlsen';"
}
] |
[
{
"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 \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the score after february 4 in the game 61?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"february\">4 AND \"game\"=61;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Arkansas State's total pick number with an overal lower than 242?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='arkansas state' AND \"overall\"<242;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is from the College of Cincinnati?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='cincinnati';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall number for a kicker with a pick of less than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='kicker' AND \"pick_num\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has a defensive end with a round less than 6?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\">6 AND \"position\"='defensive end';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What record has a score of 111-96?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='111-96';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What is the score for a game after 34 with a record of 31-11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\">34 AND \"record\"='31-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: What was the date with a resulted score of 130-100?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='130-100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which Water has a Metal of contracting?"
},
{
"role": "assistant",
"content": "SELECT \"water\" FROM \"theory_of_the_five_elements\" WHERE \"metal\"='contracting';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which Metal has an Element of heavenly stems?"
},
{
"role": "assistant",
"content": "SELECT \"metal\" FROM \"theory_of_the_five_elements\" WHERE \"element\"='heavenly stems';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which water has green wood?"
},
{
"role": "assistant",
"content": "SELECT \"water\" FROM \"theory_of_the_five_elements\" WHERE \"wood\"='green';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which earth has west metal?"
},
{
"role": "assistant",
"content": "SELECT \"earth\" FROM \"theory_of_the_five_elements\" WHERE \"metal\"='west';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which wood has stabilizing earth?"
},
{
"role": "assistant",
"content": "SELECT \"wood\" FROM \"theory_of_the_five_elements\" WHERE \"earth\"='stabilizing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theory_of_the_five_elements\" (\n \"element\" text,\n \"wood\" text,\n \"fire\" text,\n \"earth\" text,\n \"metal\" text,\n \"water\" text\n);\n\nQuestion: Which fire has dry metal?"
},
{
"role": "assistant",
"content": "SELECT \"fire\" FROM \"theory_of_the_five_elements\" WHERE \"metal\"='dry';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commandants_list\" (\n \"rank\" text,\n \"name\" text,\n \"begin_date\" text,\n \"end_date\" text,\n \"notes\" text\n);\n\nQuestion: what name has a Rank of lieutenant colonel, and a Begin Date of 1904-02-22 22 february 1904?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"commandants_list\" WHERE \"rank\"='lieutenant colonel' AND \"begin_date\"='1904-02-22 22 february 1904';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Oklahoma State produced a player in which position in the draft?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"school_club_team\"='oklahoma state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the highest round where a back named Ed Cody can be found?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"position\"='back' AND \"player\"='ed cody';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: Which Losses is the lowest one that has a Season smaller than 1920, and Draws larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"australia\" WHERE \"season\"<1920 AND \"draws\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: Which Draws have Losses larger than 16, and a Season larger than 1966?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"australia\" WHERE \"losses\">16 AND \"season\">1966;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: Which Draws have a Team of annandale, and Losses smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"australia\" WHERE \"team\"='annandale' AND \"losses\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: Which Draws have Losses smaller than 16, and a Team of university, and Wins larger than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"australia\" WHERE \"losses\"<16 AND \"team\"='university' AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: Which Wins is the lowest one that has a Season smaller than 1920, and Losses smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"australia\" WHERE \"season\"<1920 AND \"losses\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which date had a sport of Academics?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2011_2012\" WHERE \"sport\"='academics';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_2012\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which date had a site of N/A?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2011_2012\" WHERE \"site\"='n/a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_withdrawn_from_service\" (\n \"name_or_designation\" text,\n \"wheel_arrangement\" text,\n \"builder\" text,\n \"year_built\" text,\n \"year_withdrawn\" text\n);\n\nQuestion: what was the builder in 1929"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives_withdrawn_from_service\" WHERE \"year_built\"='1929';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the attendance for the March 6 game, where one of the teams had 53 points."
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"points\"=53 AND \"date\"='march 6';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: For the game with 6,126 in attendance, how many points did both teams have in the standings?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"game_log\" WHERE \"attendance\"='6,126';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the team with a St. Louis home?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"home\"='st. louis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"territorial_and_overseas_regions_recordh\" (\n \"country\" text,\n \"territory\" text,\n \"name\" text,\n \"birth_date\" text,\n \"death_date\" text\n);\n\nQuestion: What country has a territory of French Guiana?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"territorial_and_overseas_regions_recordh\" WHERE \"territory\"='french guiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2008-12 has a 2013 of A, and a Tournament of wimbledon?"
},
{
"role": "assistant",
"content": "SELECT \"2008_12\" FROM \"doubles_performance_timeline\" WHERE \"2013\"='a' AND \"tournament\"='wimbledon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2013 has a 2007 of A, and a Tournament of french open?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='a' AND \"tournament\"='french open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2013 has a 2008-12 of A, and a 2007 of A, and a Tournament of us open?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2008_12\"='a' AND \"2007\"='a' AND \"tournament\"='us open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2013 has a 2006 of grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='grand slam tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2006 has a 2007 of A?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008_12\" text,\n \"2013\" text\n);\n\nQuestion: Which 2008-12 has a 2007 of A, and a Tournament of us open?"
},
{
"role": "assistant",
"content": "SELECT \"2008_12\" FROM \"doubles_performance_timeline\" WHERE \"2007\"='a' AND \"tournament\"='us open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on April 1?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"april\" WHERE \"date\"='april 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What's the score on April 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"april\" WHERE \"date\"='april 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Where was home on April 3?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"april\" WHERE \"date\"='april 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What's the score on April 9?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"april\" WHERE \"date\"='april 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average number of points of the team with more than 18 played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"torneo_clausura\" WHERE \"played\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest score of the team with 19 points and less than 18 played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"scored\") FROM \"torneo_clausura\" WHERE \"points\"=19 AND \"played\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average number of draws of the team with less than 17 points and less than 4 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"torneo_clausura\" WHERE \"points\"<17 AND \"wins\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"catalogue\" (\n \"artist\" text,\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"cat_num\" text\n);\n\nQuestion: What is the title of the record with an artist of Tangorodrim, category number FSR006?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"catalogue\" WHERE \"artist\"='tangorodrim' AND \"cat_num\"='fsr006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"catalogue\" (\n \"artist\" text,\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"cat_num\" text\n);\n\nQuestion: What was the format of the release by Triumfall?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"catalogue\" WHERE \"artist\"='triumfall';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"catalogue\" (\n \"artist\" text,\n \"title\" text,\n \"release_date\" text,\n \"format\" text,\n \"cat_num\" text\n);\n\nQuestion: What is the category number that was released in November 2007?"
},
{
"role": "assistant",
"content": "SELECT \"cat_num\" FROM \"catalogue\" WHERE \"release_date\"='november 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which is the lowest round to have a pick of 12 and position of linebacker?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=12 AND \"position\"='linebacker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player was picked in round 15 with a pick smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"<13 AND \"round\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many picks were from Lamar College?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='lamar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many overall values have a college of Notre Dame and rounds over 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='notre dame' AND \"round\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"rank\" text,\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What player was at Albion?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"highest_individual_scores\" WHERE \"venue\"='albion';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"rank\" text,\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where was the venue that had 274 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_scores\" WHERE \"runs\"='274';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"rank\" text,\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: which athlete played against Queensland?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"highest_individual_scores\" WHERE \"opponent\"='queensland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"rank\" text,\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where is the venue with more than 245 runs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_scores\" WHERE \"runs\"='245';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"rank\" text,\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where did Jack Badcock play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_scores\" WHERE \"player\"='jack badcock';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a Date of 16 november 2007?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_13_6_7\" WHERE \"date\"='16 november 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the date for 2004 afc asian cup qualifier"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2004 afc asian cup qualifier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the venue for 23 january 2009"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='23 january 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the competition for khartoum"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='khartoum';"
}
] |
[
{
"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_slovenia\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the fewest ties the team had with fewer than 7 games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"world_championship_group_c_slovenia\" WHERE \"games\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"counties\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the population for a county that has a median income of $69,760?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"counties\" WHERE \"median_household_income\"='$69,760';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"counties\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What county has $51,456 income per capita?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"counties\" WHERE \"per_capita_income\"='$51,456';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent when attendance was 60,355?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='60,355';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"financial_performance\" (\n \"year_ended\" text,\n \"passengers_flown\" real,\n \"employees_average_year\" real,\n \"net_profit_loss_sek\" real,\n \"basic_eps_sek\" real\n);\n\nQuestion: Which Net profit/loss (SEK) has a Basic eps (SEK) of -6.58, and Employees (Average/Year) larger than 31,035?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"net_profit_loss_sek\") FROM \"financial_performance\" WHERE \"basic_eps_sek\"=-6.58 AND \"employees_average_year\">'31,035';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"financial_performance\" (\n \"year_ended\" text,\n \"passengers_flown\" real,\n \"employees_average_year\" real,\n \"net_profit_loss_sek\" real,\n \"basic_eps_sek\" real\n);\n\nQuestion: Which Passengers flown has a Net profit/loss (SEK) smaller than -6,360,000,000, and Employees (Average/Year) smaller than 34,544, and a Basic eps (SEK) of -18.2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"passengers_flown\") FROM \"financial_performance\" WHERE \"net_profit_loss_sek\"<'-6,360,000,000' AND \"employees_average_year\"<'34,544' AND \"basic_eps_sek\"=-18.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"financial_performance\" (\n \"year_ended\" text,\n \"passengers_flown\" real,\n \"employees_average_year\" real,\n \"net_profit_loss_sek\" real,\n \"basic_eps_sek\" real\n);\n\nQuestion: Which average Net profit/loss (SEK) has Employees (Average/Year) larger than 18,786, and a Year ended of 2000*, and Passengers flown larger than 23,240,000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"net_profit_loss_sek\") FROM \"financial_performance\" WHERE \"employees_average_year\">'18,786' AND \"year_ended\"='2000*' AND \"passengers_flown\">'23,240,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"financial_performance\" (\n \"year_ended\" text,\n \"passengers_flown\" real,\n \"employees_average_year\" real,\n \"net_profit_loss_sek\" real,\n \"basic_eps_sek\" real\n);\n\nQuestion: How many Employees (Average/Year) have a Net profit/loss (SEK) larger than 4,936,000,000, and a Basic eps (SEK) larger than 1.06?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"employees_average_year\") FROM \"financial_performance\" WHERE \"net_profit_loss_sek\">'4,936,000,000' AND \"basic_eps_sek\">1.06;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result when 13 is the week?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What average week has shea stadium as the game site, and 1979-12-09 as the date?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"game_site\"='shea stadium' AND \"date\"='1979-12-09';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the most rank for the United States with wins less than 1"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"country\"='united states' AND \"wins\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the most rank for wins more than 0 and events of 26"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"events\"=26 AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the average earnings for rank of 3 and wins less than 3"
},
{
"role": "assistant",
"content": "SELECT AVG(\"earnings\") FROM \"leaders\" WHERE \"rank\"=3 AND \"wins\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"rank\" text,\n \"city\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_inhabitants_km_2\" real,\n \"altitude_mslm\" real\n);\n\nQuestion: What is the average area of the city that has a density less than than 206.2 and an altitude of less than 85?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_km_2\") FROM \"communes\" WHERE \"density_inhabitants_km_2\"<206.2 AND \"altitude_mslm\"<85;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"rank\" text,\n \"city\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_inhabitants_km_2\" real,\n \"altitude_mslm\" real\n);\n\nQuestion: What is the lowest density of alessandria where the area is bigger than 16.02 and altitude is less than 116?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"density_inhabitants_km_2\") FROM \"communes\" WHERE \"area_km_2\">16.02 AND \"altitude_mslm\"<116 AND \"city\"='alessandria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"rank\" text,\n \"city\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_inhabitants_km_2\" real,\n \"altitude_mslm\" real\n);\n\nQuestion: What is the lowest density of serravalle scrivia?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"density_inhabitants_km_2\") FROM \"communes\" WHERE \"city\"='serravalle scrivia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communes\" (\n \"rank\" text,\n \"city\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_inhabitants_km_2\" real,\n \"altitude_mslm\" real\n);\n\nQuestion: What is the lowest population of alessandria where the altitude is less than 197 and density is less than 461.8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population\") FROM \"communes\" WHERE \"altitude_mslm\"<197 AND \"city\"='alessandria' AND \"density_inhabitants_km_2\"<461.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overlap_between_multiple_social_network_\" (\n \"site\" text,\n \"bebo\" real,\n \"facebook\" real,\n \"friendster\" real,\n \"linked_in\" real,\n \"my_space\" real,\n \"ning\" real,\n \"orkut\" real,\n \"plaxo\" real\n);\n\nQuestion: What myspace has linkedin as the site, with an orkit greater than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"my_space\") FROM \"overlap_between_multiple_social_network_\" WHERE \"site\"='linkedin' AND \"orkut\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overlap_between_multiple_social_network_\" (\n \"site\" text,\n \"bebo\" real,\n \"facebook\" real,\n \"friendster\" real,\n \"linked_in\" real,\n \"my_space\" real,\n \"ning\" real,\n \"orkut\" real,\n \"plaxo\" real\n);\n\nQuestion: How many linkedin have Facebook as the site, with a myspace less than 64?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"linked_in\") FROM \"overlap_between_multiple_social_network_\" WHERE \"site\"='facebook' AND \"my_space\"<64;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overlap_between_multiple_social_network_\" (\n \"site\" text,\n \"bebo\" real,\n \"facebook\" real,\n \"friendster\" real,\n \"linked_in\" real,\n \"my_space\" real,\n \"ning\" real,\n \"orkut\" real,\n \"plaxo\" real\n);\n\nQuestion: What is the highest Ning that has a bebo less than 4, an orkut less than 100, with a plaxo greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ning\") FROM \"overlap_between_multiple_social_network_\" WHERE \"bebo\"<4 AND \"orkut\"<100 AND \"plaxo\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overlap_between_multiple_social_network_\" (\n \"site\" text,\n \"bebo\" real,\n \"facebook\" real,\n \"friendster\" real,\n \"linked_in\" real,\n \"my_space\" real,\n \"ning\" real,\n \"orkut\" real,\n \"plaxo\" real\n);\n\nQuestion: What is the average plaxo that has a myspace greater than 64, a bebo greater than 3, with 4 as the friendster?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"plaxo\") FROM \"overlap_between_multiple_social_network_\" WHERE \"my_space\">64 AND \"bebo\">3 AND \"friendster\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"title\" text,\n \"label\" text,\n \"format\" text,\n \"album\" text\n);\n\nQuestion: What album has the title I Need A Life with the label of warp records / paper bag records?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"label\"='warp records / paper bag records' AND \"title\"='i need a life';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.