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 \"round_one\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Player has a Team from of south shore kings?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"team_from\"='south shore kings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which NHL team has a League from of western hockey league and a Pick # smaller than 23 and a Team from of prince george cougars?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_one\" WHERE \"league_from\"='western hockey league' AND \"pick_num\"<23 AND \"team_from\"='prince george cougars';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Position has a Pick # smaller than 26 and a Player of jack campbell?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"pick_num\"<26 AND \"player\"='jack campbell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: How much money did Willie Klein take home from the game in which he had a to par score larger than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"money\") FROM \"final_leaderboard\" WHERE \"player\"='willie klein' AND \"to_par\">13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What week had an attendance more than 63,268 and Kansas City Chiefs as the opponent?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\">'63,268' AND \"opponent\"='kansas city chiefs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on September 11, 1988?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 11, 1988';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on week 1?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What was the lowest win when there were 34 points and more than 13 draws?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"a_lyga\" WHERE \"points\"=34 AND \"draws\">13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What was the highest win when there were more than 64 goals scored and a position smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"a_lyga\" WHERE \"goals_scored\">64 AND \"position\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: Who is the Outgoing Manager replaced by Sandy Clark?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"replaced_by\"='sandy clark';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What is the Date of vacancy for Tommy McLean?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='tommy mclean';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_west\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of Goals scored that has more than 45 Points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_scored\") FROM \"2_lyga_zone_west\" WHERE \"points\">45;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_west\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What was the total number of Goals conceded when there were more than 4 losses, less than 5 draws, and more than 9 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_conceded\") FROM \"2_lyga_zone_west\" WHERE \"draws\"<5 AND \"loses\">4 AND \"wins\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2_lyga_zone_west\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of Goals scored when there was less than 20 Games played?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_scored\") FROM \"2_lyga_zone_west\" WHERE \"games_played\"<20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Country has a To par of \u20132, and a Player of jim thorpe?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"to_par\"='\u20132' AND \"player\"='jim thorpe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Name the Place which has To par of \u20135, in united states?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"to_par\"='\u20135';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Name the To par of payne stewart?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"player\"='payne stewart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: WHo has a Country of united states and a To par of \u20133?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"to_par\"='\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"harmonic\" real,\n \"ratio\" text,\n \"cents\" real,\n \"12_et_cents\" text,\n \"53_et_commas\" real,\n \"53_et_cents\" real\n);\n\nQuestion: What is the sum of cents that has 53ET cents less than 113.21, and a harmonic more than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"cents\") FROM \"see_also\" WHERE \"53_et_cents\"<113.21 AND \"harmonic\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"harmonic\" real,\n \"ratio\" text,\n \"cents\" real,\n \"12_et_cents\" text,\n \"53_et_commas\" real,\n \"53_et_cents\" real\n);\n\nQuestion: What is the sum of cents that has 12ET cents of 100, and less than 17 harmonic?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"cents\") FROM \"see_also\" WHERE \"12_et_cents\"='100' AND \"harmonic\"<17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hydro_power_stations\" (\n \"s_no\" real,\n \"power_plant\" text,\n \"state\" text,\n \"commissioned_capacity_mw\" real,\n \"year_of_commission\" real\n);\n\nQuestion: What power plant was commissioned in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"power_plant\" FROM \"hydro_power_stations\" WHERE \"year_of_commission\"=2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"event\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the Nominated work of popularity award (actor in a motion picture)?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"category\"='popularity award (actor in a motion picture)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the game site of the game with the san diego chargers as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"opponent\"='san diego chargers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the first round when team 1 was toulouse fc (d1)?"
},
{
"role": "assistant",
"content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"team_1\"='toulouse fc (d1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_against_other_players\" (\n \"player\" text,\n \"ranking\" real,\n \"record\" text,\n \"hardcourt\" text,\n \"clay\" text,\n \"grass\" text,\n \"carpet\" text\n);\n\nQuestion: What is Shahar Pe'er's record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"record_against_other_players\" WHERE \"player\"='shahar pe''er';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country placed t3 and had the player Fred Couples?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t3' AND \"player\"='fred couples';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for Fred Couples when the score is 68-66=134?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='68-66=134' AND \"player\"='fred couples';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country scored 66-68=134?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='66-68=134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What did Fred Couples place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='fred couples';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What player scored 68-66=134?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='68-66=134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What Player has a To par of +5 with a Score of 70-70-71-74=285?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"to_par\"='+5' AND \"score\"='70-70-71-74=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the Place of the Player with a Score of 73-67-74-71=285?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"score\"='73-67-74-71=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What T9 Place Player had a Score of 73-67-74-71=285?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"place\"='t9' AND \"score\"='73-67-74-71=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Who is the player with a t8 place?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"place\"='t8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the average amount of money of players in t8 place with a 68-71-69-72=280 score?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_round\" WHERE \"place\"='t8' AND \"score\"='68-71-69-72=280';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the country of player vijay singh?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='vijay singh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_phase\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Result F-A that was the quarter-final first leg round with a H/A of h?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"knockout_phase\" WHERE \"h_a\"='h' AND \"round\"='quarter-final first leg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when the decision was Raycroft, with attendance larger than 18,277, on February 11?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"decision\"='raycroft' AND \"attendance\">'18,277' AND \"date\"='february 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the opponent when the score was 3 - 2, and the decision was Raycroft, with a record of 25-29-1?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='3 - 2' AND \"decision\"='raycroft' AND \"record\"='25-29-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Position has a League from of western hockey league, and a Team from of everett silvertips?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_two\" WHERE \"league_from\"='western hockey league' AND \"team_from\"='everett silvertips';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Player has a Position of rw, and a League from of western hockey league?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_two\" WHERE \"position\"='rw' AND \"league_from\"='western hockey league';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Pick # has a Nationality of canada, and a Team from of sudbury wolves?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_two\" WHERE \"nationality\"='canada' AND \"team_from\"='sudbury wolves';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"round_two\" WHERE \"league_from\"='ontario hockey league' AND \"nationality\"='united states' AND \"team_from\"='brampton battalion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which League from has a Position of lw, a Pick # larger than 34, and a Player of bradley ross?"
},
{
"role": "assistant",
"content": "SELECT \"league_from\" FROM \"round_two\" WHERE \"position\"='lw' AND \"pick_num\">34 AND \"player\"='bradley ross';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which Position has a Team from of ottawa 67's, and a Pick # smaller than 47?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_two\" WHERE \"team_from\"='ottawa 67''s' AND \"pick_num\"<47;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Who is the republican Incumbent for Pennsylvania 9?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"pennsylvania\" WHERE \"party\"='republican' AND \"district\"='pennsylvania 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What are the results for Bill Shuster?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"pennsylvania\" WHERE \"incumbent\"='bill shuster';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pennsylvania\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the greatest first elected for Pennsylvania 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"pennsylvania\" WHERE \"district\"='pennsylvania 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What country had a Finish of t8?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"finish\"='t8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What Player had a To Par of +2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the To Par of the player with a t8 Finish?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"finish\"='t8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How tall is the building built in 1985 with 22 floors?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"floors\"=22 AND \"year\"=1985;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How many floors are in the building built after 2007, and ranked #10=?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"floors\") FROM \"tallest_buildings\" WHERE \"rank\"='10=' AND \"year\">2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How tall is the building ranked #13?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"rank\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Who won Miss Universe Philippines when the first runner-up was Danielle Casta\u00f1o and Janina San Miguel won Binibining Pilipinas-World?"
},
{
"role": "assistant",
"content": "SELECT \"miss_universe_philippines\" FROM \"title_holders_from_2000_until_2010\" WHERE \"first_runner_up\"='danielle casta\u00f1o' AND \"binibining_pilipinas_world\"='janina san miguel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Who won Miss Universe Philippines when Regina Hahn was second runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"miss_universe_philippines\" FROM \"title_holders_from_2000_until_2010\" WHERE \"second_runner_up\"='regina hahn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_2000_until_2010\" (\n \"year\" real,\n \"miss_universe_philippines\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"binibining_pilipinas_tourism\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: When Bianca Manalo won Miss Universe Philippines who was the second runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"second_runner_up\" FROM \"title_holders_from_2000_until_2010\" WHERE \"miss_universe_philippines\"='bianca manalo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"order\" text,\n \"title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What order has the title Deacon of SS. Cosma E Damiano?"
},
{
"role": "assistant",
"content": "SELECT \"order\" FROM \"cardinal_electors\" WHERE \"title\"='deacon of ss. cosma e damiano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"widebody_specifications\" (\n \"model\" text,\n \"eis_final_prod_year\" text,\n \"num_eng\" real,\n \"maximum_metric_mtow\" text,\n \"outside_diameter_main_passenger_deck\" text\n);\n\nQuestion: What is # Eng., when Outside Diameter, Main Passenger Deck is \"inches (m)\", and when Maximum Metric MTOW is \"231.3 tons\"?"
},
{
"role": "assistant",
"content": "SELECT \"num_eng\" FROM \"widebody_specifications\" WHERE \"outside_diameter_main_passenger_deck\"='inches (m)' AND \"maximum_metric_mtow\"='231.3 tons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2009, when 2008 is \"A\", when 2011 is \"A\", and when Tournament is \"Paris Masters\"?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2008\"='a' AND \"2011\"='a' AND \"tournament\"='paris masters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2008, when 2009 is \"A\", and when Tournament is \"Madrid Masters\"?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"singles_performance_timeline\" WHERE \"2009\"='a' AND \"tournament\"='madrid masters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is Tournament, when 2012 is \"A\", when 2011 is \"A\", and when 2008 is \"A\"?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2012\"='a' AND \"2011\"='a' AND \"2008\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2009, when 2011 is \"Q2\"?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2011\"='q2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2011, when Tournament is \"Year-End Ranking\"?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='year-end ranking';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What was Mark O'Meara's total?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"missed_the_cut\" WHERE \"player\"='mark o''meara';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" text,\n \"to_par\" text\n);\n\nQuestion: What year did Tom Watson win?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"player\"='tom watson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 1st member elected in 1511/12?"
},
{
"role": "assistant",
"content": "SELECT \"1st_member\" FROM \"parliaments_of_king_henry_viii\" WHERE \"elected\"='1511/12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 1st member of the parliament that was dissolved 23 february 1510?"
},
{
"role": "assistant",
"content": "SELECT \"1st_member\" FROM \"parliaments_of_king_henry_viii\" WHERE \"dissolved\"='23 february 1510';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: When was the parliament that was elected in 1509/10, and had an unknown second member, dissolved?"
},
{
"role": "assistant",
"content": "SELECT \"dissolved\" FROM \"parliaments_of_king_henry_viii\" WHERE \"2nd_member\"='unknown' AND \"elected\"='1509/10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 1st member that was elected in 1541/42?"
},
{
"role": "assistant",
"content": "SELECT \"1st_member\" FROM \"parliaments_of_king_henry_viii\" WHERE \"elected\"='1541/42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 2nd member of the parliament that was assembled on 3 november 1529?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"parliaments_of_king_henry_viii\" WHERE \"assembled\"='3 november 1529';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_henry_viii\" (\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who was the 2nd member of the parliament that was assembled on 3 november 1529?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"parliaments_of_king_henry_viii\" WHERE \"assembled\"='3 november 1529';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"date\" text,\n \"result\" text,\n \"competition\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What date was the competition of the Emerging Nations Tournament and a result of Scotland 34-9 Russia?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1990s\" WHERE \"competition\"='emerging nations tournament' AND \"result\"='scotland 34-9 russia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_early_period_for_all_\" (\n \"class\" text,\n \"number_s\" text,\n \"quantity\" text,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: What number was manufactured 1 in 1841?"
},
{
"role": "assistant",
"content": "SELECT \"number_s\" FROM \"locomotives_of_the_early_period_for_all_\" WHERE \"quantity\"='1' AND \"year_s_of_manufacture\"='1841';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_early_period_for_all_\" (\n \"class\" text,\n \"number_s\" text,\n \"quantity\" text,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: What is the quantity of class B V?"
},
{
"role": "assistant",
"content": "SELECT \"quantity\" FROM \"locomotives_of_the_early_period_for_all_\" WHERE \"class\"='b v';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_of_the_early_period_for_all_\" (\n \"class\" text,\n \"number_s\" text,\n \"quantity\" text,\n \"year_s_of_manufacture\" text,\n \"type\" text\n);\n\nQuestion: What number corresponds to the quantity of 24?"
},
{
"role": "assistant",
"content": "SELECT \"number_s\" FROM \"locomotives_of_the_early_period_for_all_\" WHERE \"quantity\"='24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is Tim Wollthan's Date of Birth?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth\" FROM \"germany\" WHERE \"name\"='tim wollthan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What D Player with a Height of m (ft 4in) is in the Spandau 04 Club?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"germany\" WHERE \"club\"='spandau 04' AND \"height\"='m (ft 4in)' AND \"pos\"='d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Club of the Player with a Date of Birth of 1979-01-29?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"germany\" WHERE \"date_of_birth\"='1979-01-29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Weight of the Spandau 04 Player with a Height of m (ft 5in)?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"germany\" WHERE \"club\"='spandau 04' AND \"height\"='m (ft 5in)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is Spandau 04 Player Jens Pohlmann's Pos.?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"germany\" WHERE \"club\"='spandau 04' AND \"name\"='jens pohlmann';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which play is from Ireland?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"country\"='ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which country is Howard Clark from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"player\"='howard clark';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_by_country\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the most silver medals won among nations that won more than 40 medals total, less than 25 of them being gold, and more than 15 of them being bronze?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medals_by_country\" WHERE \"total\">40 AND \"gold\"<25 AND \"bronze\">15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Of the 1978 winners, who had finish totals smaller than 292?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\"<292 AND \"year_s_won\"='1978';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What were the finishes by David Graham with totals lower than 292?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\"=292 AND \"player\"='david graham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is Australia\u00b4s finish?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What is the name of the church that is located in flor\u00f8?"
},
{
"role": "assistant",
"content": "SELECT \"church_name\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='flor\u00f8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What is the name of the church that is located in eikefjord?"
},
{
"role": "assistant",
"content": "SELECT \"church_name\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='eikefjord';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: In which Parish (Prestegjeld) is the church called Stavang Kyrkje?"
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"churches_in_flora\" WHERE \"church_name\"='stavang kyrkje';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: What is the Sub-Parish (Sokn) that was built in 1957 in the location of Stavang?"
},
{
"role": "assistant",
"content": "SELECT \"sub_parish_sokn\" FROM \"churches_in_flora\" WHERE \"year_built\"='1957' AND \"location_of_the_church\"='stavang';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: In what year was the church located in flor\u00f8 built?"
},
{
"role": "assistant",
"content": "SELECT \"year_built\" FROM \"churches_in_flora\" WHERE \"location_of_the_church\"='flor\u00f8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"churches_in_flora\" (\n \"parish_prestegjeld\" text,\n \"sub_parish_sokn\" text,\n \"church_name\" text,\n \"year_built\" text,\n \"location_of_the_church\" text\n);\n\nQuestion: Which Parish (Prestegjeld) was built in 1907?"
},
{
"role": "assistant",
"content": "SELECT \"parish_prestegjeld\" FROM \"churches_in_flora\" WHERE \"year_built\"='1907';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_prominence_peaks\" (\n \"mountain_peak\" text,\n \"height_metres\" real,\n \"prominence_metres\" real,\n \"height_feet\" real,\n \"prominence_feet\" real\n);\n\nQuestion: What's the height in feet of Mount Queen Bess with a height in metres less than 3298 and a prominence in feet of more than 7,126?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"height_feet\") FROM \"high_prominence_peaks\" WHERE \"prominence_feet\">'7,126' AND \"mountain_peak\"='mount queen bess' AND \"height_metres\"<3298;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_prominence_peaks\" (\n \"mountain_peak\" text,\n \"height_metres\" real,\n \"prominence_metres\" real,\n \"height_feet\" real,\n \"prominence_feet\" real\n);\n\nQuestion: What's the total number of prominence in metres when the prominence is 7,356 ft and less than 2692 metres in height?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prominence_metres\") FROM \"high_prominence_peaks\" WHERE \"prominence_feet\"='7,356' AND \"height_metres\"<2692;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"high_prominence_peaks\" (\n \"mountain_peak\" text,\n \"height_metres\" real,\n \"prominence_metres\" real,\n \"height_feet\" real,\n \"prominence_feet\" real\n);\n\nQuestion: What's the total number of prominence in metres of Otter Mountain with a height of less than 2692 metres and taller than 11,663 ft?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"prominence_metres\") FROM \"high_prominence_peaks\" WHERE \"height_feet\">'11,663' AND \"mountain_peak\"='otter mountain' AND \"height_metres\"<2692;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: What's the average year that sara orlesky and farhan lalji are the sideline reporters?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"2000s\" WHERE \"sideline_reporters\"='sara orlesky and farhan lalji';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on september 29?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance on september 8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='september 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has a Result of l 10\u201330, and an Attendance larger than 57,312?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 10\u201330' AND \"attendance\">'57,312';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.