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 \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Inclination has Eccentricity of 0.06 +0.06 \u22120.11?"
},
{
"role": "assistant",
"content": "SELECT \"inclination\" FROM \"the_hd_40307_system\" WHERE \"eccentricity\"='0.06 +0.06 \u22120.11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Companion (in order from star) has an Orbital period (s day) of 9.6184 +0.0050 \u22120.0049?"
},
{
"role": "assistant",
"content": "SELECT \"companion_in_order_from_star\" FROM \"the_hd_40307_system\" WHERE \"orbital_period_s_day\"='9.6184 +0.0050 \u22120.0049';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Inclination has a Mass of \u2265 6.6 +1.1 \u22121.0 m\u2295?"
},
{
"role": "assistant",
"content": "SELECT \"inclination\" FROM \"the_hd_40307_system\" WHERE \"mass\"='\u2265 6.6 +1.1 \u22121.0 m\u2295';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Semimajor axis (AU) has a Companion (in order from star) of g?"
},
{
"role": "assistant",
"content": "SELECT \"semimajor_axis_au\" FROM \"the_hd_40307_system\" WHERE \"companion_in_order_from_star\"='g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_hd_40307_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What Semimajor axis (AU) has a Mass of \u2265 3.5 \u00b1 1.4 m\u2295?"
},
{
"role": "assistant",
"content": "SELECT \"semimajor_axis_au\" FROM \"the_hd_40307_system\" WHERE \"mass\"='\u2265 3.5 \u00b1 1.4 m\u2295';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_race_wins_in_a_single_season\" (\n \"country\" text,\n \"season\" text,\n \"victories\" real,\n \"downhill\" text,\n \"super_g\" text,\n \"giant_slalom\" real,\n \"slalom\" text,\n \"combined\" text\n);\n\nQuestion: What Slalom was Switzerland in?"
},
{
"role": "assistant",
"content": "SELECT \"slalom\" FROM \"most_race_wins_in_a_single_season\" WHERE \"country\"='switzerland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"software_updates\" (\n \"device\" text,\n \"carrier\" text,\n \"package_version\" text,\n \"applications\" text,\n \"software_platform\" text\n);\n\nQuestion: WHAT IS THE PACKAGE VERSION WITH TELUS MOBILITY?"
},
{
"role": "assistant",
"content": "SELECT \"package_version\" FROM \"software_updates\" WHERE \"carrier\"='telus mobility';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"software_updates\" (\n \"device\" text,\n \"carrier\" text,\n \"package_version\" text,\n \"applications\" text,\n \"software_platform\" text\n);\n\nQuestion: WHAT IS THE PACKAGE VERSION FOR blackberry storm 9530, APPLICATION 5.0.0.419, AND MTS MOBILITY?"
},
{
"role": "assistant",
"content": "SELECT \"package_version\" FROM \"software_updates\" WHERE \"device\"='blackberry storm 9530' AND \"applications\"='5.0.0.419' AND \"carrier\"='mts mobility';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"software_updates\" (\n \"device\" text,\n \"carrier\" text,\n \"package_version\" text,\n \"applications\" text,\n \"software_platform\" text\n);\n\nQuestion: WHAT IS THE CARRIER WITH 5.0.0.742 VERSION?"
},
{
"role": "assistant",
"content": "SELECT \"carrier\" FROM \"software_updates\" WHERE \"package_version\"='5.0.0.742';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"software_updates\" (\n \"device\" text,\n \"carrier\" text,\n \"package_version\" text,\n \"applications\" text,\n \"software_platform\" text\n);\n\nQuestion: WHAT IS THE CARRIER FOR 4.7.0.208 VERSION?"
},
{
"role": "assistant",
"content": "SELECT \"carrier\" FROM \"software_updates\" WHERE \"package_version\"='4.7.0.208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"software_updates\" (\n \"device\" text,\n \"carrier\" text,\n \"package_version\" text,\n \"applications\" text,\n \"software_platform\" text\n);\n\nQuestion: WHAT IS THE DEVICE WITH MTS MOBILITY?"
},
{
"role": "assistant",
"content": "SELECT \"device\" FROM \"software_updates\" WHERE \"carrier\"='mts mobility';"
}
]
|
[
{
"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 was there when the to par was 15?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"money\") FROM \"final_leaderboard\" WHERE \"to_par\"=15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models_except_north_america_and_japan\" (\n \"chassis_code\" text,\n \"years\" text,\n \"model\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What are the years for the 250 model?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"models_except_north_america_and_japan\" WHERE \"model\"='250';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models_except_north_america_and_japan\" (\n \"chassis_code\" text,\n \"years\" text,\n \"model\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the power of the Chassis code w123.130?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"models_except_north_america_and_japan\" WHERE \"chassis_code\"='w123.130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models_except_north_america_and_japan\" (\n \"chassis_code\" text,\n \"years\" text,\n \"model\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What Engine does the w123.026 chassis have?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"models_except_north_america_and_japan\" WHERE \"chassis_code\"='w123.026';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"models_except_north_america_and_japan\" (\n \"chassis_code\" text,\n \"years\" text,\n \"model\" text,\n \"engine\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What Chassis code has a 200d model and a Power of ps (kw; hp) @ 4200?"
},
{
"role": "assistant",
"content": "SELECT \"chassis_code\" FROM \"models_except_north_america_and_japan\" WHERE \"power\"='ps (kw; hp) @ 4200' AND \"model\"='200d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the height in ft and m of the regions bank building?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='regions bank building';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the street address of the van antwerp building?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='van antwerp building';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the hight in ft and m of the building with less than 11 floors?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the against when the opposing team is Italy?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"2004\" WHERE \"opposing_teams\"='italy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"name\" text,\n \"confederation\" text,\n \"international_goals\" real,\n \"caps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: What is Cha Bum-Kun's average number of goals per match?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_per_match\") FROM \"notes\" WHERE \"name\"='cha bum-kun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"name\" text,\n \"confederation\" text,\n \"international_goals\" real,\n \"caps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: How many caps does Jon Dahl Tomasson, who has less than 0.46 goals per match, have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"caps\") FROM \"notes\" WHERE \"name\"='jon dahl tomasson' AND \"goals_per_match\"<0.46;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_information\" (\n \"club\" text,\n \"season_s_last_head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2004_2005_season\" text\n);\n\nQuestion: What is the club from Vila Do Conde?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"club_information\" WHERE \"city\"='vila do conde';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_information\" (\n \"club\" text,\n \"season_s_last_head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2004_2005_season\" text\n);\n\nQuestion: What is the stadium for the team that was 6th in the liga in the 2004-2005 season?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"club_information\" WHERE \"2004_2005_season\"='6th in the liga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_information\" (\n \"club\" text,\n \"season_s_last_head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2004_2005_season\" text\n);\n\nQuestion: What is the stadium for the city of Braga?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"club_information\" WHERE \"city\"='braga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: In what round was Kelsey Tessier drafted?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"player\"='kelsey tessier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Local Mission, when Mission is \"Mauritius\"?"
},
{
"role": "assistant",
"content": "SELECT \"local_mission\" FROM \"non_resident_heads_of_missions\" WHERE \"mission\"='mauritius';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Local Position, when Mission is \"Paraguay\"?"
},
{
"role": "assistant",
"content": "SELECT \"local_position\" FROM \"non_resident_heads_of_missions\" WHERE \"mission\"='paraguay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Local Location, when Local Position is \"Ambassador\", when Non-Resident Head of Mission is \"Marina Isabel C\u00e1ceres de Est\u00e9vez\", and when Mission is \"Finland\"?"
},
{
"role": "assistant",
"content": "SELECT \"local_location\" FROM \"non_resident_heads_of_missions\" WHERE \"local_position\"='ambassador' AND \"non_resident_head_of_mission\"='marina isabel c\u00e1ceres de est\u00e9vez' AND \"mission\"='finland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Non-Resident Head of Mission, when Local Location is \"Warsaw\", and when Mission is \"Poland\"?"
},
{
"role": "assistant",
"content": "SELECT \"non_resident_head_of_mission\" FROM \"non_resident_heads_of_missions\" WHERE \"local_location\"='warsaw' AND \"mission\"='poland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Local Location, when Resident Country is \"Belgium\", and when Mission is \"Poland\"?"
},
{
"role": "assistant",
"content": "SELECT \"local_location\" FROM \"non_resident_heads_of_missions\" WHERE \"resident_country\"='belgium' AND \"mission\"='poland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_resident_heads_of_missions\" (\n \"mission\" text,\n \"resident_country\" text,\n \"local_location\" text,\n \"local_mission\" text,\n \"non_resident_head_of_mission\" text,\n \"local_position\" text\n);\n\nQuestion: What is Resident Country, when Local Location is \"Copenhagen\"?"
},
{
"role": "assistant",
"content": "SELECT \"resident_country\" FROM \"non_resident_heads_of_missions\" WHERE \"local_location\"='copenhagen';"
}
]
|
[
{
"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 Player, when Place is \"1\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='1';"
}
]
|
[
{
"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 Score, when Country is \"United States\", when Place is \"T3\", and when Player is \"Phil Blackmar\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t3' AND \"player\"='phil blackmar';"
}
]
|
[
{
"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 To Par, when Country is \"Australia\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='australia';"
}
]
|
[
{
"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 Score, when Player is \"Vijay Singh\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_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 \"wins_17_13\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What type of surface did they play on 23 October 2000?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_17_13\" WHERE \"date\"='23 october 2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_17_13\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What type of surface did they play on 21 July 1997"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_17_13\" WHERE \"date\"='21 july 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_17_13\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: what was the score of the Championship match played in Estoril, Portugal?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"wins_17_13\" WHERE \"championship\"='estoril, portugal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_17_13\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the name of the opponent Tommy Haas played in the Championship?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"wins_17_13\" WHERE \"opponent_in_the_final\"='tommy haas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_17_13\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the score of the match played on 18 January 1999?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"wins_17_13\" WHERE \"date\"='18 january 1999';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opponent\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What season has roma as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"european_record\" WHERE \"opponent\"='roma';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_raiding_cruise\" (\n \"date\" text,\n \"ship_name\" text,\n \"tonnage\" real,\n \"ship_type\" text,\n \"location\" text,\n \"disposition_of_ship\" text\n);\n\nQuestion: What is the Ship Type of the Prize Disposition of ship and a tonnage less than 151?"
},
{
"role": "assistant",
"content": "SELECT \"ship_type\" FROM \"first_raiding_cruise\" WHERE \"disposition_of_ship\"='prize' AND \"tonnage\"<151;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_raiding_cruise\" (\n \"date\" text,\n \"ship_name\" text,\n \"tonnage\" real,\n \"ship_type\" text,\n \"location\" text,\n \"disposition_of_ship\" text\n);\n\nQuestion: What is the highest tonnage of the Brig Ship Type and the disposition of Ship of Prize?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tonnage\") FROM \"first_raiding_cruise\" WHERE \"ship_type\"='brig' AND \"disposition_of_ship\"='prize';"
}
]
|
[
{
"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: What's the to par for england when the score is less than 71?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"country\"='england' AND \"score\"<71;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"team\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985_1986\" real,\n \"total_points\" real,\n \"seasons\" real,\n \"points_average\" real\n);\n\nQuestion: What is the lowest total for 1985-1986 when the total points are 124?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1985_1986\") FROM \"relegation_table\" WHERE \"total_points\"=124;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: Which Year born (Age) has a Current Club of sporting al riyadi beirut, and a Position of pf?"
},
{
"role": "assistant",
"content": "SELECT \"year_born_age\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"current_club\"='sporting al riyadi beirut' AND \"position\"='pf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: Which Current Club has a Player of bassem balaa?"
},
{
"role": "assistant",
"content": "SELECT \"current_club\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"player\"='bassem balaa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: What was the round in 1968?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"men\" WHERE \"year\"=1968;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: What is the round for a year earlier than 1987?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"men\" WHERE \"year\"<1987;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: What is the round when Grand Slam was the Davis Cup?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"men\" WHERE \"grand_slam\"='davis cup';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"year\" real,\n \"grand_slam\" text,\n \"round\" text,\n \"winner\" text,\n \"loser\" text\n);\n\nQuestion: What is the grand slam in 1987, when round shows first round, and Ivan Lendl won?"
},
{
"role": "assistant",
"content": "SELECT \"grand_slam\" FROM \"men\" WHERE \"year\"=1987 AND \"round\"='first round' AND \"winner\"='ivan lendl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mexico_under_20_managers\" (\n \"manager\" text,\n \"mexico_career\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"win_pct\" real\n);\n\nQuestion: What is the highes win % that manager juan carlos ch\u00e1vez's team had when they lost less than 4 times?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"win_pct\") FROM \"mexico_under_20_managers\" WHERE \"manager\"='juan carlos ch\u00e1vez' AND \"lost\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: In which district is the incumbent a republican first elected in 1998?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"north_carolina\" WHERE \"party\"='republican' AND \"first_elected\"=1998;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"north_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the party affiliation of Virginia Foxx?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"north_carolina\" WHERE \"incumbent\"='virginia foxx';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is Event, when Winning Driver is \"Laurent Aiello Laurent Aiello\", when Round is greater than 1, and when Circuit is \"Wunstorf\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"race_calendar_and_winners\" WHERE \"winning_driver\"='laurent aiello laurent aiello' AND \"round\">1 AND \"circuit\"='wunstorf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is Date, when Round is \"2\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar_and_winners\" WHERE \"round\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is Event, when Round is \"10\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"race_calendar_and_winners\" WHERE \"round\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar_and_winners\" (\n \"round\" real,\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"event\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is Date, when Round is less than 10, and when Circuit is \"Norisring\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar_and_winners\" WHERE \"round\"<10 AND \"circuit\"='norisring';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest goal difference of the club with more than 34 played?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goal_difference\") FROM \"group_ii\" WHERE \"played\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of points of the club with a goal difference greater than 17 and more than 34 played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"group_ii\" WHERE \"goal_difference\">17 AND \"played\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest goal difference of club real betis, who has less than 18 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goal_difference\") FROM \"group_ii\" WHERE \"club\"='real betis' AND \"wins\"<18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the sum of the points of the club with more than 34 played?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"group_ii\" WHERE \"played\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest number played of the club with more than 15 wins and less than 42 goals against?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"group_ii\" WHERE \"wins\">15 AND \"goals_against\"<42;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of wins of the club with a goal difference less than 21, 4 draws, and less than 21 losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"group_ii\" WHERE \"goal_difference\"<21 AND \"draws\"=4 AND \"losses\"<21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_and_draw_dates\" (\n \"phase\" text,\n \"round\" text,\n \"draw_date\" text,\n \"first_leg\" text,\n \"second_leg\" text\n);\n\nQuestion: What is the round for the qualifying phase with a draw date on 16 July 2010?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"round_and_draw_dates\" WHERE \"phase\"='qualifying' AND \"draw_date\"='16 july 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Jack Nicklaus finished in what place?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_both_cuts\" WHERE \"player\"='jack nicklaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\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 year (s) won was +2 the To par, and t22 the finish?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_both_cuts\" WHERE \"to_par\"='+2' AND \"finish\"='t22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Lee Trevino of the United States with a total greater than 294 had what To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_both_cuts\" WHERE \"total\">294 AND \"country\"='united states' AND \"player\"='lee trevino';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: The golfer from Spain with a total less than 294 won in what year (s)?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_both_cuts\" WHERE \"total\"<294 AND \"country\"='spain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 Nationality has a Pick # smaller than 130 and a Player of tyler bunz? Question 1"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_five\" WHERE \"pick_num\"<130 AND \"player\"='tyler bunz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 League from has a Player of louis domingue?"
},
{
"role": "assistant",
"content": "SELECT \"league_from\" FROM \"round_five\" WHERE \"player\"='louis domingue';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 League from has a NHL team of san jose sharks (from carolina) 3?"
},
{
"role": "assistant",
"content": "SELECT \"league_from\" FROM \"round_five\" WHERE \"nhl_team\"='san jose sharks (from carolina) 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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: Name the Nationality of s\u00f6dert\u00e4lje sk?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_five\" WHERE \"team_from\"='s\u00f6dert\u00e4lje sk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 Team has a Pick # of 148?"
},
{
"role": "assistant",
"content": "SELECT \"team_from\" FROM \"round_five\" WHERE \"pick_num\"=148;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 team has a League from of ontario hockey league, and a Player of tony dehart?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_five\" WHERE \"league_from\"='ontario hockey league' AND \"player\"='tony dehart';"
}
]
|
[
{
"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 T4 Place Player Nick Price's Money?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"place\"='t4' AND \"player\"='nick price';"
}
]
|
[
{
"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 To par of the Place 1 Player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"place\"='1';"
}
]
|
[
{
"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 Player's Score is 69-68-66-70=273?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"score\"='69-68-66-70=273';"
}
]
|
[
{
"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 Player's To par is \u22126?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"to_par\"='\u22126';"
}
]
|
[
{
"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: What is the height of the the building ranked 13= with fewer than 28 floors?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"tallest_buildings\" WHERE \"rank\"='13=' AND \"floors\"<28;"
}
]
|
[
{
"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\" real,\n \"to_par\" real\n);\n\nQuestion: Which Country has a To par larger than 3, and a Year(s) won of 1979? Question 1"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\">3 AND \"year_s_won\"='1979';"
}
]
|
[
{
"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\" real,\n \"to_par\" real\n);\n\nQuestion: Which To par has a Country of australia, and a Year(s) won of 1990?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"to_par\") FROM \"missed_the_cut\" WHERE \"country\"='australia' AND \"year_s_won\"='1990';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: Which city is in Cantabria?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1979\" WHERE \"province\"='cantabria';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: What is the name of the city with the Socialist Party of the Extremadurian People?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1979\" WHERE \"name_in_english\"='socialist party of the extremadurian people';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: Which province has the partido Socialista del Pueblo Extreme\u00f1o party?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"1979\" WHERE \"party\"='partido socialista del pueblo extreme\u00f1o';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: When was the Partido radical party in Madrid registered?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_registration\" FROM \"1979\" WHERE \"province\"='madrid' AND \"party\"='partido radical';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: Which province is Pamplona located in?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"1979\" WHERE \"city\"='pamplona';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1979\" (\n \"party\" text,\n \"name_in_english\" text,\n \"city\" text,\n \"province\" text,\n \"date_of_registration\" text\n);\n\nQuestion: On what date was the Canarian Workers Socialist Union registered?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_registration\" FROM \"1979\" WHERE \"name_in_english\"='canarian workers socialist union';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest rank of Hungary where there was a total of 8 medals, including 2 silver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"medal_count\" WHERE \"total\"=8 AND \"nation\"='hungary' AND \"silver\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest rank of Great Britain who has less than 16 bronze?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"medal_count\" WHERE \"nation\"='great britain' AND \"bronze\"<16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"americas\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What was the injured entry for the row with a killed entry of 29?"
},
{
"role": "assistant",
"content": "SELECT \"injured\" FROM \"americas\" WHERE \"killed\"='29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"americas\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What location has a killed of 100.9, and a year later than 1993?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"americas\" WHERE \"year\">1993 AND \"killed\"='100.9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"americas\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What was the injured entry for Venezuela?"
},
{
"role": "assistant",
"content": "SELECT \"injured\" FROM \"americas\" WHERE \"country\"='venezuela';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" real,\n \"timeslot_edt\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" real,\n \"18_49_average\" real\n);\n\nQuestion: Which season had a season finale of May 13, 2012?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"season_ratings\" WHERE \"season_finale\"='may 13, 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_ratings\" (\n \"season\" real,\n \"timeslot_edt\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"viewers_in_millions\" real,\n \"18_49_average\" real\n);\n\nQuestion: How many viewers (in millions) were there for the season premiere on September 26, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_in_millions\" FROM \"season_ratings\" WHERE \"season_premiere\"='september 26, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_ballroom_dancing_competition\" (\n \"date\" text,\n \"round\" real,\n \"pair\" text,\n \"ages\" text,\n \"dance\" text,\n \"song\" text\n);\n\nQuestion: How old were Mitchell & Jessica when they danced the Cha-Cha-Cha?"
},
{
"role": "assistant",
"content": "SELECT \"ages\" FROM \"junior_ballroom_dancing_competition\" WHERE \"dance\"='cha-cha-cha' AND \"pair\"='mitchell & jessica';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_ballroom_dancing_competition\" (\n \"date\" text,\n \"round\" real,\n \"pair\" text,\n \"ages\" text,\n \"dance\" text,\n \"song\" text\n);\n\nQuestion: Who danced the Cha-Cha-Cha on November 18, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"pair\" FROM \"junior_ballroom_dancing_competition\" WHERE \"dance\"='cha-cha-cha' AND \"date\"='november 18, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_ballroom_dancing_competition\" (\n \"date\" text,\n \"round\" real,\n \"pair\" text,\n \"ages\" text,\n \"dance\" text,\n \"song\" text\n);\n\nQuestion: Who danced the Samba on October 14, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"pair\" FROM \"junior_ballroom_dancing_competition\" WHERE \"date\"='october 14, 2008' AND \"dance\"='samba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wha\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: What was the pic for Canada for player Yvon Bouillon earlier than 1974?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"wha\" WHERE \"nationality\"='canada' AND \"year\"<1974 AND \"player\"='yvon bouillon';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.