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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the September 21, 1980 game?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 21, 1980';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feast_days\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: Which Doubles have a Total larger than 176, and a Date smaller than 1907, and Doubles, I Class smaller than 21?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"doubles\") FROM \"feast_days\" WHERE \"total\">176 AND \"date\"<1907 AND \"doubles_i_class\"<21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feast_days\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Date of 1602, and Greater Doubles smaller than 16?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"feast_days\" WHERE \"date\"=1602 AND \"greater_doubles\"<16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feast_days\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: How much Total has Semidoubles smaller than 78, and Doubles, II Class smaller than 17?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"feast_days\" WHERE \"semidoubles\"<78 AND \"doubles_ii_class\"<17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feast_days\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: Which Greater Doubles have Doubles, II Class smaller than 17?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"greater_doubles\") FROM \"feast_days\" WHERE \"doubles_ii_class\"<17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feast_days\" (\n \"date\" real,\n \"doubles_i_class\" real,\n \"doubles_ii_class\" real,\n \"greater_doubles\" real,\n \"doubles\" real,\n \"semidoubles\" real,\n \"total\" real\n);\n\nQuestion: How much Total has Doubles of 45, and Doubles, II Class larger than 18?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"feast_days\" WHERE \"doubles\"=45 AND \"doubles_ii_class\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: Which Rank has a 2nd run of 1:17.170 (8)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"semifinal_1\" WHERE \"2nd_run\"='1:17.170 (8)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: Which Rank has a Total smaller than 10, and a 3rd run of 36.457 (2)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"semifinal_1\" WHERE \"total\"<10 AND \"3rd_run\"='36.457 (2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"name\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"3rd_run\" text,\n \"total\" real\n);\n\nQuestion: Which Name has a 3rd run of 36.200 (1)?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"3rd_run\"='36.200 (1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"size_of_intervals_in_15_equal_temperamen\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text,\n \"audio\" text\n);\n\nQuestion: What is the value of the size (steps) that has just ratio 10:9 and a size (cents) more than 160"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"size_steps\") FROM \"size_of_intervals_in_15_equal_temperamen\" WHERE \"just_ratio\"='10:9' AND \"size_cents\">160;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"size_of_intervals_in_15_equal_temperamen\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text,\n \"audio\" text\n);\n\nQuestion: what is the value of the audio with a just ratio 21:20"
},
{
"role": "assistant",
"content": "SELECT \"audio\" FROM \"size_of_intervals_in_15_equal_temperamen\" WHERE \"just_ratio\"='21:20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"size_of_intervals_in_15_equal_temperamen\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text,\n \"audio\" text\n);\n\nQuestion: What is the error that has a size (steps) more than 5 and a just (cents) value 536.95"
},
{
"role": "assistant",
"content": "SELECT \"error\" FROM \"size_of_intervals_in_15_equal_temperamen\" WHERE \"size_steps\">5 AND \"just_cents\"=536.95;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"size_of_intervals_in_15_equal_temperamen\" (\n \"interval_name\" text,\n \"size_steps\" real,\n \"size_cents\" real,\n \"just_ratio\" text,\n \"just_cents\" real,\n \"error\" text,\n \"audio\" text\n);\n\nQuestion: What is the average size (cents) with an interval of major third and size (steps) more than 5"
},
{
"role": "assistant",
"content": "SELECT AVG(\"size_cents\") FROM \"size_of_intervals_in_15_equal_temperamen\" WHERE \"interval_name\"='major third' AND \"size_steps\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_final_1_31_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the average number of points for places over 7 and having a draw order of 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"semi_final_1_31_january_2009\" WHERE \"place\">7 AND \"draw\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_final_1_31_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the sum of placings for the song \"Tavo Spalvos\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"place\") FROM \"semi_final_1_31_january_2009\" WHERE \"song\"='\\\"tavo spalvos\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: How many league goals did the player with 10 league apps and 0 FA cup goals have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\"=0 AND \"league_apps\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What was the sum of league goals where the toal was 8 and league cup goals were larger than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"total_goals\"=8 AND \"league_cup_goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: For the Japanese title \u30b5\u30d7\u30ea that had 11 episodes, what is the average ratings?"
},
{
"role": "assistant",
"content": "SELECT \"average_ratings\" FROM \"2006_summer_season\" WHERE \"episodes\"=11 AND \"japanese_title\"='\u30b5\u30d7\u30ea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: When the average ratings is 10.3%, what is the average episodes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"episodes\") FROM \"2006_summer_season\" WHERE \"average_ratings\"='10.3%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: What is the fewest episodes with the Romaji title Regatta~Kimi to Ita Eien~?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"episodes\") FROM \"2006_summer_season\" WHERE \"romaji_title\"='regatta~kimi to ita eien~';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: With the Romaji title of Hanayome Wa Yakudoshi!, what is the Japanese title?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_title\" FROM \"2006_summer_season\" WHERE \"romaji_title\"='hanayome wa yakudoshi!';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_summer_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: For what Japanese title is there less than 11 episodes and the Romaji title is Regatta~Kimi to Ita Eien~?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_title\" FROM \"2006_summer_season\" WHERE \"episodes\"<11 AND \"romaji_title\"='regatta~kimi to ita eien~';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_fall_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: what is the most episodes when the average ratings is 18.8%?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episodes\") FROM \"2006_fall_season\" WHERE \"average_ratings\"='18.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_fall_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: How many episodes when the tv station is ntv and the japanese title is \u305f\u3063\u305f\u3072\u3068\u3064\u306e\u604b?"
},
{
"role": "assistant",
"content": "SELECT \"episodes\" FROM \"2006_fall_season\" WHERE \"tv_station\"='ntv' AND \"japanese_title\"='\u305f\u3063\u305f\u3072\u3068\u3064\u306e\u604b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_fall_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: what is the tv station when the romaji title is kazoku~tsuma no fuzai\u30fbotto no sonzai~?"
},
{
"role": "assistant",
"content": "SELECT \"tv_station\" FROM \"2006_fall_season\" WHERE \"romaji_title\"='kazoku~tsuma no fuzai\u30fbotto no sonzai~';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_fall_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: what is the tv station when the average ratings is 19.5%?"
},
{
"role": "assistant",
"content": "SELECT \"tv_station\" FROM \"2006_fall_season\" WHERE \"average_ratings\"='19.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: Of all the schools that left before 2003, what is the average year joined?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year_joined\") FROM \"membership\" WHERE \"year_left\"<2003;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text,\n \"year_left\" real,\n \"conference_joined\" text\n);\n\nQuestion: What year did the Ingots, who left after 2007, join?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_joined\") FROM \"membership\" WHERE \"mascot\"='ingots' AND \"year_left\">2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"original_artist\" text,\n \"original_release\" real,\n \"length\" text\n);\n\nQuestion: What is the original Release date of the Track written by Dallas Frazier?"
},
{
"role": "assistant",
"content": "SELECT \"original_release\" FROM \"track_listing\" WHERE \"writer_s\"='dallas frazier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"original_artist\" text,\n \"original_release\" real,\n \"length\" text\n);\n\nQuestion: What is the Original Artis of the Track with a Length of 2:38?"
},
{
"role": "assistant",
"content": "SELECT \"original_artist\" FROM \"track_listing\" WHERE \"length\"='2:38';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"original_artist\" text,\n \"original_release\" real,\n \"length\" text\n);\n\nQuestion: What Song has a Length of 2:50?"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"track_listing\" WHERE \"length\"='2:50';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"title\" text,\n \"hangul_japanese\" text,\n \"role\" text,\n \"network\" text,\n \"genre\" text\n);\n\nQuestion: What's the title when the genre is drama and network of KBS2 happening before 2011?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"television_series\" WHERE \"year\"<2011 AND \"network\"='kbs2' AND \"genre\"='drama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"title\" text,\n \"hangul_japanese\" text,\n \"role\" text,\n \"network\" text,\n \"genre\" text\n);\n\nQuestion: What's the title when the genre is drama with a network of KBS2 happening in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"television_series\" WHERE \"genre\"='drama' AND \"network\"='kbs2' AND \"year\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"title\" text,\n \"hangul_japanese\" text,\n \"role\" text,\n \"network\" text,\n \"genre\" text\n);\n\nQuestion: What's the network in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"television_series\" WHERE \"year\"=2011;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"title\" text,\n \"hangul_japanese\" text,\n \"role\" text,\n \"network\" text,\n \"genre\" text\n);\n\nQuestion: What's the Hangul/Japanese that happened before 2014 having a role of Baek Seung-Jo?"
},
{
"role": "assistant",
"content": "SELECT \"hangul_japanese\" FROM \"television_series\" WHERE \"year\"<2014 AND \"role\"='baek seung-jo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_series\" (\n \"year\" real,\n \"title\" text,\n \"hangul_japanese\" text,\n \"role\" text,\n \"network\" text,\n \"genre\" text\n);\n\nQuestion: What's the Hangul/Japanese of Boys Over Flowers that's drama?"
},
{
"role": "assistant",
"content": "SELECT \"hangul_japanese\" FROM \"television_series\" WHERE \"genre\"='drama' AND \"title\"='boys over flowers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the IHSAA class in monon?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='monon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the IHSAA class with 395 in enrollment?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"=395;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What school has rebels as their mascot?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='rebels';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the total enrollment of the aa IHSAA class?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the lowest enrollment at the pioneer school?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='pioneer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: What is the average enrollment of the IHSAA A class in wolcott?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='a' AND \"location\"='wolcott';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2011_2012\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the Shirt No for Henry Bell Cisnero whose height is less than 190?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"shirt_no\") FROM \"team_roster_season_2011_2012\" WHERE \"height\"<190 AND \"player\"='henry bell cisnero';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2011_2012\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the Shirt No for the person whose height is 188?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"shirt_no\") FROM \"team_roster_season_2011_2012\" WHERE \"height\"=188;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_roster_season_2011_2012\" (\n \"shirt_no\" real,\n \"nationality\" text,\n \"player\" text,\n \"birth_date\" text,\n \"height\" real,\n \"position\" text\n);\n\nQuestion: What is the height of the person whose position is Libero?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"height\") FROM \"team_roster_season_2011_2012\" WHERE \"position\"='libero';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"country\" text,\n \"athlete\" text,\n \"technical\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What is the total for the person with free of 47.667, and technical less than 47.417?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"final\" WHERE \"free\"=47.667 AND \"technical\"<47.417;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"country\" text,\n \"athlete\" text,\n \"technical\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What is the technical number for Jiang Tingting & Jiang Wenwen, and the total was more than 96.334?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"technical\") FROM \"final\" WHERE \"athlete\"='jiang tingting & jiang wenwen' AND \"total\">96.334;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"country\" text,\n \"athlete\" text,\n \"technical\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"free\") FROM \"final\" WHERE \"athlete\"='apolline dreyfuss & lila meesseman-bakir' AND \"total\">90.333;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the average number of games drawn among teams that played over 14 games?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"first_round\" WHERE \"played\">14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of points combined from the teams that played over 14 games?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"first_round\" WHERE \"played\">14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many points did the ESC Riverrats Geretsried, who lost more than 3 games, score?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"first_round\" WHERE \"lost\">3 AND \"name\"='esc riverrats geretsried';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the average number of games drawn among the teams that lost over 13 games?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"first_round\" WHERE \"lost\">13;"
}
]
|
[
{
"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: What is the date of vacancy when the manner of departure is sacked and the team is nejapa?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='sacked' AND \"team\"='nejapa';"
}
]
|
[
{
"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: what is the date of vacancy when the date of appointment is 1 january 2009?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='1 january 2009';"
}
]
|
[
{
"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: what is the date of vacancy when the position in table is 10th and the team is balboa?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"position_in_table\"='10th' AND \"team\"='balboa';"
}
]
|
[
{
"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: Who replaced when the position in table is 5th?"
},
{
"role": "assistant",
"content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"position_in_table\"='5th';"
}
]
|
[
{
"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: Who is the outgoing manager when they were replaced by pablo centrone?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"replaced_by\"='pablo centrone';"
}
]
|
[
{
"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: what is the date of vacancy when the team is firpo and replaced by is oscar benitez?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"team\"='firpo' AND \"replaced_by\"='oscar benitez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which country was ranked 8 and noted as qs?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heat_2\" WHERE \"notes\"='qs' AND \"rank\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes for the contestants that were ranked #1?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"heat_2\" WHERE \"rank\"=1;"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who did the Hawks play on 12/21/1973?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='12/21/1973';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: What rank does Tricia Flores have?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"qualifying_round\" WHERE \"name\"='tricia flores';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: Who is in group B and has a mark of 6.33?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_round\" WHERE \"group\"='b' AND \"mark\"='6.33';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: What is the mark for Grenada in group A?"
},
{
"role": "assistant",
"content": "SELECT \"mark\" FROM \"qualifying_round\" WHERE \"group\"='a' AND \"nationality\"='grenada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: Who has a mark of 6.17 in group B?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_round\" WHERE \"group\"='b' AND \"mark\"='6.17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: What rank does Tatyana Lebedeva have?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"qualifying_round\" WHERE \"name\"='tatyana lebedeva';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_round\" (\n \"rank\" text,\n \"group\" text,\n \"name\" text,\n \"nationality\" text,\n \"mark\" text\n);\n\nQuestion: What rank has a mark of NM and is from India?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"qualifying_round\" WHERE \"mark\"='nm' AND \"nationality\"='india';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: What is the sum of totals for ranks under 3 with tallies of 2-5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"single_game\" WHERE \"rank\"<3 AND \"tally\"='2-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"single_game\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"opposition\" text\n);\n\nQuestion: Which player had a rank of 8 and tally of 1-5?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"single_game\" WHERE \"rank\"=8 AND \"tally\"='1-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes\" (\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 \"ratings\" text\n);\n\nQuestion: What is the sum of the numbers in series written by sam meikle, which have 21 numbers in the season?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"no_in_series\") FROM \"episodes\" WHERE \"written_by\"='sam meikle' AND \"no_in_season\"=21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game played in Alexander Memorial Coliseum when the record was 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"location_attendance\"='alexander memorial coliseum' AND \"record\"='0-1';"
}
]
|
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: When was the game played that was at the Seattle Center Coliseum?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='seattle center coliseum';"
}
]
|
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the least game that was played in Alexander Memorial Coliseum on October 16?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"location_attendance\"='alexander memorial coliseum' AND \"date\"='october 16';"
}
]
|
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: What average game was played on October 16?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"date\"='october 16';"
}
]
|
[
{
"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_attendance\" text,\n \"record\" text\n);\n\nQuestion: On what day was game 2 played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_international\" (\n \"country\" text,\n \"tourist_arrivals_2011_millions\" real,\n \"tourism_receipts_2011_millions_of_us\" real,\n \"tourism_receipts_2011_us_per_arrival\" real,\n \"tourism_receipts_2011_us_per_capita\" real,\n \"tourism_receipts_2003_as_pct_of_gdp\" text,\n \"tourism_receipts_2003_as_pct_of_exports\" text,\n \"tourism_competitiveness_2011_ttci\" text\n);\n\nQuestion: What is the average tourism receipts in millions of US dollars in 2011 with less than 1.141 million of 2011 tourist arrivals and more than 1,449 tourism receipts in 2011 US dollars per arrival?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"tourism_receipts_2011_millions_of_us\") FROM \"performance_indicators_for_international\" WHERE \"tourist_arrivals_2011_millions\"<1.141 AND \"tourism_receipts_2011_us_per_arrival\">'1,449';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_international\" (\n \"country\" text,\n \"tourist_arrivals_2011_millions\" real,\n \"tourism_receipts_2011_millions_of_us\" real,\n \"tourism_receipts_2011_us_per_arrival\" real,\n \"tourism_receipts_2011_us_per_capita\" real,\n \"tourism_receipts_2003_as_pct_of_gdp\" text,\n \"tourism_receipts_2003_as_pct_of_exports\" text,\n \"tourism_competitiveness_2011_ttci\" text\n);\n\nQuestion: What is the tourism competitiveness in 2011 of venezuela?"
},
{
"role": "assistant",
"content": "SELECT \"tourism_competitiveness_2011_ttci\" FROM \"performance_indicators_for_international\" WHERE \"country\"='venezuela';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_international\" (\n \"country\" text,\n \"tourist_arrivals_2011_millions\" real,\n \"tourism_receipts_2011_millions_of_us\" real,\n \"tourism_receipts_2011_us_per_arrival\" real,\n \"tourism_receipts_2011_us_per_capita\" real,\n \"tourism_receipts_2003_as_pct_of_gdp\" text,\n \"tourism_receipts_2003_as_pct_of_exports\" text,\n \"tourism_competitiveness_2011_ttci\" text\n);\n\nQuestion: What is the highest number of tourism receipts in 2011 US $ per capita with 19.4 % of GDP in 2003 tourism receipts and less than 655 US $ per arrival in 2011 tourism receipts?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tourism_receipts_2011_us_per_capita\") FROM \"performance_indicators_for_international\" WHERE \"tourism_receipts_2003_as_pct_of_gdp\"='19.4' AND \"tourism_receipts_2011_us_per_arrival\"<655;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_international\" (\n \"country\" text,\n \"tourist_arrivals_2011_millions\" real,\n \"tourism_receipts_2011_millions_of_us\" real,\n \"tourism_receipts_2011_us_per_arrival\" real,\n \"tourism_receipts_2011_us_per_capita\" real,\n \"tourism_receipts_2003_as_pct_of_gdp\" text,\n \"tourism_receipts_2003_as_pct_of_exports\" text,\n \"tourism_competitiveness_2011_ttci\" text\n);\n\nQuestion: What is the lowest tourism arrivals in 2011 in millions with 507 US $ per arrival in 2011 tourism receipts and less than 11,869 million of US $ in 2011 tourism receipts?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tourist_arrivals_2011_millions\") FROM \"performance_indicators_for_international\" WHERE \"tourism_receipts_2011_us_per_arrival\"=507 AND \"tourism_receipts_2011_millions_of_us\"<'11,869';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_international\" (\n \"country\" text,\n \"tourist_arrivals_2011_millions\" real,\n \"tourism_receipts_2011_millions_of_us\" real,\n \"tourism_receipts_2011_us_per_arrival\" real,\n \"tourism_receipts_2011_us_per_capita\" real,\n \"tourism_receipts_2003_as_pct_of_gdp\" text,\n \"tourism_receipts_2003_as_pct_of_exports\" text,\n \"tourism_competitiveness_2011_ttci\" text\n);\n\nQuestion: What is the highest tourism arrivals in 2011 in millions with a 3.82 tourism competitiveness in 2011 and more than 1,102 US$ per arrival in 2011 tourism receipts?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tourist_arrivals_2011_millions\") FROM \"performance_indicators_for_international\" WHERE \"tourism_competitiveness_2011_ttci\"='3.82' AND \"tourism_receipts_2011_us_per_arrival\">'1,102';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_championships\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"city\" text,\n \"arena\" text\n);\n\nQuestion: In what year was Wisconsin the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"national_championships\" WHERE \"runner_up\"='wisconsin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_championships\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"city\" text,\n \"arena\" text\n);\n\nQuestion: In what arena was the North Dakota the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"arena\" FROM \"national_championships\" WHERE \"runner_up\"='north dakota';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_championships\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"city\" text,\n \"arena\" text\n);\n\nQuestion: What was the score of the game at the Broadmoor Arena?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"national_championships\" WHERE \"arena\"='broadmoor arena';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_championships\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"city\" text,\n \"arena\" text\n);\n\nQuestion: Who was the runner-up at the Broadmoor Arena before 2008?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"national_championships\" WHERE \"year\"<2008 AND \"arena\"='broadmoor arena';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_championships\" (\n \"year\" real,\n \"champion\" text,\n \"score\" text,\n \"runner_up\" text,\n \"city\" text,\n \"arena\" text\n);\n\nQuestion: In what year was the competition at the Pepsi Arena?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"national_championships\" WHERE \"arena\"='pepsi arena';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which opponent has a 53-24 record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='53-24';"
}
]
|
[
{
"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\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent for game 73?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\"='73';"
}
]
|
[
{
"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: who is the replacement when the team is milton keynes dons?"
},
{
"role": "assistant",
"content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"team\"='milton keynes dons';"
}
]
|
[
{
"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: what is the team with the position in table of 24th and the date of appointment 15 september 2008?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"position_in_table\"='24th' AND \"date_of_appointment\"='15 september 2008';"
}
]
|
[
{
"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: what is the position in table when the team is hartlepool united?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_table\" FROM \"managerial_changes\" WHERE \"team\"='hartlepool united';"
}
]
|
[
{
"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: what is the team geraint williams is the replacement?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"replaced_by\"='geraint williams';"
}
]
|
[
{
"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: what is the date of vacancy when the position in table is 16th and the outgoing manager is russell slade?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"position_in_table\"='16th' AND \"outgoing_manager\"='russell slade';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What years have 10 (0) in the finals?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"most_number_of_appearances\" WHERE \"finals\"='10 (0)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What A-League has 6 (1) for the finals, and leigh broxham as the name?"
},
{
"role": "assistant",
"content": "SELECT \"a_league\" FROM \"most_number_of_appearances\" WHERE \"finals\"='6 (1)' AND \"name\"='leigh broxham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What finals have grant brebner as the name?"
},
{
"role": "assistant",
"content": "SELECT \"finals\" FROM \"most_number_of_appearances\" WHERE \"name\"='grant brebner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What years have 9 (0) as the finals and 133 (1) as the A-League?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"most_number_of_appearances\" WHERE \"finals\"='9 (0)' AND \"a_league\"='133 (1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What years have 9 (3) as the finals?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"most_number_of_appearances\" WHERE \"finals\"='9 (3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_number_of_appearances\" (\n \"name\" text,\n \"years\" text,\n \"a_league\" text,\n \"finals\" text,\n \"total\" text\n);\n\nQuestion: What years have 101 (16) as the total?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"most_number_of_appearances\" WHERE \"total\"='101 (16)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterfinal_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who has a time of 7:26.85 and notes of sc/d?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"quarterfinal_2\" WHERE \"notes\"='sc/d' AND \"time\"='7:26.85';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterfinal_2\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Ioannis Christou with a rank smaller than 6 has what notes?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"quarterfinal_2\" WHERE \"rank\"<6 AND \"athlete\"='ioannis christou';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.