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 \"table1_20246201_9\" (\n \"candidate\" text,\n \"office\" text,\n \"home_state\" text,\n \"popular_vote\" real,\n \"states_first_place\" real,\n \"states_second_place\" real,\n \"states_third_place\" text\n);\n\nQuestion: How many different popular vote counts were there for the candidate Rick Perry?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"popular_vote\") FROM \"table1_20246201_9\" WHERE \"candidate\"='Rick Perry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20246201_9\" (\n \"candidate\" text,\n \"office\" text,\n \"home_state\" text,\n \"popular_vote\" real,\n \"states_first_place\" real,\n \"states_second_place\" real,\n \"states_third_place\" text\n);\n\nQuestion: Which office has 1 New Hampshire as a third place state?"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"table1_20246201_9\" WHERE \"states_third_place\"='1 New Hampshire';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20246201_9\" (\n \"candidate\" text,\n \"office\" text,\n \"home_state\" text,\n \"popular_vote\" real,\n \"states_first_place\" real,\n \"states_second_place\" real,\n \"states_third_place\" text\n);\n\nQuestion: How many different popular vote counts are there for Rick Perry?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"popular_vote\") FROM \"table1_20246201_9\" WHERE \"candidate\"='Rick Perry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20246201_9\" (\n \"candidate\" text,\n \"office\" text,\n \"home_state\" text,\n \"popular_vote\" real,\n \"states_first_place\" real,\n \"states_second_place\" real,\n \"states_third_place\" text\n);\n\nQuestion: What office is Jon Huntsman a candidate for?"
},
{
"role": "assistant",
"content": "SELECT \"office\" FROM \"table1_20246201_9\" WHERE \"candidate\"='Jon Huntsman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20246201_9\" (\n \"candidate\" text,\n \"office\" text,\n \"home_state\" text,\n \"popular_vote\" real,\n \"states_first_place\" real,\n \"states_second_place\" real,\n \"states_third_place\" text\n);\n\nQuestion: How many states-first place are there for the office of Governor?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"states_first_place\") FROM \"table1_20246201_9\" WHERE \"office\"='Governor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"post_war_1946_1974\" (\n \"date\" text,\n \"venue\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"competition\" text,\n \"winner\" text,\n \"head_to_head\" text\n);\n\nQuestion: Name the competition for australia 13, new zealand 40, drawn 3"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"post_war_1946_1974\" WHERE \"head_to_head\"='Australia 13, New Zealand 40, Drawn 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2026548_1\" (\n \"rank_by_time_in_office\" real,\n \"order_in_office\" real,\n \"vice_president\" text,\n \"length_of_term_in_days\" real,\n \"explanation\" text\n);\n\nQuestion: Name the explanation by rank is 10"
},
{
"role": "assistant",
"content": "SELECT \"explanation\" FROM \"table1_2026548_1\" WHERE \"rank_by_time_in_office\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2026548_1\" (\n \"rank_by_time_in_office\" real,\n \"order_in_office\" real,\n \"vice_president\" text,\n \"length_of_term_in_days\" real,\n \"explanation\" text\n);\n\nQuestion: Name the order in office for spiro agnew"
},
{
"role": "assistant",
"content": "SELECT \"order_in_office\" FROM \"table1_2026548_1\" WHERE \"vice_president\"='Spiro Agnew';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2026548_1\" (\n \"rank_by_time_in_office\" real,\n \"order_in_office\" real,\n \"vice_president\" text,\n \"length_of_term_in_days\" real,\n \"explanation\" text\n);\n\nQuestion: Name the explanation for alben w. barkley"
},
{
"role": "assistant",
"content": "SELECT \"explanation\" FROM \"table1_2026548_1\" WHERE \"vice_president\"='Alben W. Barkley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What percentage of people voted for Obama in Burlington?"
},
{
"role": "assistant",
"content": "SELECT \"obama_pct\" FROM \"by_county\" WHERE \"county\"='Burlington';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What percentage of voters choise McCain in Burlington?"
},
{
"role": "assistant",
"content": "SELECT \"mc_cain_pct\" FROM \"by_county\" WHERE \"county\"='Burlington';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What percentage of voters voted for a third party in the county that had 802 third party voters?"
},
{
"role": "assistant",
"content": "SELECT \"others_pct\" FROM \"by_county\" WHERE \"others_num\"=802;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What percentage of voters chose McCain in the county where 1.1% of voters voted third party?"
},
{
"role": "assistant",
"content": "SELECT \"mc_cain_pct\" FROM \"by_county\" WHERE \"others_pct\"='1.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What percentage of voters chose McCain in the county where 2.1% of voters voted third party?"
},
{
"role": "assistant",
"content": "SELECT \"mc_cain_pct\" FROM \"by_county\" WHERE \"others_pct\"='2.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obama_pct\" text,\n \"obama_num\" real,\n \"mc_cain_pct\" text,\n \"mc_cain_num\" real,\n \"others_pct\" text,\n \"others_num\" real\n);\n\nQuestion: What county had 915 third party voters?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"others_num\"=915;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the ply (uk, nz, au) for fingering "
},
{
"role": "assistant",
"content": "SELECT \"ply_uk_nz_au\" FROM \"table1_20297668_1\" WHERE \"yarn_type_us\"='Fingering';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the wraps per inch for 120-240"
},
{
"role": "assistant",
"content": "SELECT \"wraps_per_inch_wpi\" FROM \"table1_20297668_1\" WHERE \"m_100g\"='120-240';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the ply uk, nz, au for wraps per inch 7 wpi"
},
{
"role": "assistant",
"content": "SELECT \"ply_uk_nz_au\" FROM \"table1_20297668_1\" WHERE \"wraps_per_inch_wpi\"='7 wpi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the yarn type for standard yarn weight system for 3 or light"
},
{
"role": "assistant",
"content": "SELECT \"yarn_type_us\" FROM \"table1_20297668_1\" WHERE \"standard_yarn_weight_system\"='3 or Light';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the standard yarn weight system for 7 wpi"
},
{
"role": "assistant",
"content": "SELECT \"standard_yarn_weight_system\" FROM \"table1_20297668_1\" WHERE \"wraps_per_inch_wpi\"='7 wpi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20297668_1\" (\n \"standard_yarn_weight_system\" text,\n \"yarn_type_us\" text,\n \"ply_uk_nz_au\" text,\n \"m_100g\" text,\n \"wraps_per_inch_wpi\" text\n);\n\nQuestion: Name the standard yarn weight system for 9 wpi"
},
{
"role": "assistant",
"content": "SELECT \"standard_yarn_weight_system\" FROM \"table1_20297668_1\" WHERE \"wraps_per_inch_wpi\"='9 wpi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kuopio\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" text,\n \"2nd_m\" text,\n \"points\" text,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Name the overall nt points for 2nd m 127.5"
},
{
"role": "assistant",
"content": "SELECT \"overall_nt_points\" FROM \"kuopio\" WHERE \"2nd_m\"='127.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oberstdorf\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" text,\n \"2nd_m\" text,\n \"points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: when 1st (m) is 218.0, what were all of the over wc points (rank)?"
},
{
"role": "assistant",
"content": "SELECT \"overall_wc_points_rank\" FROM \"oberstdorf\" WHERE \"1st_m\"='218.0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oberstdorf\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" text,\n \"2nd_m\" text,\n \"points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: when 1st (m) is 212.5 what are the overall wc points (rank)?"
},
{
"role": "assistant",
"content": "SELECT \"overall_wc_points_rank\" FROM \"oberstdorf\" WHERE \"1st_m\"='212.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details\" (\n \"lms_1932_3_no\" real,\n \"lms_1946_no\" real,\n \"br_no\" real,\n \"date_built\" text,\n \"date_motor_gear_fitted\" text,\n \"withdrawn\" text\n);\n\nQuestion: When was the motor gear of the LMS 1946 no. 1901 model fitted?"
},
{
"role": "assistant",
"content": "SELECT \"date_motor_gear_fitted\" FROM \"details\" WHERE \"lms_1946_no\"=1901;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: how many matches did wayne mardle play"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"statistics\" WHERE \"player\"='Wayne Mardle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: what is the 3-dart average of raymond van barneveld"
},
{
"role": "assistant",
"content": "SELECT \"3_dart_average\" FROM \"statistics\" WHERE \"player\"='Raymond van Barneveld';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_championships\" (\n \"season\" real,\n \"division\" text,\n \"coach\" text,\n \"overall_record\" text,\n \"conference_record\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many different results are there for the season with a 4-3 conference record?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"division_championships\" WHERE \"conference_record\"='4-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_championships\" (\n \"season\" real,\n \"division\" text,\n \"coach\" text,\n \"overall_record\" text,\n \"conference_record\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who coached the team in the season with a 6-1 conference record?"
},
{
"role": "assistant",
"content": "SELECT \"coach\" FROM \"division_championships\" WHERE \"conference_record\"='6-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_championships\" (\n \"season\" real,\n \"division\" text,\n \"coach\" text,\n \"overall_record\" text,\n \"conference_record\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many different conference records are there for season 2006?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"conference_record\") FROM \"division_championships\" WHERE \"season\"=2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_championships\" (\n \"season\" real,\n \"division\" text,\n \"coach\" text,\n \"overall_record\" text,\n \"conference_record\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How did the season with 7-2 conference record ed?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"division_championships\" WHERE \"conference_record\"='7-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"division_championships\" (\n \"season\" real,\n \"division\" text,\n \"coach\" text,\n \"overall_record\" text,\n \"conference_record\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In what season was the conference record 4-3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"division_championships\" WHERE \"conference_record\"='4-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"mister_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of third place runners up held by any of the countries competing in the Mr. International competition?. "
},
{
"role": "assistant",
"content": "SELECT MAX(\"3rd_runner_up\") FROM \"by_country_tally\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"mister_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: The country, competing in the Mr. International competition, that holds a rank of 3, has how many 2nd runners up?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2nd_runner_up\") FROM \"by_country_tally\" WHERE \"rank\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"mister_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: For the country that holds a rank of 2, in the Mr. International Competition, what is the total number of competitors listed as 2nd runner ups?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2nd_runner_up\") FROM \"by_country_tally\" WHERE \"rank\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"mister_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many competitors in total, for the Mr. International competition, does Brazil have? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"by_country_tally\" WHERE \"country_territory\"='Brazil';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: How many games did the player with 3-dart average of 66.86 play?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"women_s\" WHERE \"3_dart_average\"='66.86';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: What's the 100+ score of the player with 6 won legs?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"100\") FROM \"women_s\" WHERE \"legs_won\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: What player has a 3-dart average of 75.76?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"women_s\" WHERE \"3_dart_average\"='75.76';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: What's Trina Gulliver's high checkout?"
},
{
"role": "assistant",
"content": "SELECT \"high_checkout\" FROM \"women_s\" WHERE \"player\"='Trina Gulliver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"player\" text,\n \"played\" real,\n \"sets_won\" real,\n \"sets_lost\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: How many legs has the player with high checkout of 80 won?"
},
{
"role": "assistant",
"content": "SELECT \"legs_won\" FROM \"women_s\" WHERE \"high_checkout\"=80;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kollam_era_calendar\" (\n \"malayalam_name\" text,\n \"transliteration\" text,\n \"concurrent_gregorian_months\" text,\n \"sanskrit_word_and_meaning\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: Name the sanskrit word and meaning for aquarius"
},
{
"role": "assistant",
"content": "SELECT \"sanskrit_word_and_meaning\" FROM \"kollam_era_calendar\" WHERE \"zodiac_sign\"='Aquarius';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kollam_era_calendar\" (\n \"malayalam_name\" text,\n \"transliteration\" text,\n \"concurrent_gregorian_months\" text,\n \"sanskrit_word_and_meaning\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: Name the zodiac for \u0d15\u0d28\u0d4d\u0d28\u0d3f"
},
{
"role": "assistant",
"content": "SELECT \"zodiac_sign\" FROM \"kollam_era_calendar\" WHERE \"malayalam_name\"='\u0d15\u0d28\u0d4d\u0d28\u0d3f';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kollam_era_calendar\" (\n \"malayalam_name\" text,\n \"transliteration\" text,\n \"concurrent_gregorian_months\" text,\n \"sanskrit_word_and_meaning\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: Name the malayalam name for leo"
},
{
"role": "assistant",
"content": "SELECT \"malayalam_name\" FROM \"kollam_era_calendar\" WHERE \"zodiac_sign\"='Leo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kollam_era_calendar\" (\n \"malayalam_name\" text,\n \"transliteration\" text,\n \"concurrent_gregorian_months\" text,\n \"sanskrit_word_and_meaning\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: Name the transliteration for \u0d1a\u0d3f\u0d19\u0d4d\u0d19\u0d02"
},
{
"role": "assistant",
"content": "SELECT \"transliteration\" FROM \"kollam_era_calendar\" WHERE \"malayalam_name\"='\u0d1a\u0d3f\u0d19\u0d4d\u0d19\u0d02';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: How many votes did McCain get in the county where Obama got 50.7% of the votes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mc_cainnum\") FROM \"by_county\" WHERE \"obamapct\"='50.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: Where did McCain get 20226 votes?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"mc_cainnum\"=20226;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: How many people voted in Cabarrus county?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"by_county\" WHERE \"county\"='Cabarrus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: How many different results were there for the number of votes fro Obama in the county where he got 27.8% of the votes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"obamanum\") FROM \"by_county\" WHERE \"obamapct\"='27.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20360535_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"television_order\" text\n);\n\nQuestion: How many episodes directed by ben jones and written by paul dini?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"table1_20360535_3\" WHERE \"directed_by\"='Ben Jones' AND \"written_by\"='Paul Dini';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20360535_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"television_order\" text\n);\n\nQuestion: What is the title of S02E01?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_20360535_3\" WHERE \"television_order\"='S02E01';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_20360535_3\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"television_order\" text\n);\n\nQuestion: What TV order is written by gail simone?"
},
{
"role": "assistant",
"content": "SELECT \"television_order\" FROM \"table1_20360535_3\" WHERE \"written_by\"='Gail Simone';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won mens doubles when zhou mi won womens singles"
},
{
"role": "assistant",
"content": "SELECT \"mens_doubles\" FROM \"past_winners\" WHERE \"womens_singles\"='Zhou Mi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won mixed doubles when zhou mi won womens singles"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"past_winners\" WHERE \"womens_singles\"='Zhou Mi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: state the earliest year li xuerui won womens singles"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"past_winners\" WHERE \"womens_singles\"='Li Xuerui';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: state the earliest year li xuerui won womens singles"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"past_winners\" WHERE \"womens_singles\"='Li Xuerui';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won womens doubles in 2010"
},
{
"role": "assistant",
"content": "SELECT \"womens_doubles\" FROM \"past_winners\" WHERE \"year\"=2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"mens_singles\" text,\n \"womens_singles\" text,\n \"mens_doubles\" text,\n \"womens_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won mixed doubles when wang yihan won womens singles"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"past_winners\" WHERE \"womens_singles\"='Wang Yihan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_parliamentary_parties\" (\n \"english_party_name\" text,\n \"norwegian_party_name\" text,\n \"associated_ideology\" text,\n \"current_leader\" text,\n \"international_affiliation\" text,\n \"2013_parliamentary_election\" text,\n \"county_councils_2011\" real\n);\n\nQuestion: How many county councils for the communist party of norway"
},
{
"role": "assistant",
"content": "SELECT MAX(\"county_councils_2011\") FROM \"non_parliamentary_parties\" WHERE \"english_party_name\"='Communist Party of Norway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_parliamentary_parties\" (\n \"english_party_name\" text,\n \"norwegian_party_name\" text,\n \"associated_ideology\" text,\n \"current_leader\" text,\n \"international_affiliation\" text,\n \"2013_parliamentary_election\" text,\n \"county_councils_2011\" real\n);\n\nQuestion: What percent of the parliamentary election did the pensioners party receive"
},
{
"role": "assistant",
"content": "SELECT \"2013_parliamentary_election\" FROM \"non_parliamentary_parties\" WHERE \"english_party_name\"='Pensioners Party';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_parliamentary_parties\" (\n \"english_party_name\" text,\n \"norwegian_party_name\" text,\n \"associated_ideology\" text,\n \"current_leader\" text,\n \"international_affiliation\" text,\n \"2013_parliamentary_election\" text,\n \"county_councils_2011\" real\n);\n\nQuestion: How many parties are named the Center Alliance"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2013_parliamentary_election\") FROM \"non_parliamentary_parties\" WHERE \"english_party_name\"='Center Alliance';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_locomotives\" (\n \"ltsr_no\" real,\n \"ltsr_name\" text,\n \"builder\" text,\n \"built\" real,\n \"mr_no\" real,\n \"lms_1930_no\" real,\n \"br_no\" real,\n \"withdrawn\" real\n);\n\nQuestion: Name the most withdrawn for 37 lstr no."
},
{
"role": "assistant",
"content": "SELECT MAX(\"withdrawn\") FROM \"list_of_locomotives\" WHERE \"ltsr_no\"=37;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: how many won 83 points for?"
},
{
"role": "assistant",
"content": "SELECT \"won\" FROM \"2008_2009_table\" WHERE \"points_for\"='83';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: which club is listed when bonus points is bonus points"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2008_2009_table\" WHERE \"bonus_points\"='Bonus Points';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: when the points for is 139 is points difference?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points_difference\") FROM \"2008_2009_table\" WHERE \"points_for\"='139';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: when points against is points again, which are the drawn?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"points_against\"='Points against';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: when points for is 39 what is the total number of drawn"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"points_for\"='39';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"mc_cain_num\" real,\n \"mc_cain_pct\" text,\n \"obama_num\" real,\n \"obama_pct\" text\n);\n\nQuestion: what is the mccain % where obama got 19.3%"
},
{
"role": "assistant",
"content": "SELECT \"mc_cain_pct\" FROM \"by_county\" WHERE \"obama_pct\"='19.3%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"mc_cain_num\" real,\n \"mc_cain_pct\" text,\n \"obama_num\" real,\n \"obama_pct\" text\n);\n\nQuestion: what is the highest mccain # where obama got 33.7%"
},
{
"role": "assistant",
"content": "SELECT MAX(\"mc_cain_num\") FROM \"by_county\" WHERE \"obama_pct\"='33.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"mc_cain_num\" real,\n \"mc_cain_pct\" text,\n \"obama_num\" real,\n \"obama_pct\" text\n);\n\nQuestion: where did obama get 39.8%"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"obama_pct\"='39.8%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"mc_cain_num\" real,\n \"mc_cain_pct\" text,\n \"obama_num\" real,\n \"obama_pct\" text\n);\n\nQuestion: what is the obama # in carson city"
},
{
"role": "assistant",
"content": "SELECT \"obama_num\" FROM \"by_county\" WHERE \"county\"='Carson City';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"mc_cain_num\" real,\n \"mc_cain_pct\" text,\n \"obama_num\" real,\n \"obama_pct\" text\n);\n\nQuestion: where did obama get 41.3%"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"obama_pct\"='41.3%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Name the number of season for team bruichladdich"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"career_summary\" WHERE \"team\"='Team Bruichladdich';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Name the least podiums for 49 points"
},
{
"role": "assistant",
"content": "SELECT MIN(\"podiums\") FROM \"career_summary\" WHERE \"points\"='49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Name the least f/laps"
},
{
"role": "assistant",
"content": "SELECT MIN(\"f_laps\") FROM \"career_summary\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Namet he season for wins being 0 and 20 races"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"career_summary\" WHERE \"wins\"=0 AND \"races\"=20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"f_laps\" real,\n \"podiums\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Name the least podiums for 0 wins and 2005 season for 321 points"
},
{
"role": "assistant",
"content": "SELECT MIN(\"podiums\") FROM \"career_summary\" WHERE \"wins\"=0 AND \"season\"=2005 AND \"points\"='321';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"spanish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Spanish title of the film whose title used in nomination was Ogu and Mampato in Rapa Nui? "
},
{
"role": "assistant",
"content": "SELECT \"spanish_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='Ogu and Mampato in Rapa Nui';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"spanish_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Who was the director of the film that was not nominated and had the Spanish title of play? "
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"result\"='Not Nominated' AND \"spanish_title\"='Play';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many couples have an average of 25.3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"couple\") FROM \"average_score_chart\" WHERE \"average\"='25.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: How many different numbers of total dances are there for the couple ranked at number 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_dances\") FROM \"average_score_chart\" WHERE \"place\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: What couple has an average of 17.2?"
},
{
"role": "assistant",
"content": "SELECT \"couple\" FROM \"average_score_chart\" WHERE \"average\"='17.2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: What's the minimal number of dances a couple has danced?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"number_of_dances\") FROM \"average_score_chart\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" text\n);\n\nQuestion: What's the highest number a couple has ranked at?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"place\") FROM \"average_score_chart\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_affected_and_damaged_in_bihar_due_\" (\n \"year\" real,\n \"district\" real,\n \"blocks\" real,\n \"panchayat\" real,\n \"village\" real,\n \"human_in_lakh\" text,\n \"animal_in_lakh\" text,\n \"total_area_in_lakh_ha\" text,\n \"cropped_area_in_lakh_ha\" text,\n \"crop_damaged_in_lakh_inr\" text,\n \"house_affected\" real,\n \"public_property_damaged_in_lakh_inr\" text\n);\n\nQuestion: How many crops were damaged when the public property damage was 1,03,049.60?"
},
{
"role": "assistant",
"content": "SELECT \"crop_damaged_in_lakh_inr\" FROM \"total_affected_and_damaged_in_bihar_due_\" WHERE \"public_property_damaged_in_lakh_inr\"='1,03,049.60';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_affected_and_damaged_in_bihar_due_\" (\n \"year\" real,\n \"district\" real,\n \"blocks\" real,\n \"panchayat\" real,\n \"village\" real,\n \"human_in_lakh\" text,\n \"animal_in_lakh\" text,\n \"total_area_in_lakh_ha\" text,\n \"cropped_area_in_lakh_ha\" text,\n \"crop_damaged_in_lakh_inr\" text,\n \"house_affected\" real,\n \"public_property_damaged_in_lakh_inr\" text\n);\n\nQuestion: What is the panchayat when the public property damage was 1,03,049.60"
},
{
"role": "assistant",
"content": "SELECT MAX(\"panchayat\") FROM \"total_affected_and_damaged_in_bihar_due_\" WHERE \"public_property_damaged_in_lakh_inr\"='1,03,049.60';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_affected_and_damaged_in_bihar_due_\" (\n \"year\" real,\n \"district\" real,\n \"blocks\" real,\n \"panchayat\" real,\n \"village\" real,\n \"human_in_lakh\" text,\n \"animal_in_lakh\" text,\n \"total_area_in_lakh_ha\" text,\n \"cropped_area_in_lakh_ha\" text,\n \"crop_damaged_in_lakh_inr\" text,\n \"house_affected\" real,\n \"public_property_damaged_in_lakh_inr\" text\n);\n\nQuestion: What is the largest village that had 103279 houses affected? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"village\") FROM \"total_affected_and_damaged_in_bihar_due_\" WHERE \"house_affected\"=103279;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_affected_and_damaged_in_bihar_due_\" (\n \"year\" real,\n \"district\" real,\n \"blocks\" real,\n \"panchayat\" real,\n \"village\" real,\n \"human_in_lakh\" text,\n \"animal_in_lakh\" text,\n \"total_area_in_lakh_ha\" text,\n \"cropped_area_in_lakh_ha\" text,\n \"crop_damaged_in_lakh_inr\" text,\n \"house_affected\" real,\n \"public_property_damaged_in_lakh_inr\" text\n);\n\nQuestion: What is the smallest district that had 33.25 in animals"
},
{
"role": "assistant",
"content": "SELECT MIN(\"district\") FROM \"total_affected_and_damaged_in_bihar_due_\" WHERE \"animal_in_lakh\"='33.25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_affected_and_damaged_in_bihar_due_\" (\n \"year\" real,\n \"district\" real,\n \"blocks\" real,\n \"panchayat\" real,\n \"village\" real,\n \"human_in_lakh\" text,\n \"animal_in_lakh\" text,\n \"total_area_in_lakh_ha\" text,\n \"cropped_area_in_lakh_ha\" text,\n \"crop_damaged_in_lakh_inr\" text,\n \"house_affected\" real,\n \"public_property_damaged_in_lakh_inr\" text\n);\n\nQuestion: How many districts had crib damage of 1,164.50?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"district\") FROM \"total_affected_and_damaged_in_bihar_due_\" WHERE \"crop_damaged_in_lakh_inr\"='1,164.50';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: Where did Obama get 37.1%?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"obamapct\"='37.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: What's the county where McCain got 60.6% and Obama got 37.3%?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"mc_cainpct\"='60.6%' AND \"obamapct\"='37.3%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: What's the number of McCain votes in the county where Obama got 35.7% and others got 1.9% of the votes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"mc_cainnum\") FROM \"by_county\" WHERE \"obamapct\"='35.7%' AND \"otherspct\"='1.9%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: How many votes did Obama get in Geauga?"
},
{
"role": "assistant",
"content": "SELECT \"obamanum\" FROM \"by_county\" WHERE \"county\"='Geauga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: How many people voted for others in the county where McCain got 65.5% of the votes?"
},
{
"role": "assistant",
"content": "SELECT \"others\" FROM \"by_county\" WHERE \"mc_cainpct\"='65.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: How many players had 6 180s?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"player\") FROM \"statistics\" WHERE \"180s\"=6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: How many 140+ did Gary Anderson have?"
},
{
"role": "assistant",
"content": "SELECT \"140\" FROM \"statistics\" WHERE \"player\"='Gary Anderson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: What is Phil Taylor's 3-dart average?"
},
{
"role": "assistant",
"content": "SELECT \"3_dart_average\" FROM \"statistics\" WHERE \"player\"='Phil Taylor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006_07\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Who is the guest 3 in the show where guest 4 is Jill Douglas?"
},
{
"role": "assistant",
"content": "SELECT \"guest_3\" FROM \"season_2006_07\" WHERE \"guest_4\"='Jill Douglas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006_07\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Who is the guest 2 in the episode where guest 4 is Iyare Igiehon and guest 3 is John Oliver?"
},
{
"role": "assistant",
"content": "SELECT \"guest_2\" FROM \"season_2006_07\" WHERE \"guest_4\"='Iyare Igiehon' AND \"guest_3\"='John Oliver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2006_07\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Who is the guest 1 in the episode where guest 4 is Jill Douglas?"
},
{
"role": "assistant",
"content": "SELECT \"guest_1\" FROM \"season_2006_07\" WHERE \"guest_4\"='Jill Douglas';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.