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 \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: How many Points were awarded to Sabahudin Kurt with a Draw is greater than 7?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"results\" WHERE \"draw\">7 AND \"artist\"='sabahudin kurt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_eastern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: How much Converted has a Number of 35, and a Withdrawn smaller than 1952?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"converted\") FROM \"great_eastern_section\" WHERE \"number\"='35' AND \"withdrawn\"<1952;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_eastern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: How much Withdrawn has a Number of 42, and a Previous Number(s) larger than 68178?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"withdrawn\") FROM \"great_eastern_section\" WHERE \"number\"='42' AND \"previous_number_s\">68178;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_eastern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: Which Withdrawn has a Previous Class of j69, and a Previous Number(s) smaller than 68532, and a Converted larger than 1959?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"withdrawn\") FROM \"great_eastern_section\" WHERE \"previous_class\"='j69' AND \"previous_number_s\"<68532 AND \"converted\">1959;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the average latitude for townships in Dickey county with water under 2.106 sqmi and population under 95?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"latitude\") FROM \"r\" WHERE \"water_sqmi\"<2.106 AND \"county\"='dickey' AND \"pop_2010\"<95;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the highest GEO ID for land masses over 38.117 sq mi and over 2.065 sq mi of water?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"geo_id\") FROM \"r\" WHERE \"land_sqmi\">38.117 AND \"water_sqmi\">2.065;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"township\" text,\n \"county\" text,\n \"pop_2010\" real,\n \"land_sqmi\" real,\n \"water_sqmi\" real,\n \"latitude\" real,\n \"longitude\" real,\n \"geo_id\" real,\n \"ansi_code\" real\n);\n\nQuestion: What is the number of GEO IDs for areas in Riggin township with water area over 0.587 sq mi and ANSI codes over 1759257?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"geo_id\") FROM \"r\" WHERE \"water_sqmi\">0.587 AND \"township\"='riggin' AND \"ansi_code\">1759257;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbf_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What's the class when the identifier is cbf-fm-14?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbf_fm\" WHERE \"identifier\"='cbf-fm-14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbf_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What's the frequency when the identifier is cbf-fm-9?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"s_rebroadcaster_of_cbf_fm\" WHERE \"identifier\"='cbf-fm-9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbf_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What's the RECNet when the identifier is cbf-fm-20?"
},
{
"role": "assistant",
"content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbf_fm\" WHERE \"identifier\"='cbf-fm-20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbf_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What's the RECNet when the power is 199 watts?"
},
{
"role": "assistant",
"content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbf_fm\" WHERE \"power\"='199 watts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbf_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What's the frequency when the identifier is cbf-fm-14 having a class of A?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"s_rebroadcaster_of_cbf_fm\" WHERE \"class\"='a' AND \"identifier\"='cbf-fm-14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_television\" (\n \"transmitter\" text,\n \"bbca\" real,\n \"bbcb\" text,\n \"d3_4\" text,\n \"arqa\" text,\n \"arqb\" text,\n \"pol\" text,\n \"a_g\" text\n);\n\nQuestion: What is the A.G. value associated with D3&4 of 46 and transmitter of Seaham?"
},
{
"role": "assistant",
"content": "SELECT \"a_g\" FROM \"digital_television\" WHERE \"d3_4\"='46' AND \"transmitter\"='seaham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"digital_television\" (\n \"transmitter\" text,\n \"bbca\" real,\n \"bbcb\" text,\n \"d3_4\" text,\n \"arqa\" text,\n \"arqb\" text,\n \"pol\" text,\n \"a_g\" text\n);\n\nQuestion: What is the AG value associated with a D3&4 of 41?"
},
{
"role": "assistant",
"content": "SELECT \"a_g\" FROM \"digital_television\" WHERE \"d3_4\"='41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"title\" text,\n \"billboard_hot_100\" text,\n \"uk_singles_chart\" text,\n \"album\" text\n);\n\nQuestion: What was the billboard hot 100 with an album bust a nut, and the title of \"need your lovin' (re-release)\"?"
},
{
"role": "assistant",
"content": "SELECT \"billboard_hot_100\" FROM \"singles\" WHERE \"album\"='bust a nut' AND \"title\"='\\\"need your lovin'' (re-release)\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"title\" text,\n \"billboard_hot_100\" text,\n \"uk_singles_chart\" text,\n \"album\" text\n);\n\nQuestion: What is the UK singles chart for the album psychotic supper, in the year 1992, with a title of \"song & emotion\"?"
},
{
"role": "assistant",
"content": "SELECT \"uk_singles_chart\" FROM \"singles\" WHERE \"album\"='psychotic supper' AND \"year\"=1992 AND \"title\"='\\\"song & emotion\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: which Label is in 15 december 1992?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"guest_appearances\" WHERE \"date\"='15 december 1992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: Which Album has an Artist of various artists (compilation), and a Label of laface?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"guest_appearances\" WHERE \"artist\"='various artists (compilation)' AND \"label\"='laface';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: When has an Album of l'un n'emp\u00eache pas l'autre?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"guest_appearances\" WHERE \"album\"='l''un n''emp\u00eache pas l''autre';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: Which Track(s) is on 18 november 1985?"
},
{
"role": "assistant",
"content": "SELECT \"track_s\" FROM \"guest_appearances\" WHERE \"date\"='18 november 1985';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: Which Artist has a Track(s) of \" evilmainya \"?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"guest_appearances\" WHERE \"track_s\"='\\\" evilmainya \\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_appearances\" (\n \"artist\" text,\n \"album\" text,\n \"track_s\" text,\n \"date\" text,\n \"label\" text\n);\n\nQuestion: Which Label that has an Album of so red the rose?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"guest_appearances\" WHERE \"album\"='so red the rose';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the least lane number that Natalie Coughlin was in when she was ranked greater than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lane\") FROM \"semifinal_2\" WHERE \"name\"='natalie coughlin' AND \"rank\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_a_b_1\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who is the Athlete with a rowing Time of 6:36.05?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"semifinal_a_b_1\" WHERE \"time\"='6:36.05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_setlist\" (\n \"year\" real,\n \"song\" text,\n \"artist\" text,\n \"genre\" text,\n \"band_tour_venue\" text,\n \"exportable\" text\n);\n\nQuestion: What song was made by the sex pistols?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"main_setlist\" WHERE \"artist\"='sex pistols';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_setlist\" (\n \"year\" real,\n \"song\" text,\n \"artist\" text,\n \"genre\" text,\n \"band_tour_venue\" text,\n \"exportable\" text\n);\n\nQuestion: What song has the band tour vnue of 6. tool (usa) encore?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"main_setlist\" WHERE \"band_tour_venue\"='6. tool (usa) encore';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total when the A score was less than 6.6, and the B score was 8.925?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"qualified_competitors\" WHERE \"a_score\"<6.6 AND \"b_score\"=8.925;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualified_competitors\" (\n \"position\" real,\n \"gymnast\" text,\n \"a_score\" real,\n \"b_score\" real,\n \"total\" real\n);\n\nQuestion: What total has a position smaller than 4, a B score higher than 9.125, and an A score less than 6.6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"qualified_competitors\" WHERE \"position\"<4 AND \"b_score\">9.125 AND \"a_score\"<6.6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score when watford was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='watford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score when york city was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"home_team\"='york city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What score has a game greater than 29, with 24-6 as the record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"game\">29 AND \"record\"='24-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What record has @ detroit as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"opponent\"='@ detroit';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What high assists have McWilliams-franklin (22) as the high points?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"regular_season\" WHERE \"high_points\"='mcwilliams-franklin (22)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What high assists have uic pavilion 3,520 as the location/attendance?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"regular_season\" WHERE \"location_attendance\"='uic pavilion 3,520';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What game has jones (10) as the high rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"regular_season\" WHERE \"high_rebounds\"='jones (10)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ivy_bridge_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: How many cores does the processor with a release price of $426 have?"
},
{
"role": "assistant",
"content": "SELECT \"cores\" FROM \"ivy_bridge_quad_core_22_nm\" WHERE \"release_price_usd\"='$426';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ivy_bridge_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What was the frequency of the Core i7-3610QE?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"ivy_bridge_quad_core_22_nm\" WHERE \"model_number\"='core i7-3610qe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ivy_bridge_quad_core_22_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"cores\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"gpu_model\" text,\n \"gpu_frequency\" text,\n \"socket\" text,\n \"i_o_bus\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: How many cores does the processor released in April 2012 with a price of $393 and part number av8063801117503 have?"
},
{
"role": "assistant",
"content": "SELECT \"cores\" FROM \"ivy_bridge_quad_core_22_nm\" WHERE \"release_date\"='april 2012' AND \"release_price_usd\"='$393' AND \"part_number_s\"='av8063801117503';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: What is Japan's Area km\u00b2?"
},
{
"role": "assistant",
"content": "SELECT \"area_km\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"country\"='japan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: Which island has a density (per km\u00b2) of 1,368?"
},
{
"role": "assistant",
"content": "SELECT \"island\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"density_per_km\"='1,368';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: Which country has a density (per km\u00b2) of 6,814?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"density_per_km\"='6,814';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: Which island has a population of 9,520 (2000)?"
},
{
"role": "assistant",
"content": "SELECT \"island\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"population\"='9,520 (2000)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: What is the area km\u00b2 for a population of 99,685 (2008)?"
},
{
"role": "assistant",
"content": "SELECT \"area_km\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"population\"='99,685 (2008)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_densely_populated_islands_over_1_00\" (\n \"island\" text,\n \"country\" text,\n \"population\" text,\n \"area_km\" text,\n \"density_per_km\" text\n);\n\nQuestion: Which island is in the United Kingdom?"
},
{
"role": "assistant",
"content": "SELECT \"island\" FROM \"most_densely_populated_islands_over_1_00\" WHERE \"country\"='united kingdom';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pitchers\" (\n \"season\" text,\n \"pitcher\" text,\n \"decision\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: Who is the pitcher from the 1983 season in location Kingdome?"
},
{
"role": "assistant",
"content": "SELECT \"pitcher\" FROM \"pitchers\" WHERE \"location\"='kingdome' AND \"season\"='1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pitchers\" (\n \"season\" text,\n \"pitcher\" text,\n \"decision\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: Who is the pitcher from the 1994 season that had the Cleveland Indians as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"pitcher\" FROM \"pitchers\" WHERE \"opponent\"='cleveland indians' AND \"season\"='1994';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pitchers\" (\n \"season\" text,\n \"pitcher\" text,\n \"decision\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: Who is the opponent for the 2011 season with a decision of W?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"pitchers\" WHERE \"decision\"='w' AND \"season\"='2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pitchers\" (\n \"season\" text,\n \"pitcher\" text,\n \"decision\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What season was played at Safeco Field, against the Boston Red Sox, with a decision of L?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"pitchers\" WHERE \"location\"='safeco field' AND \"decision\"='l' AND \"opponent\"='boston red sox';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pitchers\" (\n \"season\" text,\n \"pitcher\" text,\n \"decision\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What was the decision for the 1983 season for the game played against the New York Yankees?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"pitchers\" WHERE \"opponent\"='new york yankees' AND \"season\"='1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_floppy_disk_formats_logical_chara\" (\n \"platform\" text,\n \"size\" text,\n \"density\" text,\n \"bytes_sector\" real,\n \"sectors_track\" text,\n \"tracks_side\" text,\n \"sides\" real,\n \"capacity\" text,\n \"encoding\" text\n);\n\nQuestion: what is the encoding when the tracks/side is 80 and sectors/track is 11?"
},
{
"role": "assistant",
"content": "SELECT \"encoding\" FROM \"common_floppy_disk_formats_logical_chara\" WHERE \"tracks_side\"='80' AND \"sectors_track\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest bronze for less than 2 total trophies?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which Total has a Finish of t64, and a Year won larger than 2006?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t64' AND \"year_won\">2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which year won has a Finish of t24, and a Country of england?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year_won\") FROM \"made_the_cut\" WHERE \"finish\"='t24' AND \"country\"='england';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest bronze value for countries with totals over 2, golds of 0, silvers under 1, and ranks over 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medals_table\" WHERE \"total\">2 AND \"silver\"<1 AND \"rank\">10 AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" real,\n \"enrollment\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Which school has an enrollment of A and had lost river as their previous conference?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"membership\" WHERE \"previous_conference\"='lost river' AND \"enrollment\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" real,\n \"enrollment\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What is the average year joined of the 277 county?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year_joined\") FROM \"membership\" WHERE \"county\"=277;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" real,\n \"enrollment\" text,\n \"ihsaa_class\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What is the IHSAA class of the county that is less than 228?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"membership\" WHERE \"county\"<228;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the engine when the transmission was 4-speed automatic, and acceleration 0\u2013100km/h (0\u201362mph) was 10.4 s?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engineering\" WHERE \"transmission\"='4-speed automatic' AND \"acceleration_0_100km_h_0_62mph\"='10.4 s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the Power when the acceleration 0\u2013100km/h (0\u201362mph) is 9.1 s?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"engineering\" WHERE \"acceleration_0_100km_h_0_62mph\"='9.1 s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the transmission when the engine is 2.0l, and acceleration 0\u2013100km/h (0\u201362mph) is 10.5 s?"
},
{
"role": "assistant",
"content": "SELECT \"transmission\" FROM \"engineering\" WHERE \"engine\"='2.0l' AND \"acceleration_0_100km_h_0_62mph\"='10.5 s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the production when engine is 2.7l, and acceleration 0\u2013100km/h (0\u201362mph) is 8.5 s?"
},
{
"role": "assistant",
"content": "SELECT \"production\" FROM \"engineering\" WHERE \"engine\"='2.7l' AND \"acceleration_0_100km_h_0_62mph\"='8.5 s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the transmission when the production was 2002-2005?"
},
{
"role": "assistant",
"content": "SELECT \"transmission\" FROM \"engineering\" WHERE \"production\"='2002-2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engineering\" (\n \"engine\" text,\n \"production\" text,\n \"transmission\" text,\n \"power\" text,\n \"torque\" text,\n \"acceleration_0_100km_h_0_62mph\" text,\n \"top_speed\" text\n);\n\nQuestion: What is the acceleration 0\u2013100km/h (0\u201362mph) when the transmission is 5-speed manual?"
},
{
"role": "assistant",
"content": "SELECT \"acceleration_0_100km_h_0_62mph\" FROM \"engineering\" WHERE \"transmission\"='5-speed manual';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"giant_bomb\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the highest year for the Bethesda Game Studios Developer?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"giant_bomb\" WHERE \"developer_s\"='bethesda game studios';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"giant_bomb\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the lowest year for the game called The Elder Scrolls v: Skyrim?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"giant_bomb\" WHERE \"game\"='the elder scrolls v: skyrim';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"giant_bomb\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What game was developed by Naughty Dog?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"giant_bomb\" WHERE \"developer_s\"='naughty dog';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_medical_schools_in_the_caribbean\" (\n \"country_territory\" text,\n \"established\" real,\n \"degree\" text,\n \"regional_offshore\" text,\n \"imed_avicenna_listed\" text\n);\n\nQuestion: What is the imed/avicenna listed for a medical school offshore in saint kitts and nevis which was established before 2000 and will give you an MD?"
},
{
"role": "assistant",
"content": "SELECT \"imed_avicenna_listed\" FROM \"current_medical_schools_in_the_caribbean\" WHERE \"regional_offshore\"='offshore' AND \"country_territory\"='saint kitts and nevis' AND \"degree\"='md' AND \"established\"<2000;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_medical_schools_in_the_caribbean\" (\n \"country_territory\" text,\n \"established\" real,\n \"degree\" text,\n \"regional_offshore\" text,\n \"imed_avicenna_listed\" text\n);\n\nQuestion: What country has a medical school established in 1969 with both an IMED and avicenna?"
},
{
"role": "assistant",
"content": "SELECT \"country_territory\" FROM \"current_medical_schools_in_the_caribbean\" WHERE \"imed_avicenna_listed\"='both' AND \"established\"=1969;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_medical_schools_in_the_caribbean\" (\n \"country_territory\" text,\n \"established\" real,\n \"degree\" text,\n \"regional_offshore\" text,\n \"imed_avicenna_listed\" text\n);\n\nQuestion: What is the average year that the medical school in dominican republic was established?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"established\") FROM \"current_medical_schools_in_the_caribbean\" WHERE \"country_territory\"='dominican republic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the most wins with byes more than 0 and 1637 against?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2010_ladder\" WHERE \"against\"=1637 AND \"byes\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What are the total byes for the Red Cliffs with more than 4 losses and more than 2422 against?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"byes\") FROM \"2010_ladder\" WHERE \"losses\">4 AND \"sunrayia_fl\"='red cliffs' AND \"against\">2422;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the total wins for Wentworth with less than 0 byes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"2010_ladder\" WHERE \"sunrayia_fl\"='wentworth' AND \"byes\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which venue had an opponent of Sunderland and a result of a 1-1 draw?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"fa_premier_league\" WHERE \"opponent\"='sunderland' AND \"result\"='1-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the number of attendance values for ties having an opponent of Middlesbrough and result of 3-1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"fa_premier_league\" WHERE \"opponent\"='middlesbrough' AND \"result\"='3-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which venue ended in a 3-0 result?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"fa_premier_league\" WHERE \"result\"='3-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_first_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Where was a 0-5 game played?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"football_league_first_division\" WHERE \"result\"='0-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: What is the average rank of a player with fewer than 3 matches?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"season\" WHERE \"matches\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent on April 21?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What's the record on April 12 when the location was The Omni?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location_attendance\"='the omni' AND \"date\"='april 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date was the score \"score\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='score';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score on April 12?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What's the score of game 77?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"='77';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date had a record of 43-34?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='43-34';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_heat_2\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: What Artist had a Percentage of 17.14%?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"results_of_heat_2\" WHERE \"percentage\"='17.14%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_of_heat_2\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: What Percentage has a Place of 5?"
},
{
"role": "assistant",
"content": "SELECT \"percentage\" FROM \"results_of_heat_2\" WHERE \"place\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"hr_number\" real,\n \"name\" text,\n \"lms_number\" real,\n \"br_number\" text,\n \"withdrawn\" text\n);\n\nQuestion: Which BR number has an LMS number over 14768?"
},
{
"role": "assistant",
"content": "SELECT \"br_number\" FROM \"references\" WHERE \"lms_number\">14768;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the frequency when the city of license is belleville?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"city_of_license\"='belleville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the class when the power is 22500 watts?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"power\"='22500 watts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the class when the identifier is cjbc-1-fm?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"identifier\"='cjbc-1-fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the recnet when the city of license is peterborough?"
},
{
"role": "assistant",
"content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"city_of_license\"='peterborough';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the power when the city of license is belleville?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"city_of_license\"='belleville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cjbc\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: what is the identifier when the power is 22500 watts?"
},
{
"role": "assistant",
"content": "SELECT \"identifier\" FROM \"s_rebroadcaster_of_cjbc\" WHERE \"power\"='22500 watts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"dolphins_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Opponents in the game with a Date of nov. 25?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"opponents\") FROM \"schedule\" WHERE \"date\"='nov. 25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_records\" (\n \"name\" text,\n \"games\" text,\n \"a_league\" text,\n \"finals\" text,\n \"goals\" real,\n \"assists\" real,\n \"years\" text\n);\n\nQuestion: How many games does leandro love have?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"all_time_records\" WHERE \"name\"='leandro love';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_records\" (\n \"name\" text,\n \"games\" text,\n \"a_league\" text,\n \"finals\" text,\n \"goals\" real,\n \"assists\" real,\n \"years\" text\n);\n\nQuestion: What is the lowest number of goals joe keenan, who has more than 1 assists, had in 2007/08?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals\") FROM \"all_time_records\" WHERE \"years\"='2007/08' AND \"name\"='joe keenan' AND \"assists\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_records\" (\n \"name\" text,\n \"games\" text,\n \"a_league\" text,\n \"finals\" text,\n \"goals\" real,\n \"assists\" real,\n \"years\" text\n);\n\nQuestion: What is the lowest number of goals of the player with 9 (0) games and less than 0 assists?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals\") FROM \"all_time_records\" WHERE \"games\"='9 (0)' AND \"assists\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_records\" (\n \"name\" text,\n \"games\" text,\n \"a_league\" text,\n \"finals\" text,\n \"goals\" real,\n \"assists\" real,\n \"years\" text\n);\n\nQuestion: How many finals had more than 0 goals and 8 assists?"
},
{
"role": "assistant",
"content": "SELECT \"finals\" FROM \"all_time_records\" WHERE \"goals\">0 AND \"assists\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: When the nationality is united states, and the time is 58.06, and the heat is larger than 5 what is the lowest rank?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"heats\" WHERE \"nationality\"='united states' AND \"time\"='58.06' AND \"heat\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest rank when the lane is larger than 6, and the heat is 3, and the nationality is colombia?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"heats\" WHERE \"lane\">6 AND \"heat\"=3 AND \"nationality\"='colombia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the total lane for a heat larger than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"heats\" WHERE \"heat\">7;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.