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_23793770_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What the production code for the episode with 16.10 U.S. viewers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"production_code\") FROM \"table1_23793770_1\" WHERE \"u_s_viewers_millions\"='16.10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: what is the episode title on original air date of September 30, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"ratings\" WHERE \"original_airing\"='September 30, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: What is the rating if the rating/share (18-49) is 3.6?"
},
{
"role": "assistant",
"content": "SELECT \"rating\" FROM \"ratings\" WHERE \"rating_share_18_49\"='3.6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: What is the rating/share total number if the total viewers is 12.75 million?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rating_share_18_49\") FROM \"ratings\" WHERE \"total_viewers_in_millions\"='12.75';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: If the rating is 9.1, what was the total viewers?"
},
{
"role": "assistant",
"content": "SELECT \"total_viewers_in_millions\" FROM \"ratings\" WHERE \"rating\"='9.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: What was the reating share when the total viewers was 11.49 million?"
},
{
"role": "assistant",
"content": "SELECT \"rating_share_18_49\" FROM \"ratings\" WHERE \"total_viewers_in_millions\"='11.49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: What was the name of the show that had 10.47 million total viewers?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"ratings\" WHERE \"total_viewers_in_millions\"='10.47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: How many shows had 12.46 total viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"title\") FROM \"ratings\" WHERE \"total_viewers_in_millions\"='12.46';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" text,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"total_viewers_in_millions\" text\n);\n\nQuestion: What episode had 10.47 total viewers? "
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"ratings\" WHERE \"total_viewers_in_millions\"='10.47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23802822_1\" (\n \"sector\" text,\n \"establishments\" real,\n \"sales_receipts_or_shipments_1_000\" real,\n \"annual_payroll_1_000\" real,\n \"paid_employees\" real\n);\n\nQuestion: If the establishment is 49319, what is the sales, receipts or shipments maximum amount?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"sales_receipts_or_shipments_1_000\") FROM \"table1_23802822_1\" WHERE \"establishments\"=49319;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23802822_1\" (\n \"sector\" text,\n \"establishments\" real,\n \"sales_receipts_or_shipments_1_000\" real,\n \"annual_payroll_1_000\" real,\n \"paid_employees\" real\n);\n\nQuestion: If the annual payroll is 21173895, what is the establishments?"
},
{
"role": "assistant",
"content": "SELECT \"establishments\" FROM \"table1_23802822_1\" WHERE \"annual_payroll_1_000\"=21173895;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23802822_1\" (\n \"sector\" text,\n \"establishments\" real,\n \"sales_receipts_or_shipments_1_000\" real,\n \"annual_payroll_1_000\" real,\n \"paid_employees\" real\n);\n\nQuestion: What is the sector is the establishment is 110313?"
},
{
"role": "assistant",
"content": "SELECT \"sector\" FROM \"table1_23802822_1\" WHERE \"establishments\"=110313;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: How many different Leagues had average attendance of 3589?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league\") FROM \"year_by_year\" WHERE \"avg_attendance\"=3589;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: How many people saw the 3rd, Central regular season on average?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"avg_attendance\") FROM \"year_by_year\" WHERE \"regular_season\"='3rd, Central';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: What League was played in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"year\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: When was the average attendance 789?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"year_by_year\" WHERE \"avg_attendance\"=789;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"gp_gs\" text,\n \"min_avg\" text,\n \"fg_fga\" text,\n \"fg_pct\" text,\n \"3_fg_fga\" text,\n \"3_fg_pct\" text,\n \"ft_fta\" text,\n \"ft_pct\" text,\n \"reb\" real,\n \"ast\" real,\n \"blk\" real,\n \"stl\" real,\n \"pts\" real,\n \"avg_pts\" text\n);\n\nQuestion: what is the score in fg-fga if in ft-fta is 16-21"
},
{
"role": "assistant",
"content": "SELECT \"fg_fga\" FROM \"player_stats\" WHERE \"ft_fta\"='16-21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"gp_gs\" text,\n \"min_avg\" text,\n \"fg_fga\" text,\n \"fg_pct\" text,\n \"3_fg_fga\" text,\n \"3_fg_pct\" text,\n \"ft_fta\" text,\n \"ft_pct\" text,\n \"reb\" real,\n \"ast\" real,\n \"blk\" real,\n \"stl\" real,\n \"pts\" real,\n \"avg_pts\" text\n);\n\nQuestion: if the 3fg-fga is 1-20 what is the number in ft pct"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ft_pct\") FROM \"player_stats\" WHERE \"3_fg_fga\"='1-20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_stats\" (\n \"player\" text,\n \"gp_gs\" text,\n \"min_avg\" text,\n \"fg_fga\" text,\n \"fg_pct\" text,\n \"3_fg_fga\" text,\n \"3_fg_pct\" text,\n \"ft_fta\" text,\n \"ft_pct\" text,\n \"reb\" real,\n \"ast\" real,\n \"blk\" real,\n \"stl\" real,\n \"pts\" real,\n \"avg_pts\" text\n);\n\nQuestion: in the ft pct .667 what is the number of gp-gs"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gp_gs\") FROM \"player_stats\" WHERE \"ft_pct\"='.667';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_num1\" text,\n \"points\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Name the team number 1 for san lorenzo"
},
{
"role": "assistant",
"content": "SELECT \"team_num1\" FROM \"matches\" WHERE \"team_num2\"='San Lorenzo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_num1\" text,\n \"points\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Name the team #2 for river plate"
},
{
"role": "assistant",
"content": "SELECT \"team_num2\" FROM \"matches\" WHERE \"team_num1\"='River Plate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_num1\" text,\n \"points\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Name the points for zamora"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"matches\" WHERE \"team_num1\"='Zamora';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"team_num1\" text,\n \"points\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Name the 2nd leg for boca juniors"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"matches\" WHERE \"team_num1\"='Boca Juniors';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_works_sampling_spectrasonics\" (\n \"music_library\" text,\n \"year\" real,\n \"media_type\" text,\n \"name_of_the_media\" text,\n \"composition_name\" text,\n \"composer\" text,\n \"genre\" text\n);\n\nQuestion: What is every media type for the Psychedelic Trance genre?"
},
{
"role": "assistant",
"content": "SELECT \"media_type\" FROM \"list_of_works_sampling_spectrasonics\" WHERE \"genre\"='Psychedelic Trance';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_works_sampling_spectrasonics\" (\n \"music_library\" text,\n \"year\" real,\n \"media_type\" text,\n \"name_of_the_media\" text,\n \"composition_name\" text,\n \"composer\" text,\n \"genre\" text\n);\n\nQuestion: Who is every composer for the media named Hall of Dreams?"
},
{
"role": "assistant",
"content": "SELECT \"composer\" FROM \"list_of_works_sampling_spectrasonics\" WHERE \"name_of_the_media\"='Hall Of Dreams';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_works_sampling_spectrasonics\" (\n \"music_library\" text,\n \"year\" real,\n \"media_type\" text,\n \"name_of_the_media\" text,\n \"composition_name\" text,\n \"composer\" text,\n \"genre\" text\n);\n\nQuestion: What is every media type for the Dub genre?"
},
{
"role": "assistant",
"content": "SELECT \"media_type\" FROM \"list_of_works_sampling_spectrasonics\" WHERE \"genre\"='Dub';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_works_sampling_spectrasonics\" (\n \"music_library\" text,\n \"year\" real,\n \"media_type\" text,\n \"name_of_the_media\" text,\n \"composition_name\" text,\n \"composer\" text,\n \"genre\" text\n);\n\nQuestion: What is every media type for the World genre?"
},
{
"role": "assistant",
"content": "SELECT \"media_type\" FROM \"list_of_works_sampling_spectrasonics\" WHERE \"genre\"='World';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_works_sampling_spectrasonics\" (\n \"music_library\" text,\n \"year\" real,\n \"media_type\" text,\n \"name_of_the_media\" text,\n \"composition_name\" text,\n \"composer\" text,\n \"genre\" text\n);\n\nQuestion: What is every composition name when the music library is Heart of Asia and media type is album with the Trance genre?"
},
{
"role": "assistant",
"content": "SELECT \"composition_name\" FROM \"list_of_works_sampling_spectrasonics\" WHERE \"music_library\"='Heart of Asia' AND \"media_type\"='Album' AND \"genre\"='Trance';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: What was the '{\\mathrm{h,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}' if '_{\\mathrm{h,cp}} = \\frac{c_\\mathrm{aq}}{p}' is 7.8 \u00d7 10\u22124?"
},
{
"role": "assistant",
"content": "SELECT \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" FROM \"table1_238199_1\" WHERE \"k_mathrm_h_cp_frac_c_mathrm_aq_p\"='7.8 \u00d7 10\u22124';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: What was the equation if k_{\\mathrm{h,px}} = \\frac{p}{x} is 12.30 \u00d7 10?"
},
{
"role": "assistant",
"content": "SELECT \"equation\" FROM \"table1_238199_1\" WHERE \"k_mathrm_h_px_frac_p_x\"='12.30 \u00d7 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: What wast the 'k_{\\mathrm{h,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}' of CO 2?"
},
{
"role": "assistant",
"content": "SELECT \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" FROM \"table1_238199_1\" WHERE \"equation\"='CO 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: How many \"k_{\\mathrm{h,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}i if its 'k_{\\mathrm{h,px}} = \\frac{p}{x}' is 14.97 \u00d7 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\") FROM \"table1_238199_1\" WHERE \"k_mathrm_h_px_frac_p_x\"='14.97 \u00d7 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: What was the equation if k_{\\mathrm{h,pc}} = \\frac{p}{c_\\mathrm{aq}} is 2222.22?"
},
{
"role": "assistant",
"content": "SELECT \"equation\" FROM \"table1_238199_1\" WHERE \"k_mathrm_h_pc_frac_p_c_mathrm_aq\"='2222.22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_238199_1\" (\n \"equation\" text,\n \"k_mathrm_h_pc_frac_p_c_mathrm_aq\" text,\n \"k_mathrm_h_cp_frac_c_mathrm_aq_p\" text,\n \"k_mathrm_h_px_frac_p_x\" text,\n \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" text\n);\n\nQuestion: What is the 'k_{\\mathrm{h,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}' of O 2?"
},
{
"role": "assistant",
"content": "SELECT \"k_mathrm_h_cc_frac_c_mathrm_aq_c_mathrm_gas\" FROM \"table1_238199_1\" WHERE \"equation\"='O 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election\" (\n \"2009_general_election\" text,\n \"party\" text,\n \"manhattan\" text,\n \"the_bronx\" text,\n \"brooklyn\" text,\n \"queens\" text,\n \"staten_island\" text,\n \"total\" real,\n \"pct\" text\n);\n\nQuestion: what percentage is brooklyn when manhattan is 15.5%?"
},
{
"role": "assistant",
"content": "SELECT \"brooklyn\" FROM \"general_election\" WHERE \"manhattan\"='15.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: What is every entry in the QLD Cup Premierships when home ground is Dairy Farmers Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"qld_cup_premierships\" FROM \"previous_teams\" WHERE \"home_ground\"='Dairy Farmers Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: What is every value for first year in QLD Cup if home ground is Corbett Park, Crosby Park, Lang Park, ANZ Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"first_year_in_qld_cup\" FROM \"previous_teams\" WHERE \"home_ground\"='Corbett Park, Crosby Park, Lang Park, ANZ Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: What is the home ground if team is Sunshine Coast Falcons?"
},
{
"role": "assistant",
"content": "SELECT \"home_ground\" FROM \"previous_teams\" WHERE \"team\"='Sunshine Coast Falcons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: What is the QLD Cup Premierships if team is Gold Coast Vikings?"
},
{
"role": "assistant",
"content": "SELECT \"qld_cup_premierships\" FROM \"previous_teams\" WHERE \"team\"='Gold Coast Vikings';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: What is every team in the location of Port Moresby?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"previous_teams\" WHERE \"location\"='Port Moresby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_teams\" (\n \"team\" text,\n \"location\" text,\n \"home_ground\" text,\n \"first_year_in_qld_cup\" real,\n \"last_year_in_qld_cup\" real,\n \"qld_cup_premierships\" text\n);\n\nQuestion: How many values of last year in QLD Cup if QLD Cup Premierships is 1996, 2001?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"last_year_in_qld_cup\") FROM \"previous_teams\" WHERE \"qld_cup_premierships\"='1996, 2001';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transfers\" (\n \"1_january_2010\" text,\n \"df\" text,\n \"adam_hinshelwood\" text,\n \"aldershot_town\" text,\n \"wycombe_wanderers\" text,\n \"undisclosed\" text\n);\n\nQuestion: What are the Wycombe Wanderers when 1 January 2010 is 23 July 2009 and df is gk?"
},
{
"role": "assistant",
"content": "SELECT \"wycombe_wanderers\" FROM \"transfers\" WHERE \"1_january_2010\"='23 July 2009' AND \"df\"='GK';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transfers\" (\n \"1_january_2010\" text,\n \"df\" text,\n \"adam_hinshelwood\" text,\n \"aldershot_town\" text,\n \"wycombe_wanderers\" text,\n \"undisclosed\" text\n);\n\nQuestion: What are the undisclosed when Adam Hinshelwood is Ricky Newman?"
},
{
"role": "assistant",
"content": "SELECT \"undisclosed\" FROM \"transfers\" WHERE \"adam_hinshelwood\"='Ricky Newman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transfers\" (\n \"1_january_2010\" text,\n \"df\" text,\n \"adam_hinshelwood\" text,\n \"aldershot_town\" text,\n \"wycombe_wanderers\" text,\n \"undisclosed\" text\n);\n\nQuestion: What is the df when Adam Hinshelwood is Junior Mendes?"
},
{
"role": "assistant",
"content": "SELECT \"df\" FROM \"transfers\" WHERE \"adam_hinshelwood\"='Junior Mendes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transfers\" (\n \"1_january_2010\" text,\n \"df\" text,\n \"adam_hinshelwood\" text,\n \"aldershot_town\" text,\n \"wycombe_wanderers\" text,\n \"undisclosed\" text\n);\n\nQuestion: What is the undisclosed when Aldertown is Aldershot Town and Wycombe Wanderers is Oxford United?"
},
{
"role": "assistant",
"content": "SELECT \"undisclosed\" FROM \"transfers\" WHERE \"aldershot_town\"='Aldershot Town' AND \"wycombe_wanderers\"='Oxford United';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"transfers\" (\n \"1_january_2010\" text,\n \"df\" text,\n \"adam_hinshelwood\" text,\n \"aldershot_town\" text,\n \"wycombe_wanderers\" text,\n \"undisclosed\" text\n);\n\nQuestion: What is the undisclosed when Wycombe Wanderers is unattached?"
},
{
"role": "assistant",
"content": "SELECT \"undisclosed\" FROM \"transfers\" WHERE \"wycombe_wanderers\"='Unattached';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"team\" text,\n \"city_area\" text,\n \"arena\" text,\n \"founded\" real,\n \"joined\" real,\n \"head_coach\" text,\n \"captain\" text\n);\n\nQuestion: Who is the head coach for the team that plays at Altrincham Ice Dome?"
},
{
"role": "assistant",
"content": "SELECT \"head_coach\" FROM \"current_teams\" WHERE \"arena\"='Altrincham Ice Dome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_teams\" (\n \"team\" text,\n \"city_area\" text,\n \"arena\" text,\n \"founded\" real,\n \"joined\" real,\n \"head_coach\" text,\n \"captain\" text\n);\n\nQuestion: What arena does the team play at that has Michael Wales as the captain?"
},
{
"role": "assistant",
"content": "SELECT \"arena\" FROM \"current_teams\" WHERE \"captain\"='Michael Wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_idol_performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: List all themes from the top 9."
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"american_idol_performances\" WHERE \"week_num\"='Top 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_idol_performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: In what week was the original singer Whitney Houston."
},
{
"role": "assistant",
"content": "SELECT \"week_num\" FROM \"american_idol_performances\" WHERE \"original_artist\"='Whitney Houston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_idol_performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: Name the song for safe result #8."
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"american_idol_performances\" WHERE \"result\"='Safe' AND \"order_num\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_idol_performances\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" real,\n \"result\" text\n);\n\nQuestion: List the song chose for the British Invasion."
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"american_idol_performances\" WHERE \"theme\"='British Invasion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"circumvesuviana\" (\n \"lines\" text,\n \"opening\" real,\n \"traction\" text,\n \"length\" text,\n \"stations\" real,\n \"route\" text,\n \"stops\" real,\n \"travel_time\" text\n);\n\nQuestion: Name the stops for stations 36"
},
{
"role": "assistant",
"content": "SELECT \"stops\" FROM \"circumvesuviana\" WHERE \"stations\"=36;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"circumvesuviana\" (\n \"lines\" text,\n \"opening\" real,\n \"traction\" text,\n \"length\" text,\n \"stations\" real,\n \"route\" text,\n \"stops\" real,\n \"travel_time\" text\n);\n\nQuestion: Name the number of lines for porta nolana - ottaviano- sarno"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lines\") FROM \"circumvesuviana\" WHERE \"route\"='Porta Nolana - Ottaviano- Sarno';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"circumvesuviana\" (\n \"lines\" text,\n \"opening\" real,\n \"traction\" text,\n \"length\" text,\n \"stations\" real,\n \"route\" text,\n \"stops\" real,\n \"travel_time\" text\n);\n\nQuestion: Name the travel time for porta nolana - nola - baiano"
},
{
"role": "assistant",
"content": "SELECT \"travel_time\" FROM \"circumvesuviana\" WHERE \"route\"='Porta Nolana - Nola - Baiano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"circumvesuviana\" (\n \"lines\" text,\n \"opening\" real,\n \"traction\" text,\n \"length\" text,\n \"stations\" real,\n \"route\" text,\n \"stops\" real,\n \"travel_time\" text\n);\n\nQuestion: Name the number of stations for 15 minutes travel time"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"stations\") FROM \"circumvesuviana\" WHERE \"travel_time\"='15 minutes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: How big (in km2) is Persarmenia?"
},
{
"role": "assistant",
"content": "SELECT \"area_km\" FROM \"see_also\" WHERE \"province_ashkharh\"='Persarmenia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: What's the center of the Artsakh province?"
},
{
"role": "assistant",
"content": "SELECT \"center\" FROM \"see_also\" WHERE \"province_ashkharh\"='Artsakh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: How many different provinces is Baghaberd the center of?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"province_ashkharh\") FROM \"see_also\" WHERE \"center\"='Baghaberd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: How big is the province with the Armenian name of \u0583\u0561\u0575\u057f\u0561\u056f\u0561\u0580\u0561\u0576?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km\") FROM \"see_also\" WHERE \"armenian_name\"='\u0553\u0561\u0575\u057f\u0561\u056f\u0561\u0580\u0561\u0576';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: What's the center of the province that spreads out on 23860 km2?"
},
{
"role": "assistant",
"content": "SELECT \"center\" FROM \"see_also\" WHERE \"area_km\"=23860;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"province_ashkharh\" text,\n \"armenian_name\" text,\n \"area_km\" real,\n \"number_of_cantons_gavars\" real,\n \"center\" text\n);\n\nQuestion: How many different numbers of cantons does the province with the Armenian name \u057e\u0561\u057d\u057a\u0578\u0582\u0580\u0561\u056f\u0561\u0576 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_cantons_gavars\") FROM \"see_also\" WHERE \"armenian_name\"='\u054e\u0561\u057d\u057a\u0578\u0582\u0580\u0561\u056f\u0561\u0576';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23886181_1\" (\n \"no\" text,\n \"football_club\" text,\n \"continent\" text,\n \"associated_football_club\" text,\n \"seasons\" text,\n \"racing_drivers\" text\n);\n\nQuestion: what are the seasons for no 3?"
},
{
"role": "assistant",
"content": "SELECT \"seasons\" FROM \"table1_23886181_1\" WHERE \"no\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: what are the maximum wins where the poles are 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"nascar_sprint_cup_series\" WHERE \"poles\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples_of_different_pronunciation\" (\n \"original\" text,\n \"ipa_lisbon\" text,\n \"ipa_rio_de_janeiro\" text,\n \"ipa_s_o_paulo\" text,\n \"ipa_santiago_de_compostela\" text,\n \"translation\" text\n);\n\nQuestion: What is the original of the ipa ( rio de janeiro )translation ki\u0325 mo\u031e\u0255\u02c8t\u027ea\u027e\u025c\u0303w\u0303 n\u0250 \u02c8t\u025b\u0281\u0259 t\u0255\u0129\u0291i\u02c8t\u025c\u0303n\u0259?"
},
{
"role": "assistant",
"content": "SELECT \"translation\" FROM \"examples_of_different_pronunciation\" WHERE \"ipa_rio_de_janeiro\"='ki\u0325 mo\u031e\u0255\u02c8t\u027ea\u027e\u025c\u0303w\u0303 n\u0250 \u02c8t\u025b\u0281\u0259 t\u0255\u0129\u0291i\u02c8t\u025c\u0303n\u0259';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"examples_of_different_pronunciation\" (\n \"original\" text,\n \"ipa_lisbon\" text,\n \"ipa_rio_de_janeiro\" text,\n \"ipa_s_o_paulo\" text,\n \"ipa_santiago_de_compostela\" text,\n \"translation\" text\n);\n\nQuestion: What is the original of the ipa ( s\u00e3o paulo ) translation d\u0250\u0303\u02d0\u02c8t\u0255i\u0263\u0250 \u02c8t\u0250\u0303\u028a\u032f\u0303 \u0250\u0303\u02c8mad\u0250 \u02c8su\u0250 \u0266\u00f5\u031e\u02c8m\u0259n\u0259?"
},
{
"role": "assistant",
"content": "SELECT \"translation\" FROM \"examples_of_different_pronunciation\" WHERE \"ipa_s_o_paulo\"='d\u0250\u0303\u02d0\u02c8t\u0255i\u0263\u0250 \u02c8t\u0250\u0303\u028a\u032f\u0303 \u0250\u0303\u02c8mad\u0250 \u02c8su\u0250 \u0266\u00f5\u031e\u02c8m\u0259n\u0259';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"easy_rock_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: Which frequency is DYMY?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"easy_rock_stations\" WHERE \"callsign\"='DYMY';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the frequency when radio station branding is 106.3 energy fm naga?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"table1_23915973_1\" WHERE \"branding\"='106.3 Energy FM Naga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the callsign when power kw is 25kw?"
},
{
"role": "assistant",
"content": "SELECT \"callsign\" FROM \"table1_23915973_1\" WHERE \"power_k_w\"='25kW';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the frequency when callsign is dxru-fm?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"table1_23915973_1\" WHERE \"callsign\"='DXRU-FM';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the radio station branding when the power km is 5kw?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"table1_23915973_1\" WHERE \"power_k_w\"='5kW';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: What is the coverage when power kw is 25kw?"
},
{
"role": "assistant",
"content": "SELECT \"coverage\" FROM \"table1_23915973_1\" WHERE \"power_k_w\"='25kW';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23915973_1\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"coverage\" text\n);\n\nQuestion: How many power kw have a frequency of 93.7 mhz?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"power_k_w\") FROM \"table1_23915973_1\" WHERE \"frequency\"='93.7 MHz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23918997_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: Who were all the writers whose episodes had 0.97 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_23918997_1\" WHERE \"u_s_viewers_million\"='0.97';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23918997_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many directors worked on the episode written by Brent Fletcher & Miranda Kwok?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_23918997_1\" WHERE \"written_by\"='Brent Fletcher & Miranda Kwok';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23918997_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What was the title of the episode directed by Rowan Woods?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_23918997_1\" WHERE \"directed_by\"='Rowan Woods';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23918997_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many episodes were viewed by 1.29 million people?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"table1_23918997_1\" WHERE \"u_s_viewers_million\"='1.29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23916272_6\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who was the writer for the episode originally airing on March 1, 2004?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_23916272_6\" WHERE \"original_air_date\"='March 1, 2004';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23916272_6\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: List the title for the season episode number of 8."
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_23916272_6\" WHERE \"season_num\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23916272_6\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who directed the \"Out with the Old, in with the new\" episode?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23916272_6\" WHERE \"title\"='\\\"Out with the Old, in with the New\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23916272_6\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who was the director for the episode originally airing September 29, 2003?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_23916272_6\" WHERE \"original_air_date\"='September 29, 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23916272_6\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the highest series number of the episode \"Til Death do us part-and make it soon\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"series_num\") FROM \"table1_23916272_6\" WHERE \"title\"='\\\"Til Death Do Us Part-And Make It Soon\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_2\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: Name the original air date for harry hannigan directed by adam weissman"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_23937219_2\" WHERE \"written_by\"='Harry Hannigan' AND \"directed_by\"='Adam Weissman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: How many people directed \"through the looking glass\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_23937219_3\" WHERE \"title\"='\\\"Through The Looking Glass\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: How many people directed episode 7 In the season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_23937219_3\" WHERE \"season_num\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: How many original air dates were there for the episode with production code 212?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"original_air_date\") FROM \"table1_23937219_3\" WHERE \"prod_code\"=212;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the production code for \"road trip (aka \"the kiss\")\"?"
},
{
"role": "assistant",
"content": "SELECT \"prod_code\" FROM \"table1_23937219_3\" WHERE \"title\"='\\\"Road Trip (aka \\\"The Kiss\\\")\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23937219_3\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the production code for episode 31 in the series?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"prod_code\") FROM \"table1_23937219_3\" WHERE \"series_num\"=31;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: How many seasons did Barking Birmingham & Solihull Stourbridge were relegated from league?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"table1_23927423_4\" WHERE \"relegated_from_league\"='Barking Birmingham & Solihull Stourbridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Who was relegated to league if Barking Birmingham & Solihull Stourbridge were relegated from league?"
},
{
"role": "assistant",
"content": "SELECT \"relegated_to_league\" FROM \"table1_23927423_4\" WHERE \"relegated_from_league\"='Barking Birmingham & Solihull Stourbridge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: How many were the minimum team that participated in the league?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"teams\") FROM \"table1_23927423_4\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: How many teams participated (maximum) when Cornish All Blacks Pertemps Bees were relegated to the league?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"teams\") FROM \"table1_23927423_4\" WHERE \"relegated_to_league\"='Cornish All Blacks Pertemps Bees';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Who was promoted to the league when Coventry was relegated to the league?"
},
{
"role": "assistant",
"content": "SELECT \"promoted_to_league\" FROM \"table1_23927423_4\" WHERE \"relegated_to_league\"='Coventry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23927423_4\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: How many were promoted from the league when Esher was relegated to the league?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"promoted_from_league\") FROM \"table1_23927423_4\" WHERE \"relegated_to_league\"='Esher';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: What is the smallest 08-09 GP/JGP 2nd value when WS points equals 3197?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"08_09_gp_jgp_2nd\") FROM \"ice_dancing\" WHERE \"ws_points\"=3197;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: What is the number of 07-08 oi best values associated with 08-09 i/o bests of exactly 202?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"07_08_oi_best\") FROM \"ice_dancing\" WHERE \"08_09_i_o_best\"=202;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ice_dancing\" (\n \"rank\" real,\n \"ws_points\" real,\n \"name\" text,\n \"country\" text,\n \"08_09_i_o_best\" real,\n \"08_09_gp_jgp_best\" real,\n \"08_09_gp_jgp_2nd\" real,\n \"08_09_oi_best\" real,\n \"08_09_oi_2nd\" real,\n \"07_08_i_o_best\" real,\n \"07_08_gp_jgp_best\" real,\n \"07_08_gp_jgp_2nd\" real,\n \"07_08_oi_best\" real,\n \"07_08_oi_2nd\" real\n);\n\nQuestion: What is the smallest 07-08 oi best value?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"07_08_oi_best\") FROM \"ice_dancing\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the number of partners for 5-7, 6-7 (5-7)"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"partner\") FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"score\"='5-7, 6-7 (5-7)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for cara black rennae stubbs"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"opponents\"='Cara Black Rennae Stubbs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_2_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the score for san diego"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_7_2_titles_5_runners_up\" WHERE \"championship\"='San Diego';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.