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 \"season_2006_07\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: How many dates are associated with a guest 4 being Jim Jeffries (debut)?" }, { "role": "assistant", "content": "SELECT COUNT(\"date\") FROM \"season_2006_07\" WHERE \"guest_4\"='Jim Jeffries (debut)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2006_07\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: What is the date of the episode in which the presenter is Johnny Vaughan?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_2006_07\" WHERE \"presenter\"='Johnny Vaughan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20466963_13\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Name the guest 4 for 8 december" }, { "role": "assistant", "content": "SELECT \"guest_4\" FROM \"table1_20466963_13\" WHERE \"date\"='8 December';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20466963_13\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Name the guest 4 for steve lamacq" }, { "role": "assistant", "content": "SELECT \"guest_4\" FROM \"table1_20466963_13\" WHERE \"guest_2\"='Steve Lamacq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20466963_13\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Name the guest 2 for colin murray 6 april" }, { "role": "assistant", "content": "SELECT COUNT(\"guest_2\") FROM \"table1_20466963_13\" WHERE \"presenter\"='Colin Murray' AND \"date\"='6 April';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20466963_13\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Name the presenter 11 may" }, { "role": "assistant", "content": "SELECT \"presenter\" FROM \"table1_20466963_13\" WHERE \"date\"='11 May';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20466963_13\" (\n \"date\" text,\n \"presenter\" text,\n \"guest_1\" text,\n \"guest_2\" text,\n \"guest_3\" text,\n \"guest_4\" text\n);\n\nQuestion: Name the guest 3 for iyare igiehon" }, { "role": "assistant", "content": "SELECT \"guest_3\" FROM \"table1_20466963_13\" WHERE \"guest_2\"='Iyare Igiehon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newport_rfc_record\" (\n \"season\" text,\n \"games\" real,\n \"tries\" real,\n \"conversions\" real,\n \"penalties\" real,\n \"drop_goals\" real,\n \"total_points\" real\n);\n\nQuestion: How many seasons featured 29 conversions?" }, { "role": "assistant", "content": "SELECT COUNT(\"penalties\") FROM \"newport_rfc_record\" WHERE \"conversions\"=29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newport_rfc_record\" (\n \"season\" text,\n \"games\" real,\n \"tries\" real,\n \"conversions\" real,\n \"penalties\" real,\n \"drop_goals\" real,\n \"total_points\" real\n);\n\nQuestion: Lowest number of drop goals?" }, { "role": "assistant", "content": "SELECT MIN(\"drop_goals\") FROM \"newport_rfc_record\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newport_rfc_record\" (\n \"season\" text,\n \"games\" real,\n \"tries\" real,\n \"conversions\" real,\n \"penalties\" real,\n \"drop_goals\" real,\n \"total_points\" real\n);\n\nQuestion: What is the point total for the season with 2 drop goals?" }, { "role": "assistant", "content": "SELECT MIN(\"total_points\") FROM \"newport_rfc_record\" WHERE \"drop_goals\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"total\" real\n);\n\nQuestion: Name the most obama number for mccain being 38.86%" }, { "role": "assistant", "content": "SELECT MAX(\"obamanum\") FROM \"by_county\" WHERE \"mc_cainpct\"='38.86%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"total\" real\n);\n\nQuestion: Name the most abama number for mccain being 29266" }, { "role": "assistant", "content": "SELECT MAX(\"obamanum\") FROM \"by_county\" WHERE \"mc_cainnum\"=29266;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"total\" real\n);\n\nQuestion: Name the county for mccain being 38.78%" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"by_county\" WHERE \"mc_cainpct\"='38.78%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county_city\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: In how many counties di McCain win 41.62% of the vote?" }, { "role": "assistant", "content": "SELECT COUNT(\"county\") FROM \"by_county_city\" WHERE \"mc_cainpct\"='41.62%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county_city\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What percentage of the vote did McCain win in Waynesboro (city)?" }, { "role": "assistant", "content": "SELECT \"mc_cainpct\" FROM \"by_county_city\" WHERE \"county\"='Waynesboro (city)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county_city\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What was Obama's percentage in those places where McCain's percentage was 55.46%?" }, { "role": "assistant", "content": "SELECT \"obamapct\" FROM \"by_county_city\" WHERE \"mc_cainpct\"='55.46%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county_city\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What was Obama's percentage in the county of Alleghany?" }, { "role": "assistant", "content": "SELECT \"obamapct\" FROM \"by_county_city\" WHERE \"county\"='Alleghany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county_city\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What was Obama's percentage in the county of Surry?" }, { "role": "assistant", "content": "SELECT \"obamapct\" FROM \"by_county_city\" WHERE \"county\"='Surry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: How many percent of the votes in Debaca did McCain get?" }, { "role": "assistant", "content": "SELECT \"mc_cainpct\" FROM \"by_county\" WHERE \"county\"='DeBaca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: What percentage of the votes did Obama get in the county where 3909 people voted in total?" }, { "role": "assistant", "content": "SELECT \"obamapct\" FROM \"by_county\" WHERE \"total\"=3909;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real,\n \"total\" real\n);\n\nQuestion: What percentage of the votes did Obama get in the county where McCain got 3648 votes?" }, { "role": "assistant", "content": "SELECT \"obamapct\" FROM \"by_county\" WHERE \"mc_cainnum\"=3648;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20540006_6\" (\n \"date\" text,\n \"time\" text,\n \"big_east_team\" text,\n \"sec_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: Who was the winner when the SEC team LSU played?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"table1_20540006_6\" WHERE \"sec_team\"='LSU';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20540006_6\" (\n \"date\" text,\n \"time\" text,\n \"big_east_team\" text,\n \"sec_team\" text,\n \"location\" text,\n \"television\" text,\n \"attendance\" real,\n \"winner\" text,\n \"challenge_leader\" text\n);\n\nQuestion: What was the attendance for the game when the challenge leader was at Big East (4-2)?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"table1_20540006_6\" WHERE \"challenge_leader\"='Big East (4-2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mlb_draft_history\" (\n \"draft_year\" real,\n \"player\" text,\n \"summer_team\" text,\n \"college\" text,\n \"mlb_team\" text,\n \"draft_round\" text\n);\n\nQuestion: What suumer team was James Lomangino from St. John's on?" }, { "role": "assistant", "content": "SELECT \"summer_team\" FROM \"mlb_draft_history\" WHERE \"college\"='St. John''s' AND \"player\"='James Lomangino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mlb_draft_history\" (\n \"draft_year\" real,\n \"player\" text,\n \"summer_team\" text,\n \"college\" text,\n \"mlb_team\" text,\n \"draft_round\" text\n);\n\nQuestion: In what draft round in 2012 did a player from Rio Hondo get drafted?" }, { "role": "assistant", "content": "SELECT \"draft_round\" FROM \"mlb_draft_history\" WHERE \"college\"='Rio Hondo' AND \"draft_year\"=2012;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mlb_draft_history\" (\n \"draft_year\" real,\n \"player\" text,\n \"summer_team\" text,\n \"college\" text,\n \"mlb_team\" text,\n \"draft_round\" text\n);\n\nQuestion: What college did Aaron Slegers attend?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"mlb_draft_history\" WHERE \"player\"='Aaron Slegers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: What are the statuses of the platelet counts for the conditions where the prothrombin time and partial thromboblastin time is unaffected? " }, { "role": "assistant", "content": "SELECT \"platelet_count\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"prothrombin_time\"='Unaffected' AND \"partial_thromboplastin_time\"='Unaffected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: What is the status of partial thromboplastin times for conditions where the platelet count is decreased? " }, { "role": "assistant", "content": "SELECT \"partial_thromboplastin_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"platelet_count\"='Decreased';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: In what conditions are both the platelet count and prothrombin time unaffected? " }, { "role": "assistant", "content": "SELECT \"condition\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"platelet_count\"='Unaffected' AND \"prothrombin_time\"='Unaffected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: What is the status of bleeding time for thrombocytopenia? " }, { "role": "assistant", "content": "SELECT \"bleeding_time\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"condition\"='Thrombocytopenia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"laboratory_findings_in_various_platelet_\" (\n \"condition\" text,\n \"prothrombin_time\" text,\n \"partial_thromboplastin_time\" text,\n \"bleeding_time\" text,\n \"platelet_count\" text\n);\n\nQuestion: What is the status of platelet counts for conditions where bleeding time is prolonged and partial thromboplastin time is unaffected? " }, { "role": "assistant", "content": "SELECT \"platelet_count\" FROM \"laboratory_findings_in_various_platelet_\" WHERE \"bleeding_time\"='Prolonged' AND \"partial_thromboplastin_time\"='Unaffected';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_results\" (\n \"player\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"best_finish\" text,\n \"money_list_rank\" real,\n \"earnings\" real\n);\n\nQuestion: Which players made exactly 8 cuts?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"2009_results\" WHERE \"cuts_made\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_results\" (\n \"player\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"best_finish\" text,\n \"money_list_rank\" real,\n \"earnings\" real\n);\n\nQuestion: What is the total number of entries for Leif Olson?" }, { "role": "assistant", "content": "SELECT COUNT(\"starts\") FROM \"2009_results\" WHERE \"player\"='Leif Olson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_results\" (\n \"player\" text,\n \"starts\" real,\n \"cuts_made\" real,\n \"best_finish\" text,\n \"money_list_rank\" real,\n \"earnings\" real\n);\n\nQuestion: What is the total number of players who had a money list rank of 96?" }, { "role": "assistant", "content": "SELECT COUNT(\"best_finish\") FROM \"2009_results\" WHERE \"money_list_rank\"=96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stock_list\" (\n \"original_no\" real,\n \"lner_no_intermediate_no\" text,\n \"br_no\" real,\n \"name\" text,\n \"rebuild_date\" text,\n \"withdrawn\" text\n);\n\nQuestion: what is the name for br no. 60501" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"stock_list\" WHERE \"br_no\"=60501;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stock_list\" (\n \"original_no\" real,\n \"lner_no_intermediate_no\" text,\n \"br_no\" real,\n \"name\" text,\n \"rebuild_date\" text,\n \"withdrawn\" text\n);\n\nQuestion: what is the name for br no. 60501" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"stock_list\" WHERE \"br_no\"=60501;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"joe_miller_r\" text,\n \"lisa_murkowski_r_write_in_candidate\" text,\n \"scott_mc_adams_d\" text\n);\n\nQuestion: When 23% scott mcadams (d) what are the dates administered?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"polling\" WHERE \"scott_mc_adams_d\"='23%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"joe_miller_r\" text,\n \"lisa_murkowski_r_write_in_candidate\" text,\n \"scott_mc_adams_d\" text\n);\n\nQuestion: When 30% is scott mcadams (d) percentage how many poll sources are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"poll_source\") FROM \"polling\" WHERE \"scott_mc_adams_d\"='30%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"umicore_n_v_financial_results\" (\n \"year_ended\" real,\n \"revenue_million\" real,\n \"earnings_before_interest_and_taxes_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share\" text\n);\n\nQuestion: Name the revenue for eps being 1.19" }, { "role": "assistant", "content": "SELECT MAX(\"revenue_million\") FROM \"umicore_n_v_financial_results\" WHERE \"earnings_per_share\"='1.19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"umicore_n_v_financial_results\" (\n \"year_ended\" real,\n \"revenue_million\" real,\n \"earnings_before_interest_and_taxes_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share\" text\n);\n\nQuestion: Name the net profit for eps beign 1.19" }, { "role": "assistant", "content": "SELECT \"net_profit_m\" FROM \"umicore_n_v_financial_results\" WHERE \"earnings_per_share\"='1.19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"umicore_n_v_financial_results\" (\n \"year_ended\" real,\n \"revenue_million\" real,\n \"earnings_before_interest_and_taxes_m\" text,\n \"net_profit_m\" text,\n \"earnings_per_share\" text\n);\n\nQuestion: Name the ebit for eps being 1.78" }, { "role": "assistant", "content": "SELECT \"earnings_before_interest_and_taxes_m\" FROM \"umicore_n_v_financial_results\" WHERE \"earnings_per_share\"='1.78';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20613292_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: How many different production codes does the episode directed by Dominic Polcino have?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_code\") FROM \"table1_20613292_1\" WHERE \"directed_by\"='Dominic Polcino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20613292_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What's the production code of the episode written by Kirker Butler and directed by Dan Povenmire?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_20613292_1\" WHERE \"written_by\"='Kirker Butler' AND \"directed_by\"='Dan Povenmire';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1996_97_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the weight in kg when the jockey was B. York? " }, { "role": "assistant", "content": "SELECT \"weight_kg\" FROM \"1996_97_season_as_a_three_year_old\" WHERE \"jockey\"='B. York';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1996_97_season_as_a_three_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the result of the race where the jockey was J. Marshall? " }, { "role": "assistant", "content": "SELECT \"result\" FROM \"1996_97_season_as_a_three_year_old\" WHERE \"jockey\"='J. Marshall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_99_season_as_a_five_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Name the most weight" }, { "role": "assistant", "content": "SELECT MAX(\"weight_kg\") FROM \"1998_99_season_as_a_five_year_old\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1998_99_season_as_a_five_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Name the date for moonee valley" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1998_99_season_as_a_five_year_old\" WHERE \"venue\"='Moonee Valley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1997_98_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What group was the Hollindale Stakes in?" }, { "role": "assistant", "content": "SELECT \"group\" FROM \"1997_98_season_as_a_four_year_old\" WHERE \"race\"='Hollindale Stakes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1997_98_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What race has a distance of 1200 m?" }, { "role": "assistant", "content": "SELECT \"race\" FROM \"1997_98_season_as_a_four_year_old\" WHERE \"distance\"='1200 m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_results\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"distance\" text,\n \"class\" text,\n \"weight_kg\" text,\n \"time\" text,\n \"jockey\" text,\n \"odds\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the result for the time of 1-26.21?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"career_results\" WHERE \"time\"='1-26.21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_results\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"distance\" text,\n \"class\" text,\n \"weight_kg\" text,\n \"time\" text,\n \"jockey\" text,\n \"odds\" text,\n \"winner_2nd\" text\n);\n\nQuestion: Who was the jockey in group 1 at the 1400m distance at randwick?" }, { "role": "assistant", "content": "SELECT \"jockey\" FROM \"career_results\" WHERE \"class\"='Group 1' AND \"venue\"='Randwick' AND \"distance\"='1400m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_results\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"distance\" text,\n \"class\" text,\n \"weight_kg\" text,\n \"time\" text,\n \"jockey\" text,\n \"odds\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What class was the 2nd - portillo?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"career_results\" WHERE \"winner_2nd\"='2nd - Portillo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_results\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"distance\" text,\n \"class\" text,\n \"weight_kg\" text,\n \"time\" text,\n \"jockey\" text,\n \"odds\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What time for the entrant weighing 54.4kg?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"career_results\" WHERE \"weight_kg\"='54.4kg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: What is every entry for epoch if periselene is 5,454.925?" }, { "role": "assistant", "content": "SELECT \"epoch_utc\" FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"periselene_km\"='5,454.925';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: What is every entry for epoch if periselene is 2,291.250?" }, { "role": "assistant", "content": "SELECT \"epoch_utc\" FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"periselene_km\"='2,291.250';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: What is every value of period when eccentricity is 0.583085?" }, { "role": "assistant", "content": "SELECT \"period_h\" FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"eccentricity\"='0.583085';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: What is every value of epoch if inclination is 90.063603?" }, { "role": "assistant", "content": "SELECT \"epoch_utc\" FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"inclination_deg_to_moon_equator\"='90.063603';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: What is every value for periselene if period is 4.947432?" }, { "role": "assistant", "content": "SELECT \"periselene_km\" FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"period_h\"='4.947432';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_osculating_selenocentric_orbi\" (\n \"epoch_utc\" text,\n \"periselene_km\" text,\n \"aposelene_km\" text,\n \"eccentricity\" text,\n \"inclination_deg_to_moon_equator\" text,\n \"period_h\" text\n);\n\nQuestion: How many values of periselene when epoch is November 15, 2004, 17:47:12.1?" }, { "role": "assistant", "content": "SELECT COUNT(\"periselene_km\") FROM \"summary_of_osculating_selenocentric_orbi\" WHERE \"epoch_utc\"='November 15, 2004, 17:47:12.1';" } ]
[ { "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 \"bruins_points\" real,\n \"opponents\" real,\n \"record\" text\n);\n\nQuestion: How many times did the Bruins play Tennessee?" }, { "role": "assistant", "content": "SELECT COUNT(\"result\") FROM \"schedule\" WHERE \"opponent\"='Tennessee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"events\" (\n \"tournament\" text,\n \"also_currently_known_as\" text,\n \"city_s\" text,\n \"country\" text,\n \"court_surface\" text,\n \"tier_iv_in\" text,\n \"years\" real\n);\n\nQuestion: What is the current tournament name for the event in Tampa?" }, { "role": "assistant", "content": "SELECT \"also_currently_known_as\" FROM \"events\" WHERE \"tournament\"='Tampa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"events\" (\n \"tournament\" text,\n \"also_currently_known_as\" text,\n \"city_s\" text,\n \"country\" text,\n \"court_surface\" text,\n \"tier_iv_in\" text,\n \"years\" real\n);\n\nQuestion: What is the tier IV year for the tournament held in Tampa?" }, { "role": "assistant", "content": "SELECT \"tier_iv_in\" FROM \"events\" WHERE \"tournament\"='Tampa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"events\" (\n \"tournament\" text,\n \"also_currently_known_as\" text,\n \"city_s\" text,\n \"country\" text,\n \"court_surface\" text,\n \"tier_iv_in\" text,\n \"years\" real\n);\n\nQuestion: What is the most years that tournaments held in Rome have lasted?" }, { "role": "assistant", "content": "SELECT MAX(\"years\") FROM \"events\" WHERE \"tournament\"='Rome';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"events\" (\n \"tournament\" text,\n \"also_currently_known_as\" text,\n \"city_s\" text,\n \"country\" text,\n \"court_surface\" text,\n \"tier_iv_in\" text,\n \"years\" real\n);\n\nQuestion: What is the city location of the tournament currently known as the Medibank International Sydney?" }, { "role": "assistant", "content": "SELECT \"city_s\" FROM \"events\" WHERE \"also_currently_known_as\"='Medibank International Sydney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scania_ab_publ_principal_shareholders\" (\n \"shareholder_name\" text,\n \"a_shares\" real,\n \"b_shares\" real,\n \"pct_of_capital\" text,\n \"pct_of_votes\" text\n);\n\nQuestion: How many different shareholders have 2.39 % of capital?" }, { "role": "assistant", "content": "SELECT COUNT(\"shareholder_name\") FROM \"scania_ab_publ_principal_shareholders\" WHERE \"pct_of_capital\"='2.39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scania_ab_publ_principal_shareholders\" (\n \"shareholder_name\" text,\n \"a_shares\" real,\n \"b_shares\" real,\n \"pct_of_capital\" text,\n \"pct_of_votes\" text\n);\n\nQuestion: What shareholders have 0 A shares?" }, { "role": "assistant", "content": "SELECT \"shareholder_name\" FROM \"scania_ab_publ_principal_shareholders\" WHERE \"a_shares\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scania_ab_publ_principal_shareholders\" (\n \"shareholder_name\" text,\n \"a_shares\" real,\n \"b_shares\" real,\n \"pct_of_capital\" text,\n \"pct_of_votes\" text\n);\n\nQuestion: What percentage of votes does the shareholder with 78.19% of capital have?" }, { "role": "assistant", "content": "SELECT \"pct_of_votes\" FROM \"scania_ab_publ_principal_shareholders\" WHERE \"pct_of_capital\"='78.19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scania_ab_publ_principal_shareholders\" (\n \"shareholder_name\" text,\n \"a_shares\" real,\n \"b_shares\" real,\n \"pct_of_capital\" text,\n \"pct_of_votes\" text\n);\n\nQuestion: How many different numbers of B shares does Handelsbanken fonder have?" }, { "role": "assistant", "content": "SELECT COUNT(\"b_shares\") FROM \"scania_ab_publ_principal_shareholders\" WHERE \"shareholder_name\"='Handelsbanken fonder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"convertible\" (\n \"interior_roof\" text,\n \"black_ua\" real,\n \"red_e8\" real,\n \"white_zr\" real,\n \"green_sw\" real,\n \"totals\" real\n);\n\nQuestion: What's the green (SW) of the model with charcoal/white interior/roof?" }, { "role": "assistant", "content": "SELECT MIN(\"green_sw\") FROM \"convertible\" WHERE \"interior_roof\"='Charcoal/white';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"convertible\" (\n \"interior_roof\" text,\n \"black_ua\" real,\n \"red_e8\" real,\n \"white_zr\" real,\n \"green_sw\" real,\n \"totals\" real\n);\n\nQuestion: How many different results for red (e8) does the model with parchment/saddle interior/roof have?" }, { "role": "assistant", "content": "SELECT COUNT(\"red_e8\") FROM \"convertible\" WHERE \"interior_roof\"='Parchment/saddle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"convertible\" (\n \"interior_roof\" text,\n \"black_ua\" real,\n \"red_e8\" real,\n \"white_zr\" real,\n \"green_sw\" real,\n \"totals\" real\n);\n\nQuestion: How many different total results are there for the model with parchment/black interior/roof?" }, { "role": "assistant", "content": "SELECT COUNT(\"totals\") FROM \"convertible\" WHERE \"interior_roof\"='Parchment/black';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Where did aaron wagner go to college" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"cfl_draft\" WHERE \"player\"='Aaron Wagner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Where did the ol go to college?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"cfl_draft\" WHERE \"position\"='OL';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the number for new mexico" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"cfl_draft\" WHERE \"college\"='New Mexico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the number for db" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"cfl_draft\" WHERE \"position\"='DB';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the player for ol" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"cfl_draft\" WHERE \"position\"='OL';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cfl_draft\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the number for dl" }, { "role": "assistant", "content": "SELECT \"pick_num\" FROM \"cfl_draft\" WHERE \"position\"='DL';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: Which companies have a free float of 0.2726?" }, { "role": "assistant", "content": "SELECT \"company\" FROM \"composition\" WHERE \"free_float\"='0.2726';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: What is every BSE code for a free float of 0.2726?" }, { "role": "assistant", "content": "SELECT \"bse_code\" FROM \"composition\" WHERE \"free_float\"='0.2726';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: What is every GICS sector for free float of 0.3180?" }, { "role": "assistant", "content": "SELECT \"gics_sector\" FROM \"composition\" WHERE \"free_float\"='0.3180';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: What is every company with an index weighting % of 1 and the city of Dimitrovgrad?" }, { "role": "assistant", "content": "SELECT \"company\" FROM \"composition\" WHERE \"index_weighting_pct\"='1' AND \"city\"='Dimitrovgrad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: How many GICS sectors have a free float of 0.2391?" }, { "role": "assistant", "content": "SELECT COUNT(\"gics_sector\") FROM \"composition\" WHERE \"free_float\"='0.2391';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"composition\" (\n \"bse_code\" text,\n \"company\" text,\n \"city\" text,\n \"gics_sector\" text,\n \"free_float\" text,\n \"index_weighting_pct\" text\n);\n\nQuestion: How many values of free float for the BSE code of 4EH?" }, { "role": "assistant", "content": "SELECT COUNT(\"free_float\") FROM \"composition\" WHERE \"bse_code\"='4EH';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_of_opinion_poll\" text,\n \"conductor\" text,\n \"sample_size\" real,\n \"for\" text,\n \"against\" text,\n \"undecided\" text\n);\n\nQuestion: When was the poll that showed 54% for and 22% undecided conducted?" }, { "role": "assistant", "content": "SELECT \"date_of_opinion_poll\" FROM \"opinion_polls\" WHERE \"for\"='54%' AND \"undecided\"='22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_of_opinion_poll\" text,\n \"conductor\" text,\n \"sample_size\" real,\n \"for\" text,\n \"against\" text,\n \"undecided\" text\n);\n\nQuestion: How many polls taken on different dates show an undecided percentage of 25%?" }, { "role": "assistant", "content": "SELECT COUNT(\"date_of_opinion_poll\") FROM \"opinion_polls\" WHERE \"undecided\"='25%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_of_opinion_poll\" text,\n \"conductor\" text,\n \"sample_size\" real,\n \"for\" text,\n \"against\" text,\n \"undecided\" text\n);\n\nQuestion: When was Quantum Research's poll conducted?" }, { "role": "assistant", "content": "SELECT \"date_of_opinion_poll\" FROM \"opinion_polls\" WHERE \"conductor\"='Quantum Research';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"date_of_opinion_poll\" text,\n \"conductor\" text,\n \"sample_size\" real,\n \"for\" text,\n \"against\" text,\n \"undecided\" text\n);\n\nQuestion: Who conducted the poll with sample size of 2000 that shows 18% undecided?" }, { "role": "assistant", "content": "SELECT \"conductor\" FROM \"opinion_polls\" WHERE \"undecided\"='18%' AND \"sample_size\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"country\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_cm\" real,\n \"height_ft\" text,\n \"hometown\" text\n);\n\nQuestion: How tall is the contestant from Ecuador?" }, { "role": "assistant", "content": "SELECT \"height_ft\" FROM \"official_delegates\" WHERE \"country\"='Ecuador';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"country\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_cm\" real,\n \"height_ft\" text,\n \"hometown\" text\n);\n\nQuestion: How tall is the contestant from Aruba?" }, { "role": "assistant", "content": "SELECT \"height_ft\" FROM \"official_delegates\" WHERE \"country\"='Aruba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"country\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_cm\" real,\n \"height_ft\" text,\n \"hometown\" text\n);\n\nQuestion: What country is the contestant from San Francisco de Yojoa from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"official_delegates\" WHERE \"hometown\"='San Francisco de Yojoa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"country\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_cm\" real,\n \"height_ft\" text,\n \"hometown\" text\n);\n\nQuestion: How many different heights are there for the contestants from Warsaw?" }, { "role": "assistant", "content": "SELECT COUNT(\"height_ft\") FROM \"official_delegates\" WHERE \"hometown\"='Warsaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What is the total of countys where Obama is popular by 35.44%?" }, { "role": "assistant", "content": "SELECT COUNT(\"county\") FROM \"by_county\" WHERE \"obamapct\"='35.44%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What are McCain's Percent when Obama has 36.47%?" }, { "role": "assistant", "content": "SELECT \"mc_cainpct\" FROM \"by_county\" WHERE \"obamapct\"='36.47%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What is McCains percent when Obamas is 39.13%" }, { "role": "assistant", "content": "SELECT COUNT(\"mc_cainnum\") FROM \"by_county\" WHERE \"obamapct\"='39.13%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"obamapct\" text,\n \"obamanum\" real,\n \"mc_cainpct\" text,\n \"mc_cainnum\" real\n);\n\nQuestion: What is the maximum Obama supporters in Wayne county?" }, { "role": "assistant", "content": "SELECT MAX(\"obamanum\") FROM \"by_county\" WHERE \"county\"='Wayne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"barangays_districts\" (\n \"barangay\" text,\n \"district\" text,\n \"population_may_1_2000\" real,\n \"population_august_1_2007\" real,\n \"population_may_1_2010\" text\n);\n\nQuestion: Name th epopulation may for general terrero" }, { "role": "assistant", "content": "SELECT \"population_may_1_2000\" FROM \"barangays_districts\" WHERE \"barangay\"='General Terrero';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"barangays_districts\" (\n \"barangay\" text,\n \"district\" text,\n \"population_may_1_2000\" real,\n \"population_august_1_2007\" real,\n \"population_may_1_2010\" text\n);\n\nQuestion: Name the total number of district for population may being 478" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"barangays_districts\" WHERE \"population_may_1_2010\"='478';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"barangays_districts\" (\n \"barangay\" text,\n \"district\" text,\n \"population_may_1_2000\" real,\n \"population_august_1_2007\" real,\n \"population_may_1_2010\" text\n);\n\nQuestion: Name the population may for cadalusan for population 1423" }, { "role": "assistant", "content": "SELECT \"population_may_1_2010\" FROM \"barangays_districts\" WHERE \"district\"='CadaLuSan' AND \"population_august_1_2007\"=1423;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20704243_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What is the season number for Series #23, the Runway Job?" }, { "role": "assistant", "content": "SELECT \"season_num\" FROM \"table1_20704243_3\" WHERE \"series_num\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_20704243_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 \"u_s_viewers_in_millions\" text\n);\n\nQuestion: What series was directed by Mark Roskin?" }, { "role": "assistant", "content": "SELECT MIN(\"series_num\") FROM \"table1_20704243_3\" WHERE \"directed_by\"='Mark Roskin';" } ]