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 \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the lowest pick when the School is Stanford University?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"supplemental_first_round_selections\" WHERE \"school\"='stanford university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What Team has a Pick of 40?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"supplemental_first_round_selections\" WHERE \"pick\"=40;"
}
] |
[
{
"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 \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date was the away team Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" 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 \"most_games_as_starting_quarterback\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: What is the high loss total for players with zero wins and a win % greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"most_games_as_starting_quarterback\" WHERE \"wins\"=0 AND \"win_pct\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_games_as_starting_quarterback\" (\n \"name\" text,\n \"period\" text,\n \"starts\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"win_pct\" real\n);\n\nQuestion: What is the win % for the QB with 3 starts?"
},
{
"role": "assistant",
"content": "SELECT \"win_pct\" FROM \"most_games_as_starting_quarterback\" WHERE \"starts\"=3;"
}
] |
[
{
"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 venue did geelong play an away game?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_7\" 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: What was the away team score when the home team scored 8.14 (62)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team_score\"='8.14 (62)';"
}
] |
[
{
"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 home team played an away team of melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Which player had an overall pick of 130?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2009_draft_picks\" WHERE \"overall\"='130';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What round was Corey Cowick picked?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"2009_draft_picks\" WHERE \"player\"='corey cowick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What position does the player from the Miami University (CCHA) club team play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2009_draft_picks\" WHERE \"club_team\"='miami university (ccha)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_opportunities\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text,\n \"outcome\" text\n);\n\nQuestion: What most recent year had North Melbourne as a team and Hamish Mcintosh as a player?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"missed_opportunities\" WHERE \"team\"='north melbourne' AND \"player\"='hamish mcintosh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_opportunities\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text,\n \"outcome\" text\n);\n\nQuestion: Which score had Essendon as an opponent and Steven Clark as a player?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"missed_opportunities\" WHERE \"opponent\"='essendon' AND \"player\"='steven clark';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_opportunities\" (\n \"player\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text,\n \"outcome\" text\n);\n\nQuestion: Which team got a Behind outcome and had an opponent of Brisbane Bears?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"missed_opportunities\" WHERE \"outcome\"='behind' AND \"opponent\"='brisbane bears';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 did the north melbourne team play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_22\" 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 \"round_22\" (\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 at junction oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_22\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\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's score at junction oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_22\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 venue was essendon the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_22\" WHERE \"away_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\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 at kardinia park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_22\" 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 \"list_of_blood_agents\" (\n \"agent\" text,\n \"melting_boiling_point\" text,\n \"effectiveness_as_blood_agent\" real,\n \"persistence_open_area\" real,\n \"persistence_enclosed_area\" real,\n \"field_stability\" real,\n \"storage_stability\" real,\n \"toxicity_as_blood_agent\" real\n);\n\nQuestion: What is the storage stability of Arsine with a toxicity of 8, and field stability less than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"storage_stability\") FROM \"list_of_blood_agents\" WHERE \"toxicity_as_blood_agent\">8 AND \"agent\"='arsine' AND \"field_stability\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_blood_agents\" (\n \"agent\" text,\n \"melting_boiling_point\" text,\n \"effectiveness_as_blood_agent\" real,\n \"persistence_open_area\" real,\n \"persistence_enclosed_area\" real,\n \"field_stability\" real,\n \"storage_stability\" real,\n \"toxicity_as_blood_agent\" real\n);\n\nQuestion: What is the field stability of Cyanogen Bromide that has an effectiveness of 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"field_stability\") FROM \"list_of_blood_agents\" WHERE \"agent\"='cyanogen bromide' AND \"effectiveness_as_blood_agent\">9;"
}
] |
[
{
"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 the Venue is mcg what is the Home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" 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_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: If the Away team had a score of 14.14 (98), what's the name of the Away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"away_team_score\"='14.14 (98)';"
}
] |
[
{
"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 the Away team was hawthorn, what's the Home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" 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_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 the away team scored 9.14 (68), what was the home teams score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team_score\"='9.14 (68)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"flyweight_56_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the total associated with a Clean & jerk of 135, and a Snatch of 115?"
},
{
"role": "assistant",
"content": "SELECT \"total_kg\" FROM \"flyweight_56_kg\" WHERE \"clean_jerk\"=135 AND \"snatch\"=115;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"flyweight_56_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the highest Bodyweight associated with a Clean & jerk larger than 120, and a Total (kg) of 245?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bodyweight\") FROM \"flyweight_56_kg\" WHERE \"clean_jerk\">120 AND \"total_kg\"=245;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"flyweight_56_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the sum Total (kg) associated with a Snatch less than 110, and a Clean & jerk larger than 120?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_kg\") FROM \"flyweight_56_kg\" WHERE \"snatch\"<110 AND \"clean_jerk\">120;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"flyweight_56_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: How many people have a Clean & jerk smaller than 142.5, a Bodyweight smaller than 55.58, and a Total (kg) larger than 210?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"snatch\") FROM \"flyweight_56_kg\" WHERE \"clean_jerk\"<142.5 AND \"bodyweight\"<55.58 AND \"total_kg\">210;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5101_5200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Tell me the object type which has an apparent magnitude more than 10.6 and declination of \u00b044\u203207\u2033"
},
{
"role": "assistant",
"content": "SELECT \"object_type\" FROM \"5101_5200\" WHERE \"apparent_magnitude\">10.6 AND \"declination_j2000\"='\u00b044\u203207\u2033';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5101_5200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Tell me the declination with apparent magnitude more than 10.4 and NGC number of 5112"
},
{
"role": "assistant",
"content": "SELECT \"declination_j2000\" FROM \"5101_5200\" WHERE \"apparent_magnitude\">10.4 AND \"ngc_number\"=5112;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text\n);\n\nQuestion: Which event has a Method of submission (triangle choke), and an Opponent of thiago tavares?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (triangle choke)' AND \"opponent\"='thiago tavares';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text\n);\n\nQuestion: What is the result with a Round of 3, and an Opponent of keith wisniewski?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='3' AND \"opponent\"='keith wisniewski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text\n);\n\nQuestion: Which time has eddie miller as opponent?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='eddie miller';"
}
] |
[
{
"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: What's the average Rd number for dane jackson with a pick number over 44?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rd_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='dane jackson' AND \"pick_num\">44;"
}
] |
[
{
"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: What's the largest pick number for corrie d'alessio with a rd number over 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='corrie d''alessio' AND \"rd_num\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visiting team at the Cavaliers game that had a score of 121\u201385?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"january\" WHERE \"score\"='121\u201385';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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: On what date did Melbourne play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_15\" 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_9\" (\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 points did the away team score when the home team scored 16.12 (108)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"home_team_score\"='16.12 (108)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 points did the home team score when the home team scored 18.19 (127)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"away_team_score\"='18.19 (127)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 owns the Venue of western oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 did the Victoria park home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_9\" 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_9\" (\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 crowd size when geelong played home?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 crowd size when the visiting team scored 23.18 (156)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"away_team_score\"='23.18 (156)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 the away team play when they scored 22.14 (146)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"away_team_score\"='22.14 (146)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 the home team play when they scored 18.20 (128)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"home_team_score\"='18.20 (128)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_8\" (\n \"date\" text,\n \"venue\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Name the most that attendend when the venue was td banknorth garden and the series of montreal leads 3-1"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"eastern_conference_quarter_finals_vs_8\" WHERE \"venue\"='td banknorth garden' AND \"series\"='montreal leads 3-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_8\" (\n \"date\" text,\n \"venue\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Name the decision for boston bruins visitor"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"eastern_conference_quarter_finals_vs_8\" WHERE \"visitor\"='boston bruins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average total medals Egypt, who has less than 2 gold, has?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"nation\"='egypt' AND \"gold\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals Egypt, who has less than 0 silver, has?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"nation\"='egypt' AND \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest gold a team with less than 3 silver and more than 5 bronze medals has?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"silver\"<3 AND \"bronze\">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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the rank of the team with 1 bronze and 0 gold medals?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medal_table\" WHERE \"bronze\"=1 AND \"gold\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"rank\" text,\n \"country_or_dependent_territory\" text,\n \"july_1_2013_projection\" real,\n \"pct_of_pop\" real,\n \"average_relative_annual_growth_pct\" real,\n \"average_absolute_annual_growth\" real\n);\n\nQuestion: What is the average % of population Tunisia, which has an average relative annual growth smaller than 1.03?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct_of_pop\") FROM \"table\" WHERE \"country_or_dependent_territory\"='tunisia' AND \"average_relative_annual_growth_pct\"<1.03;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"rank\" text,\n \"country_or_dependent_territory\" text,\n \"july_1_2013_projection\" real,\n \"pct_of_pop\" real,\n \"average_relative_annual_growth_pct\" real,\n \"average_absolute_annual_growth\" real\n);\n\nQuestion: What is the average relative annual growth of the country ranked 3 with an average absolute annual growth larger than 1,051,000?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average_relative_annual_growth_pct\") FROM \"table\" WHERE \"rank\"='3' AND \"average_absolute_annual_growth\">'1,051,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"rank\" text,\n \"country_or_dependent_territory\" text,\n \"july_1_2013_projection\" real,\n \"pct_of_pop\" real,\n \"average_relative_annual_growth_pct\" real,\n \"average_absolute_annual_growth\" real\n);\n\nQuestion: What is the average relative annual growth of Lebanon, which has a July 1, 2013 projection larger than 4,127,000?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average_relative_annual_growth_pct\") FROM \"table\" WHERE \"country_or_dependent_territory\"='lebanon' AND \"july_1_2013_projection\">'4,127,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 home team at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" 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 \"round_5\" (\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 Footscray's score as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" 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 \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On what date was there a competition in which the home team was the Suns?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"november\" WHERE \"home\"='suns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: In the competition in which the visiting team was the Suns, who was the leading scorer?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"visitor\"='suns';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record in the competition in which the home team was the Mavericks?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"november\" WHERE \"home\"='mavericks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"telugu_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: What's the average year a Rangam movie came out?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"telugu_songs\" WHERE \"movie\"='rangam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"telugu_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: What year was \"Ulike o Chilake\" released?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"telugu_songs\" WHERE \"song_title\"='\\\"ulike o chilake\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"telugu_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: What movie was \"anti pettukundhuna\" in?"
},
{
"role": "assistant",
"content": "SELECT \"movie\" FROM \"telugu_songs\" WHERE \"song_title\"='\\\"anti pettukundhuna\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"telugu_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: What was the name of the song in Amma Cheppindi?"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"telugu_songs\" WHERE \"movie\"='amma cheppindi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"telugu_songs\" (\n \"year\" real,\n \"song_title\" text,\n \"movie\" text,\n \"music_director\" text,\n \"co_singers\" text\n);\n\nQuestion: What was the average year that Thuppakki movies came out?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"telugu_songs\" WHERE \"movie\"='thuppakki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_1_example_of_abc_rejection_algorit\" (\n \"theta_i\" real,\n \"simulated_datasets_step_2\" text,\n \"summary_statistic_omega_s_i_step_3\" real,\n \"distance_rho_omega_s_i_omega_e_step_4\" real,\n \"outcome_step_4\" text\n);\n\nQuestion: What is the highest summary statistic of the algorithm with a distance larger than 2 and simulated datasets of aabbababaaabbababbab?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"summary_statistic_omega_s_i_step_3\") FROM \"table_1_example_of_abc_rejection_algorit\" WHERE \"distance_rho_omega_s_i_omega_e_step_4\">2 AND \"simulated_datasets_step_2\"='aabbababaaabbababbab';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_1_example_of_abc_rejection_algorit\" (\n \"theta_i\" real,\n \"simulated_datasets_step_2\" text,\n \"summary_statistic_omega_s_i_step_3\" real,\n \"distance_rho_omega_s_i_omega_e_step_4\" real,\n \"outcome_step_4\" text\n);\n\nQuestion: What is the summary of the algorithm with a theta i of 0.43?"
},
{
"role": "assistant",
"content": "SELECT \"summary_statistic_omega_s_i_step_3\" FROM \"table_1_example_of_abc_rejection_algorit\" WHERE \"theta_i\"=0.43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_national_performance\" (\n \"nationality\" text,\n \"year\" text,\n \"games_played\" real,\n \"minutes_played\" text,\n \"goals_scored\" text,\n \"yellow_card\" text,\n \"red_card\" text\n);\n\nQuestion: How many games had 2 goals scored?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"games_played\") FROM \"all_time_national_performance\" WHERE \"goals_scored\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result week 11?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"analytical_table\" (\n \"state\" text,\n \"votes\" real,\n \"votes_since_1856\" real,\n \"democratic_votes\" real,\n \"d_votes_since_1856\" real,\n \"pct_of_d_votes\" text,\n \"d_pct_since_1856\" text,\n \"republican_votes\" real,\n \"pct_of_r_votes\" text,\n \"r_pct_since_1856\" text,\n \"other_votes\" real,\n \"o_votes_since_1856\" real,\n \"pct_of_o_votes\" text,\n \"o_pct_since_1856\" text\n);\n\nQuestion: Name the total number of democratic votes when the other votes are less than 18 and the percentage of R votes are 52.63% and votes since 1856 less than 38"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"democratic_votes\") FROM \"analytical_table\" WHERE \"other_votes\"<18 AND \"pct_of_r_votes\"='52.63%' AND \"votes_since_1856\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"uefa_cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"report\" text\n);\n\nQuestion: On what Date was the Opponent Panathinaikos?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"uefa_cup\" WHERE \"opponent\"='panathinaikos';"
}
] |
[
{
"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: How many people attended games with st kilda as the home side?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_14\" WHERE \"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_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: Who is the home team when the crowd is over 32,485?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"crowd\">'32,485';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height\" text,\n \"floors\" real\n);\n\nQuestion: What is the average number of floors for buildings in mecca ranked above 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"floors\") FROM \"tallest_buildings_under_construction\" WHERE \"city\"='mecca' AND \"rank\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height\" text,\n \"floors\" real\n);\n\nQuestion: What city is the lamar tower 1, ranked above 5?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"tallest_buildings_under_construction\" WHERE \"rank\"<5 AND \"name\"='lamar tower 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings_under_construction\" (\n \"rank\" real,\n \"name\" text,\n \"city\" text,\n \"height\" text,\n \"floors\" real\n);\n\nQuestion: What city has a building with over 57 floors?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"tallest_buildings_under_construction\" WHERE \"floors\">57;"
}
] |
[
{
"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: How many laps did ant\u00f4nio pizzonia do?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"driver\"='ant\u00f4nio pizzonia';"
}
] |
[
{
"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: What is the constructor for time/retired of handling?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='handling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 away team's score at windy hill?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_19\" 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_19\" (\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 size when the away team scores 7.13 (55)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_19\" WHERE \"away_team_score\"='7.13 (55)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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's score when the away side scores 14.11 (95)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"away_team_score\"='14.11 (95)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the highest round of a player from Sweden who plays right wing?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"2013_draft_picks\" WHERE \"nationality\"='sweden' AND \"position\"='right wing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the position of a player from a round less than 4 and an overall of 17?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2013_draft_picks\" WHERE \"round\"<4 AND \"overall\"='17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the average round of a player with an overall of 138?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"2013_draft_picks\" WHERE \"overall\"='138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: Who is the player from Sweden from a round after 3?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2013_draft_picks\" WHERE \"nationality\"='sweden' AND \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_draft_picks\" (\n \"round\" real,\n \"overall\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the nationality of a player from link\u00f6pings hc (se)?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"2013_draft_picks\" WHERE \"club_team\"='link\u00f6pings hc (se)';"
}
] |
[
{
"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 crowd size for st kilda as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_1\" WHERE \"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_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: When an away team scored 6.12 (48), what was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"away_team_score\"='6.12 (48)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"swedish_title\" text,\n \"norwegian_title\" text,\n \"translated_title\" text,\n \"published\" real,\n \"pages\" real,\n \"isbn\" text\n);\n\nQuestion: I want the sum of pages for thistle among roses"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pages\") FROM \"titles\" WHERE \"translated_title\"='thistle among roses';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_statement\" (\n \"fund\" text,\n \"manager\" text,\n \"fund_period\" text,\n \"fund_return\" text,\n \"market_return\" text\n);\n\nQuestion: Who is the manager for FMC Corporation pension fund?"
},
{
"role": "assistant",
"content": "SELECT \"manager\" FROM \"the_statement\" WHERE \"fund\"='fmc corporation pension fund';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_statement\" (\n \"fund\" text,\n \"manager\" text,\n \"fund_period\" text,\n \"fund_return\" text,\n \"market_return\" text\n);\n\nQuestion: What fund has a fund return of 19.8% / 13.7%?"
},
{
"role": "assistant",
"content": "SELECT \"fund\" FROM \"the_statement\" WHERE \"fund_return\"='19.8% / 13.7%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"character\" text,\n \"position\" text,\n \"actor\" text,\n \"first_episode\" text,\n \"final_episode\" text,\n \"episodes_credited\" real\n);\n\nQuestion: What was the position of Frank Tripp?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"overview\" WHERE \"character\"='frank tripp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overview\" (\n \"character\" text,\n \"position\" text,\n \"actor\" text,\n \"first_episode\" text,\n \"final_episode\" text,\n \"episodes_credited\" real\n);\n\nQuestion: What was the final episode credited of 187?"
},
{
"role": "assistant",
"content": "SELECT \"final_episode\" FROM \"overview\" WHERE \"episodes_credited\"=187;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1890_1904\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text,\n \"comments\" text\n);\n\nQuestion: Which class at 55 built?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"1890_1904\" WHERE \"no_built\"=55;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1890_1904\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"no_built\" real,\n \"loco_nos\" text,\n \"comments\" text\n);\n\nQuestion: What is the Loco Nos of the e3 class?"
},
{
"role": "assistant",
"content": "SELECT \"loco_nos\" FROM \"1890_1904\" WHERE \"class\"='e3';"
}
] |
[
{
"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: How many people attended Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_6\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"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 score of the team that played against Fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_b\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2011_12_season\" text\n);\n\nQuestion: Which 2011-12 season with a volume larger than 27,543 at club of melfi?"
},
{
"role": "assistant",
"content": "SELECT \"2011_12_season\" FROM \"girone_b\" WHERE \"capacity\">'27,543' AND \"club\"='melfi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_b\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2011_12_season\" text\n);\n\nQuestion: What is the name of the stadium for the city of melfi?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"girone_b\" WHERE \"city\"='melfi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"girone_b\" (\n \"club\" text,\n \"city\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"2011_12_season\" text\n);\n\nQuestion: What is the total capacity for the stadium of pasquale ianniello?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"capacity\") FROM \"girone_b\" WHERE \"stadium\"='pasquale ianniello';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.