chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28146944_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"story_storyboards_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many different pairs of people did the story and storyboard of the episode titled \"Milo's big idea\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"story_storyboards_by\") FROM \"table1_28146944_2\" WHERE \"title\"='\\\"Milo''s Big Idea\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28146944_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"story_storyboards_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who directed the episode titled \"Baldwin the Super FIsh\"?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_28146944_2\" WHERE \"title\"='\\\"Baldwin the Super Fish\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28146944_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"story_storyboards_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the title of the episode with series number 36?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_28146944_2\" WHERE \"no_in_series\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_head_coach_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: when was the next coach appointed after niger tornadoes fired their coach?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"managerial_head_coach_changes\" WHERE \"manner_of_departure\"='fired' AND \"team\"='Niger Tornadoes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_head_coach_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: how many managers left sunshine stars?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"outgoing_manager\") FROM \"managerial_head_coach_changes\" WHERE \"team\"='Sunshine Stars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_head_coach_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: how many new managers replaced manager(s) who resigned? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"incoming_manager\") FROM \"managerial_head_coach_changes\" WHERE \"manner_of_departure\"='Resigned';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_head_coach_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"incoming_manager\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: how many times did tunde abdulrahman leave the team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date_of_vacancy\") FROM \"managerial_head_coach_changes\" WHERE \"outgoing_manager\"='Tunde Abdulrahman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: How many platforms have celsius calibur as mystic arte?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"platform\") FROM \"series_characters\" WHERE \"mystic_arte\"='Celsius Calibur';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: Which character is yumi kakazu the character voice?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"series_characters\" WHERE \"character_voice\"='Yumi Kakazu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: How many mystic arte have hisui (jadeite) hearts 1 as the character?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"mystic_arte\") FROM \"series_characters\" WHERE \"character\"='Hisui (Jadeite) Hearts 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: How many platforms have nanaly fletch as the character?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"platform\") FROM \"series_characters\" WHERE \"character\"='Nanaly Fletch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: What is the status of the character keel (keele) zeibel?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"series_characters\" WHERE \"character\"='Keel (Keele) Zeibel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_characters\" (\n \"character\" text,\n \"game\" text,\n \"platform\" text,\n \"status\" text,\n \"mystic_arte\" text,\n \"character_voice\" text\n);\n\nQuestion: Which character is mio yasuda the character voice?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"series_characters\" WHERE \"character_voice\"='Mio Yasuda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" real,\n \"won\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text,\n \"head_coaches\" text\n);\n\nQuestion: What sesaon(s) did they have 254 goals against?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"regular_season\" WHERE \"goals_against\"=254;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"season\" text,\n \"games\" real,\n \"won\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text,\n \"head_coaches\" text\n);\n\nQuestion: What is the largest number of points in a season?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"regular_season\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the phonology used in the example streht > \"straight\"?"
},
{
"role": "assistant",
"content": "SELECT \"early_middle_english\" FROM \"diphthongs\" WHERE \"example\"='streht > \\\"straight\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the Anglian phonology used in the example d\u00e6g > \"day\"; gr\u01e3g > \"gray\"?"
},
{
"role": "assistant",
"content": "SELECT \"late_old_english_anglian\" FROM \"diphthongs\" WHERE \"example\"='d\u00e6g > \\\"day\\\"; gr\u01e3g > \\\"gray\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the modern English phonology used in the example weg > \"way\"; regn > \"rain\"?"
},
{
"role": "assistant",
"content": "SELECT \"modern_english\" FROM \"diphthongs\" WHERE \"example\"='weg > \\\"way\\\"; regn > \\\"rain\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the Early Modern English phonology used in the example b\u014dg > \"bough\"; pl\u014dg > pl\u014dh > \"plough\"?"
},
{
"role": "assistant",
"content": "SELECT \"early_modern_english\" FROM \"diphthongs\" WHERE \"example\"='b\u014dg > \\\"bough\\\"; pl\u014dg > pl\u014dh > \\\"plough\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the Late Middle English equivalent of the Anglian \u00e6g, \u01e3g?"
},
{
"role": "assistant",
"content": "SELECT \"late_middle_english\" FROM \"diphthongs\" WHERE \"late_old_english_anglian\"='\u00e6g, \u01e3g';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"diphthongs\" (\n \"late_old_english_anglian\" text,\n \"early_middle_english\" text,\n \"late_middle_english\" text,\n \"early_modern_english\" text,\n \"modern_english\" text,\n \"example\" text\n);\n\nQuestion: What is the example of the Early Modern English ( [x] \u2192 /f/) /\u0254f/?"
},
{
"role": "assistant",
"content": "SELECT \"example\" FROM \"diphthongs\" WHERE \"early_modern_english\"='( [x] \u2192 /f/) /\u0254f/';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28178756_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: List the numer of miles for 2010."
},
{
"role": "assistant",
"content": "SELECT \"miles_km\" FROM \"table1_28178756_1\" WHERE \"year\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28178756_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: On what day did tommy ellis drive?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"table1_28178756_1\" WHERE \"driver\"='Tommy Ellis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28178756_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: On what day did joe gibbs racing record a time of 1:53:26?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"table1_28178756_1\" WHERE \"team\"='Joe Gibbs Racing' AND \"race_time\"='1:53:26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28178756_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What is the average speed for filmar racing?"
},
{
"role": "assistant",
"content": "SELECT \"average_speed_mph\" FROM \"table1_28178756_1\" WHERE \"team\"='FILMAR Racing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28178756_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: List the race time for may 11."
},
{
"role": "assistant",
"content": "SELECT \"race_time\" FROM \"table1_28178756_1\" WHERE \"date\"='May 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_round_summary_top_24\" (\n \"name_name_of_act\" text,\n \"age_s\" text,\n \"genre\" text,\n \"act\" text,\n \"hometown\" text,\n \"semifinal_week\" real,\n \"position_reached\" text\n);\n\nQuestion: What is the total number of modern grannies performed?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"act\") FROM \"series_1_round_summary_top_24\" WHERE \"name_name_of_act\"='Modern Grannies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_round_summary_top_24\" (\n \"name_name_of_act\" text,\n \"age_s\" text,\n \"genre\" text,\n \"act\" text,\n \"hometown\" text,\n \"semifinal_week\" real,\n \"position_reached\" text\n);\n\nQuestion: What is the name of the performance zhu xiaoming performed?"
},
{
"role": "assistant",
"content": "SELECT \"act\" FROM \"series_1_round_summary_top_24\" WHERE \"name_name_of_act\"='Zhu Xiaoming';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_round_summary_top_24\" (\n \"name_name_of_act\" text,\n \"age_s\" text,\n \"genre\" text,\n \"act\" text,\n \"hometown\" text,\n \"semifinal_week\" real,\n \"position_reached\" text\n);\n\nQuestion: How many performers are 29 that made it to the semi finals?"
},
{
"role": "assistant",
"content": "SELECT \"semifinal_week\" FROM \"series_1_round_summary_top_24\" WHERE \"age_s\"='29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_round_summary_top_24\" (\n \"name_name_of_act\" text,\n \"age_s\" text,\n \"genre\" text,\n \"act\" text,\n \"hometown\" text,\n \"semifinal_week\" real,\n \"position_reached\" text\n);\n\nQuestion: What is the name of the zhou jinsong's hometown?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"series_1_round_summary_top_24\" WHERE \"name_name_of_act\"='Zhou Jinsong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many different production codes does the episode originally aired on October 18, 1984 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"production_code\") FROM \"table1_2818164_2\" WHERE \"original_air_date\"='October 18, 1984';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What's the title of the episode with production code 104?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_2818164_2\" WHERE \"production_code\"=104;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many different titles does the episode originally aired on September 27, 1984 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"table1_2818164_2\" WHERE \"original_air_date\"='September 27, 1984';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What's the production code of the episode originally aired on February 21, 1985?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"production_code\") FROM \"table1_2818164_2\" WHERE \"original_air_date\"='February 21, 1985';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When did the episode titled \"Bad dreams\" air for the first time?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_2818164_2\" WHERE \"title\"='\\\"Bad Dreams\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: When did the episode titled \"Vanessa's new class\" air for the first time?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_2818164_2\" WHERE \"title\"='\\\"Vanessa''s New Class\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28181401_4\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"scorers\" text,\n \"attendance\" real,\n \"match_report\" text\n);\n\nQuestion: when roberts 86' is the scorer what is the round?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"table1_28181401_4\" WHERE \"scorers\"='Roberts 86''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28181401_4\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"scorers\" text,\n \"attendance\" real,\n \"match_report\" text\n);\n\nQuestion: When semi final (2nd leg) is the round what is the highest attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"table1_28181401_4\" WHERE \"round\"='Semi Final (2nd leg)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: When Mark Stimson started his job in 2007-08 what posiiton was the team on the table"
},
{
"role": "assistant",
"content": "SELECT \"position_in_table\" FROM \"managerial_changes\" WHERE \"replaced_by\"='Mark Stimson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: In football league one, what coach was hired as a replacement on 8 October 2007"
},
{
"role": "assistant",
"content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='8 October 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: One 6 November 2007 what was the manner of departure for the coach release in football league one?"
},
{
"role": "assistant",
"content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='6 November 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the series number for the episode written by janet leahy?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_series\") FROM \"table1_2818164_4\" WHERE \"written_by\"='Janet Leahy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What was the air date of the episode with the production code of 322?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_2818164_4\" WHERE \"production_code\"=322;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the series number for the episode directed by jay sandrich that aired October 23, 1986?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"no_in_series\") FROM \"table1_2818164_4\" WHERE \"directed_by\"='Jay Sandrich' AND \"original_air_date\"='October 23, 1986';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2818164_4\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Who wrote the episode titled \"man talk\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_2818164_4\" WHERE \"title\"='\\\"Man Talk\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"p\" real,\n \"w\" real,\n \"d\" real,\n \"l\" real,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text,\n \"pts\" real\n);\n\nQuestion: Name the tries for when L is less than 2.0"
},
{
"role": "assistant",
"content": "SELECT \"tries_for\" FROM \"pool_3\" WHERE \"l\"<2.0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"p\" real,\n \"w\" real,\n \"d\" real,\n \"l\" real,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text,\n \"pts\" real\n);\n\nQuestion: Name the points for for when try diff is +19"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"pool_3\" WHERE \"try_diff\"='+19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"p\" real,\n \"w\" real,\n \"d\" real,\n \"l\" real,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text,\n \"pts\" real\n);\n\nQuestion: Name the most points for when tries against is 8"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_for\") FROM \"pool_3\" WHERE \"tries_against\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_14_6_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the most recent year shown for Betty Stove?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"women_s_doubles_14_6_titles_8_runner_ups\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_14_6_titles_8_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was Betty's partner when the surface is hard?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"women_s_doubles_14_6_titles_8_runner_ups\" WHERE \"surface\"='Hard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"points\" real,\n \"percent\" text\n);\n\nQuestion: What is the lowest number of drawn games by a team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"table\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"points\" real,\n \"percent\" text\n);\n\nQuestion: How many points did the team that won 5 games make?"
},
{
"role": "assistant",
"content": "SELECT \"pts_for\" FROM \"table\" WHERE \"won\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"pts_for\" real,\n \"pts_agst\" real,\n \"points\" real,\n \"percent\" text\n);\n\nQuestion: How many points does the club that had 45 points against it have?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"table\" WHERE \"pts_agst\"=45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: When gray wolves is the team nickname how many institutions are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"institution\") FROM \"division_ii\" WHERE \"team_nickname\"='Gray Wolves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: When sylvania, oh is the location what is the team nickname?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"division_ii\" WHERE \"location\"='Sylvania, OH';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: When indianapolis, indiana is the location what is the institution?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"division_ii\" WHERE \"location\"='Indianapolis, Indiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: When private/ nonsectarian is the the affiliation what is the team nickname?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"division_ii\" WHERE \"affiliation\"='Private/ Nonsectarian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: 4512 is the enrollment what is the team nickname?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"division_ii\" WHERE \"enrollment\"=4512;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_13_4_titles_9_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What championship was played with Allan Stone as a partner?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"mixed_doubles_13_4_titles_9_runner_ups\" WHERE \"partner\"='Allan Stone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_13_4_titles_9_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many different partners played in the finale in 1973?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"partner\") FROM \"mixed_doubles_13_4_titles_9_runner_ups\" WHERE \"year\"=1973;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_doubles_13_4_titles_9_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the score in the final played with Fred McNair as partner?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"mixed_doubles_13_4_titles_9_runner_ups\" WHERE \"partner\"='Fred McNair';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"num_season_num\" text,\n \"no_episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: What was the orginal air date for episodes with production code 2acx12?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"episodes\" WHERE \"prod_code\"='2ACX12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"num_season_num\" text,\n \"no_episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: Who wrote the episode with production code 2acx12?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"episodes\" WHERE \"prod_code\"='2ACX12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"num_season_num\" text,\n \"no_episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: What numbered episode was directed by greg colton and written by patrick meighan?"
},
{
"role": "assistant",
"content": "SELECT \"no_episode_num\" FROM \"episodes\" WHERE \"directed_by\"='Greg Colton' AND \"written_by\"='Patrick Meighan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"num_season_num\" text,\n \"no_episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" text\n);\n\nQuestion: Who directed # (season #) is 1 ( 2 )?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"episodes\" WHERE \"num_season_num\"='1 ( 2 )';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"host\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who is everyone on the men's doubles when men's singles is Ma Wenge?"
},
{
"role": "assistant",
"content": "SELECT \"mens_doubles\" FROM \"senior_events\" WHERE \"mens_singles\"='Ma Wenge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"host\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who are all men's doubles when men's singles is Jean-Michel Saive?"
},
{
"role": "assistant",
"content": "SELECT \"mens_doubles\" FROM \"senior_events\" WHERE \"mens_singles\"='Jean-Michel Saive';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"host\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who are all men's doubles when men's singles is Jean-Michel Saive?"
},
{
"role": "assistant",
"content": "SELECT \"mens_doubles\" FROM \"senior_events\" WHERE \"mens_singles\"='Jean-Michel Saive';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"host\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: Who are all hosts when men's singles is Ma Wenge?"
},
{
"role": "assistant",
"content": "SELECT \"host\" FROM \"senior_events\" WHERE \"mens_singles\"='Ma Wenge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"host\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text\n);\n\nQuestion: How many people are women's singles in the season of 2000/01?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"womens_singles\") FROM \"senior_events\" WHERE \"season\"='2000/01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_events\" (\n \"season\" text,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the winners of the mens doubles in the season of 1963/64."
},
{
"role": "assistant",
"content": "SELECT \"mens_doubles\" FROM \"senior_events\" WHERE \"season\"='1963/64';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28212888_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who was the director of the episode with series number 116?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_28212888_2\" WHERE \"no_in_series\"=116;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28212888_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Who's the writer of the episode titled \"Safe Haven\"?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_28212888_2\" WHERE \"title\"='\\\"Safe Haven\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28212888_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What's the title of the episode seen by 12.85 millions of people in the US?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_28212888_2\" WHERE \"u_s_viewers_millions\"='12.85';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28212888_2\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many different people wrote the episode titled \"Reflection of Desire\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"written_by\") FROM \"table1_28212888_2\" WHERE \"title\"='\\\"Reflection of Desire\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_3_2004\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes had 11.86 million US viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_series\") FROM \"season_3_2004\" WHERE \"u_s_viewers_millions\"='11.86';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_3_2004\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the title(s) of episodes written by aron eli coleite?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_3_2004\" WHERE \"written_by\"='Aron Eli Coleite';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_3_2004\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_air_date\" text\n);\n\nQuestion: What are the original air date(s) for episodes written by aron eli coleite?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"season_3_2004\" WHERE \"written_by\"='Aron Eli Coleite';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_3_2004\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_millions\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many episodes were titled \"second chances\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"u_s_viewers_millions\") FROM \"season_3_2004\" WHERE \"title\"='\\\"Second Chances\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography_original_releases\" (\n \"year\" real,\n \"song_s\" text,\n \"producer_s\" text,\n \"written_by\" text,\n \"artist\" text,\n \"title_label\" text\n);\n\nQuestion: how many producers are responsible for the song 'calling out to marlboro?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"producer_s\") FROM \"discography_original_releases\" WHERE \"song_s\"='Calling Out to Marlboro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography_original_releases\" (\n \"year\" real,\n \"song_s\" text,\n \"producer_s\" text,\n \"written_by\" text,\n \"artist\" text,\n \"title_label\" text\n);\n\nQuestion: what was the first year that kid creole and the coconuts recorded with I Too Have Seen The Woods / Sire Records?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"discography_original_releases\" WHERE \"artist\"='Kid Creole and the Coconuts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_stats\" (\n \"series\" text,\n \"seasons\" real,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"podiums_non_win\" real,\n \"point_finishes_non_podium\" real,\n \"teams\" real,\n \"total_points\" real,\n \"championships\" real,\n \"best_finish_championship\" text\n);\n\nQuestion: How many seasons are there with Formula Holden?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"seasons\") FROM \"overall_stats\" WHERE \"series\"='Formula Holden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_stats\" (\n \"series\" text,\n \"seasons\" real,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"podiums_non_win\" real,\n \"point_finishes_non_podium\" real,\n \"teams\" real,\n \"total_points\" real,\n \"championships\" real,\n \"best_finish_championship\" text\n);\n\nQuestion: How many poles are there with 2 races?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"poles\") FROM \"overall_stats\" WHERE \"races\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall_stats\" (\n \"series\" text,\n \"seasons\" real,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"podiums_non_win\" real,\n \"point_finishes_non_podium\" real,\n \"teams\" real,\n \"total_points\" real,\n \"championships\" real,\n \"best_finish_championship\" text\n);\n\nQuestion: What's the most amount of point finishes for v8supercar?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"point_finishes_non_podium\") FROM \"overall_stats\" WHERE \"series\"='V8Supercar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liga_acb\" (\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: How many people had high rebounds in game 14?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"high_rebounds\") FROM \"liga_acb\" WHERE \"game\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liga_acb\" (\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 every score when the date is January 2?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"liga_acb\" WHERE \"date\"='January 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What was the highest number of students in attendance for the university of north texas?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"enrollment\") FROM \"division_i\" WHERE \"institution\"='University of North Texas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the mascot for texas tech university?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"division_i\" WHERE \"institution\"='Texas Tech University';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What is the total enrollment for private/ disciples of christ?"
},
{
"role": "assistant",
"content": "SELECT \"enrollment\" FROM \"division_i\" WHERE \"affiliation\"='Private/ Disciples of Christ';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: How many mascotts are there for college station, texas"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"team_nickname\") FROM \"division_i\" WHERE \"location\"='College Station, Texas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_i\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: List the highest number of students in attendance for the institution that started in 1923."
},
{
"role": "assistant",
"content": "SELECT MAX(\"enrollment\") FROM \"division_i\" WHERE \"founded\"=1923;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heirs_to_the_austrian_empire\" (\n \"emperor\" text,\n \"heir\" text,\n \"relationship_to_emperor_and_status\" text,\n \"became_heir\" text,\n \"ceased_to_be_heir\" text,\n \"next_in_line\" text\n);\n\nQuestion: How many next in lines had heirs of Archduke Karl?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"next_in_line\") FROM \"heirs_to_the_austrian_empire\" WHERE \"heir\"='Archduke Karl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: Which team has a song based on \"wee deoch an doris\"?"
},
{
"role": "assistant",
"content": "SELECT \"club_name\" FROM \"notes\" WHERE \"basis_for_team_song\"='\\\"Wee Deoch an Doris\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: Name the team that has a song writer named larry spokes."
},
{
"role": "assistant",
"content": "SELECT \"club_name\" FROM \"notes\" WHERE \"writer_composer\"='Larry Spokes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: How man teams have a writer named harry angus?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"name_of_team_song\") FROM \"notes\" WHERE \"writer_composer\"='Harry Angus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: Name the team anthem that was written by quentin eyers and les kaczmarek."
},
{
"role": "assistant",
"content": "SELECT \"name_of_team_song\" FROM \"notes\" WHERE \"writer_composer\"='Quentin Eyers and Les Kaczmarek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: How many team songs does fremantle have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"basis_for_team_song\") FROM \"notes\" WHERE \"club_name\"='Fremantle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"club_name\" text,\n \"name_of_team_song\" text,\n \"basis_for_team_song\" text,\n \"first_used_as_team_song\" text,\n \"writer_composer\" text\n);\n\nQuestion: What is the name of the team song written by ken walther?"
},
{
"role": "assistant",
"content": "SELECT \"basis_for_team_song\" FROM \"notes\" WHERE \"writer_composer\"='Ken Walther';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: In how many different years was the team nicknamed Comets founded?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"founded\") FROM \"division_ii\" WHERE \"team_nickname\"='Comets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_ii\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"enrollment\" real,\n \"team_nickname\" text,\n \"primary_conference\" text\n);\n\nQuestion: What's the nickname of the team with enrollment of 40747?"
},
{
"role": "assistant",
"content": "SELECT \"team_nickname\" FROM \"division_ii\" WHERE \"enrollment\"=40747;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.