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 \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What's the Result of the Competition of 1998 FIFA World Cup Qualification with the Venue of Bangkok?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='1998 fifa world cup qualification' AND \"venue\"='bangkok';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who had the decision with boston at home?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"february\" WHERE \"home\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team that played at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_10\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the away team that played richmond?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_3_3\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the score for the game that Colin Fleming Scott Lipsky played in?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_6_3_3\" WHERE \"opponents\"='colin fleming scott lipsky';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_3_3\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which tournament was Dieter Kindlmann a partner?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_6_3_3\" WHERE \"partner\"='dieter kindlmann';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_stats\" (\n \"season\" text,\n \"club\" text,\n \"apps\" real,\n \"goals\" real,\n \"division\" real\n);\n\nQuestion: When the Apps were smaller than 22, what's the lowest amount of goals scored in a game?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals\") FROM \"career_stats\" WHERE \"apps\"<22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_stats\" (\n \"season\" text,\n \"club\" text,\n \"apps\" real,\n \"goals\" real,\n \"division\" real\n);\n\nQuestion: What's the total number of all divisions during the 2006/07 season where they scored more than 1 goal?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division\") FROM \"career_stats\" WHERE \"season\"='2006/07' AND \"goals\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the total of a crowd with an Away team score of 8.17 (65)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='8.17 (65)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd at victoria park?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_16\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the Away team score with a crowd greater than 10,000 and st kilda as home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"crowd\">'10,000' AND \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the Away team score with north melbourne as home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who had the general classification when the trofeo fast team was Mapei-Bricobi, the points classification went to Mariano Piccoli and the mountains classification went to Marco Pantani in stage 22?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"trofeo_fast_team\"='mapei-bricobi' AND \"points_classification\"='mariano piccoli' AND \"mountains_classification\"='marco pantani' AND \"stage\"='22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who was the winner in stage 3?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership\" WHERE \"stage\"='3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Which state was first elected in 1914, and a Member of edward jolley?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"notes\" WHERE \"first_elected\"='1914' AND \"member\"='edward jolley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Which state is frederick bamford a member of?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"notes\" WHERE \"member\"='frederick bamford';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Which first election for the labor party is James Sharpe a part of?"
},
{
"role": "assistant",
"content": "SELECT \"first_elected\" FROM \"notes\" WHERE \"party\"='labor' AND \"member\"='james sharpe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" text\n);\n\nQuestion: Which party is sydney sampson a member of?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"notes\" WHERE \"member\"='sydney sampson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" text,\n \"winner\" text,\n \"team\" text,\n \"position\" text,\n \"win_num\" real\n);\n\nQuestion: What position for doug gibson with 2 wins?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"winners\" WHERE \"win_num\"=2 AND \"winner\"='doug gibson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: How many receptions does Chris Watton with yards of less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rec\") FROM \"wide_receivers\" WHERE \"player\"='chris watton' AND \"yards\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score for plays with more than 19,227 attendees with ny islanders visiting?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"february\" WHERE \"attendance\">'19,227' AND \"visitor\"='ny islanders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"the_american\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: What is the American locations with less than 114 years and more than 1 tied with more than 1022 total games?"
},
{
"role": "assistant",
"content": "SELECT \"the_american\" FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"years\"<114 AND \"tied\">1 AND \"total_games\">1022;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the largest crowd for a game where the away team scored 14.20 (104)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_4\" WHERE \"away_team_score\"='14.20 (104)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when Melbourne was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the Away team score for Away team North Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team is associated with the Richmond Home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"real_name\" text,\n \"birthdate\" text,\n \"costume_role\" text,\n \"defining_characteristics\" text\n);\n\nQuestion: What is the birth date of the member with the Defining characteristic of pink hair?"
},
{
"role": "assistant",
"content": "SELECT \"birthdate\" FROM \"members\" WHERE \"defining_characteristics\"='pink hair';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"real_name\" text,\n \"birthdate\" text,\n \"costume_role\" text,\n \"defining_characteristics\" text\n);\n\nQuestion: What is the defining characteristic of Takeshi Kuroiwa?"
},
{
"role": "assistant",
"content": "SELECT \"defining_characteristics\" FROM \"members\" WHERE \"real_name\"='takeshi kuroiwa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"real_name\" text,\n \"birthdate\" text,\n \"costume_role\" text,\n \"defining_characteristics\" text\n);\n\nQuestion: Who is the person with the defining characteristic of the shortest band member?"
},
{
"role": "assistant",
"content": "SELECT \"real_name\" FROM \"members\" WHERE \"defining_characteristics\"='shortest band member';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"real_name\" text,\n \"birthdate\" text,\n \"costume_role\" text,\n \"defining_characteristics\" text\n);\n\nQuestion: What is the name of the member with a costume Role of monster?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"members\" WHERE \"costume_role\"='monster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members\" (\n \"name\" text,\n \"real_name\" text,\n \"birthdate\" text,\n \"costume_role\" text,\n \"defining_characteristics\" text\n);\n\nQuestion: What is the name of the member with the costume Role of \"the girl\"?"
},
{
"role": "assistant",
"content": "SELECT \"real_name\" FROM \"members\" WHERE \"costume_role\"='\\\"the girl\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the final score for the match played in Venue H and the opponent was Newcastle United?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"matches\" WHERE \"venue\"='h' AND \"opponent\"='newcastle united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest bronze medals for a team with fewer than 1 silver and rank lower than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"rank\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals for the nation with fewer than 3 gold, 1 silver and rank of 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<3 AND \"silver\"=1 AND \"total\"<3 AND \"rank\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest total for a nation with 1 bronze and more than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"bronze\"=1 AND \"silver\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest total for a nation with more than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"silver\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the aggregate for a team #2 of Okk Beograd?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"first_round\" WHERE \"team_num2\"='okk beograd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg score for Chemie Halle?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"first_round\" WHERE \"team_num1\"='chemie halle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was South Melbourne's score as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance when Geelong played as the away team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_6\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Footscray play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_7\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance when the Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_7\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_selected\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school\" text\n);\n\nQuestion: What is the mean pick when the play is Marc Lewis (lhp) and the round is less than 20?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"players_selected\" WHERE \"player\"='marc lewis (lhp)' AND \"round\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_selected\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school\" text\n);\n\nQuestion: Which pick's player was Marc Lewis (lhp)?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"players_selected\" WHERE \"player\"='marc lewis (lhp)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_selected\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"school\" text\n);\n\nQuestion: Which is the biggest pick for Naperville Central High School?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"players_selected\" WHERE \"school\"='naperville central high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_league_soccer\" (\n \"metropolitan_area\" text,\n \"media_market_ranking\" real,\n \"since\" real,\n \"mlb_team_s\" text,\n \"nba_team_s\" text\n);\n\nQuestion: What is the media market ranking for new york, new york?"
},
{
"role": "assistant",
"content": "SELECT \"media_market_ranking\" FROM \"major_league_soccer\" WHERE \"metropolitan_area\"='new york, new york';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: Is it home or away when opponent is Pride with a W 11-10 result?"
},
{
"role": "assistant",
"content": "SELECT \"home_away\" FROM \"schedule\" WHERE \"opponent\"='pride' AND \"result\"='w 11-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: Who is the opponent at Bishop Kearney Field?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"field\"='bishop kearney field';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: On what date were the opponents the Bayhawks at a home game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"home_away\"='home' AND \"opponent\"='bayhawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_composition_of_budjak_according_t\" (\n \"raion_district_or_city\" text,\n \"total\" text,\n \"ukrainians\" text,\n \"moldovans\" text,\n \"bessarabian_bulgarians\" text,\n \"russians\" text,\n \"gagauzians\" text,\n \"other_ethnic_groups\" text\n);\n\nQuestion: What city or Raion (district) has 8,600 Bessarabian Bulgarians?"
},
{
"role": "assistant",
"content": "SELECT \"raion_district_or_city\" FROM \"ethnic_composition_of_budjak_according_t\" WHERE \"bessarabian_bulgarians\"='8,600';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ethnic_composition_of_budjak_according_t\" (\n \"raion_district_or_city\" text,\n \"total\" text,\n \"ukrainians\" text,\n \"moldovans\" text,\n \"bessarabian_bulgarians\" text,\n \"russians\" text,\n \"gagauzians\" text,\n \"other_ethnic_groups\" text\n);\n\nQuestion: what is the Moldovans number when there are 14,200 Ukrainians?"
},
{
"role": "assistant",
"content": "SELECT \"moldovans\" FROM \"ethnic_composition_of_budjak_according_t\" WHERE \"ukrainians\"='14,200';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"reported_isn\" real,\n \"on_july_2007_press_release\" text,\n \"disposition\" text,\n \"citizenship\" text,\n \"country_of_act\" text\n);\n\nQuestion: Name the lowest reported isn for russia"
},
{
"role": "assistant",
"content": "SELECT MIN(\"reported_isn\") FROM \"2007_list\" WHERE \"citizenship\"='russia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_list\" (\n \"reported_isn\" real,\n \"on_july_2007_press_release\" text,\n \"disposition\" text,\n \"citizenship\" text,\n \"country_of_act\" text\n);\n\nQuestion: Name the average reported isn for july 2007 for kuwait release of no"
},
{
"role": "assistant",
"content": "SELECT AVG(\"reported_isn\") FROM \"2007_list\" WHERE \"on_july_2007_press_release\"='no' AND \"citizenship\"='kuwait';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_municipalities_in_quebec\" (\n \"code\" real,\n \"type\" text,\n \"name\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"regional_county_municipality\" text,\n \"region\" real\n);\n\nQuestion: What is the highest region number with a 499 population?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"region\") FROM \"list_of_municipalities_in_quebec\" WHERE \"population\"=499;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What was the series score on april 17 with minnesota at home?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"home\"='minnesota' AND \"date\"='april 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: How many attended the game on april 14?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"playoffs\" WHERE \"date\"='april 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Who was at home on april 14?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"date\"='april 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the crowd at the game where the home team scored 10.8 (68)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_18\" WHERE \"home_team_score\"='10.8 (68)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the away team that played Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date was the game played at Punt Road Oval?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" WHERE \"venue\"='punt road oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the home team that played against Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score that played at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"venue\"='kardinia park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the total number of Laps for Rubens Barrichello"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"driver\"='rubens barrichello';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the driver for grid less than 19 and Laps more than 59 with time/retired of +0.294"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"<19 AND \"laps\">59 AND \"time_retired\"='+0.294';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the name of the rider with a time of 1:45.52.84, and a Rank of 8?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"lightweight_classic_race\" WHERE \"time\"='1:45.52.84' AND \"rank\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"lightweight_classic_race\" WHERE \"rank\"<5 AND \"time\"='1:37.58.38';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lightweight_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the highest rank for Peter Symes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"lightweight_classic_race\" WHERE \"rider\"='peter symes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was a game played where the away team scored 12.14 (86)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"away_team_score\"='12.14 (86)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the away team at Glenferrie Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was a game played where the away team is St Kilda?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team score when the away team was Carlton?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was the game where the home team score was 8.9 (57)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"home_team_score\"='8.9 (57)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"future_proposed_stadiums\" (\n \"stadium\" text,\n \"team\" text,\n \"location\" text,\n \"capacity\" text,\n \"opening\" text\n);\n\nQuestion: What place can sit 65,000 and opens 2016?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"future_proposed_stadiums\" WHERE \"capacity\"='65,000' AND \"opening\"='2016';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"future_proposed_stadiums\" (\n \"stadium\" text,\n \"team\" text,\n \"location\" text,\n \"capacity\" text,\n \"opening\" text\n);\n\nQuestion: What is the stadium of the san diego chargers?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"future_proposed_stadiums\" WHERE \"team\"='san diego chargers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"future_proposed_stadiums\" (\n \"stadium\" text,\n \"team\" text,\n \"location\" text,\n \"capacity\" text,\n \"opening\" text\n);\n\nQuestion: Who is the team at vikings stadium?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"future_proposed_stadiums\" WHERE \"stadium\"='vikings stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposals_as_of_january_2013\" (\n \"building\" text,\n \"height\" text,\n \"floors\" real,\n \"year\" text,\n \"status\" text\n);\n\nQuestion: For the Year 2013 what building(s) had more than 15 Floors?"
},
{
"role": "assistant",
"content": "SELECT \"building\" FROM \"proposals_as_of_january_2013\" WHERE \"floors\">15 AND \"year\"='2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proposals_as_of_january_2013\" (\n \"building\" text,\n \"height\" text,\n \"floors\" real,\n \"year\" text,\n \"status\" text\n);\n\nQuestion: For the Year 2013 what building(s) had less than 20 Floors?"
},
{
"role": "assistant",
"content": "SELECT \"building\" FROM \"proposals_as_of_january_2013\" WHERE \"year\"='2013' AND \"floors\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What location was the game played at when Richmond was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the home team when the home team score was 26.14 (170)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"home_team_score\"='26.14 (170)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date was the game played at vfl park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd when the away team was north melbourne?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_13\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team scored 20.18 (138)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team_score\"='20.18 (138)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team was the home team when the home team score was 26.14 (170)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"home_team_score\"='26.14 (170)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_de_france\" (\n \"height_m\" text,\n \"no_of_times_visited\" real,\n \"no_of_hc_climbs\" real,\n \"first_time_as_hc_climb\" real,\n \"most_recent\" real\n);\n\nQuestion: When was the first HC climb which, more recently than 2012, had more than 1 HC climbs, more than 29 times visited?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"first_time_as_hc_climb\") FROM \"tour_de_france\" WHERE \"no_of_hc_climbs\">1 AND \"no_of_times_visited\">29 AND \"most_recent\">2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_de_france\" (\n \"height_m\" text,\n \"no_of_times_visited\" real,\n \"no_of_hc_climbs\" real,\n \"first_time_as_hc_climb\" real,\n \"most_recent\" real\n);\n\nQuestion: How many HC climbs had 1 visit more recently than 1984, a first HC climb before 1994, and a height of 1900?"
},
{
"role": "assistant",
"content": "SELECT \"no_of_hc_climbs\" FROM \"tour_de_france\" WHERE \"no_of_times_visited\"=1 AND \"most_recent\">1984 AND \"first_time_as_hc_climb\"<1994 AND \"height_m\"='1900';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_de_france\" (\n \"height_m\" text,\n \"no_of_times_visited\" real,\n \"no_of_hc_climbs\" real,\n \"first_time_as_hc_climb\" real,\n \"most_recent\" real\n);\n\nQuestion: What is the height with more than 2 HC climbs more recent than 2012, less than 48 times visited, and a first HC climb in 1989?"
},
{
"role": "assistant",
"content": "SELECT \"height_m\" FROM \"tour_de_france\" WHERE \"no_of_hc_climbs\">2 AND \"most_recent\"=2012 AND \"no_of_times_visited\"<48 AND \"first_time_as_hc_climb\"=1989;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_de_france\" (\n \"height_m\" text,\n \"no_of_times_visited\" real,\n \"no_of_hc_climbs\" real,\n \"first_time_as_hc_climb\" real,\n \"most_recent\" real\n);\n\nQuestion: What was the most recent year a height of 2770 m and a HC climb before 1992 was climbed?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"most_recent\") FROM \"tour_de_france\" WHERE \"height_m\"='2770' AND \"first_time_as_hc_climb\"<1992;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tour_de_france\" (\n \"height_m\" text,\n \"no_of_times_visited\" real,\n \"no_of_hc_climbs\" real,\n \"first_time_as_hc_climb\" real,\n \"most_recent\" real\n);\n\nQuestion: When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?"
},
{
"role": "assistant",
"content": "SELECT \"first_time_as_hc_climb\" FROM \"tour_de_france\" WHERE \"no_of_times_visited\">3 AND \"no_of_hc_climbs\"=4 AND \"most_recent\"<2013 AND \"height_m\"='1669';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"pennant_number\" text,\n \"ship\" text,\n \"builder\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: Who is the builder of Pennant d03?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"ships\" WHERE \"pennant_number\"='d03';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: How many picks had a Reg GP that was over 906, when the Pl GP was bigger than 99?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\">906 AND \"pl_gp\">99;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: Which is the smallest pick number that had a Reg GP of less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the home team score when the away team is south melbourne"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the date for home team of collingwood"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the date for princes park"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the date for the venue of brunswick street oval"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendence of the game on 26 April 1948 and an away team of Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_2\" WHERE \"date\"='26 april 1948' AND \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When playing at Windy Hill, what was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is essendon's home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd when footscray is at home?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_14\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the listed crowd at windy hill?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_14\" WHERE \"venue\"='windy hill';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.