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 \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: When has a Source of surveyusa and a Obama of 54%?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"polling\" WHERE \"source\"='surveyusa' AND \"obama\"='54%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: When has a Source of rasmussen reports?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"polling\" WHERE \"source\"='rasmussen reports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: Which Source has a Clinton of 39% and a Undecided of 7%?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"polling\" WHERE \"clinton\"='39%' AND \"undecided\"='7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2004_summer_olympics_m\" (\n \"name\" text,\n \"date_of_birth\" text,\n \"height\" real,\n \"weight\" real,\n \"spike\" real,\n \"block\" real\n);\n\nQuestion: What is the Date of Birth with a Block that is larger than 342?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"volleyball_at_the_2004_summer_olympics_m\" WHERE \"block\">342;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"launch_date\" real,\n \"owner\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013_p\" real\n);\n\nQuestion: What is the number of positions that have 2012 ratings of 0.92?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"most_viewed_channels\" WHERE \"2012\"='0.92';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"launch_date\" real,\n \"owner\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013_p\" real\n);\n\nQuestion: What is the owner of the channel that has a 2012 rating of 5.42?" }, { "role": "assistant", "content": "SELECT \"owner\" FROM \"most_viewed_channels\" WHERE \"2012\"='5.42';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"launch_date\" real,\n \"owner\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013_p\" real\n);\n\nQuestion: What is the 2007 rating of the channel with a position of 6?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"most_viewed_channels\" WHERE \"position\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_viewed_channels\" (\n \"position\" real,\n \"channel\" text,\n \"launch_date\" real,\n \"owner\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013_p\" real\n);\n\nQuestion: What is the channel with a 2011 rating of 8.5?" }, { "role": "assistant", "content": "SELECT \"channel\" FROM \"most_viewed_channels\" WHERE \"2011\"='8.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is ASTC Member, when State is Arkansas, when AAM Member is No, and when AAM Accredited is Yes?" }, { "role": "assistant", "content": "SELECT \"astc_member\" FROM \"see_also\" WHERE \"state\"='arkansas' AND \"aam_member\"='no' AND \"aam_accredited\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is City, when State is Florida, when AAM Member is No, and when AAM Accredited is No?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"see_also\" WHERE \"state\"='florida' AND \"aam_member\"='no' AND \"aam_accredited\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is City, when ASTC Member is No, when State is California, and when AAM Member is Yes?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"see_also\" WHERE \"astc_member\"='no' AND \"state\"='california' AND \"aam_member\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is State, when AAM Accredited is No, when ASTC Member is No, and when City is Tulsa?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"see_also\" WHERE \"aam_accredited\"='no' AND \"astc_member\"='no' AND \"city\"='tulsa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"see_also\" WHERE \"state\"='california' AND \"aam_accredited\"='no' AND \"astc_member\"='yes' AND \"aam_member\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"city\" text,\n \"state\" text,\n \"aam_accredited\" text,\n \"aam_member\" text,\n \"astc_member\" text\n);\n\nQuestion: What is AAM Member, when AAM Accredited is No, when State is California, when ASTC Member is Yes, and when City is Sacramento?" }, { "role": "assistant", "content": "SELECT \"aam_member\" FROM \"see_also\" WHERE \"aam_accredited\"='no' AND \"state\"='california' AND \"astc_member\"='yes' AND \"city\"='sacramento';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"country\" text,\n \"team\" text,\n \"individual\" text,\n \"location\" text,\n \"runners_up\" text\n);\n\nQuestion: Who were the runners-up when the individual winner was Tiger Woods?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"winners\" WHERE \"individual\"='tiger woods';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"country\" text,\n \"team\" text,\n \"individual\" text,\n \"location\" text,\n \"runners_up\" text\n);\n\nQuestion: How many years was the individual winner from the United States was Tiger Woods?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"winners\" WHERE \"country\"='united states' AND \"individual\"='tiger woods';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"country\" text,\n \"team\" text,\n \"individual\" text,\n \"location\" text,\n \"runners_up\" text\n);\n\nQuestion: What is the earliest year that the tournament was played in Cape Town, South Africa?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"winners\" WHERE \"location\"='cape town, south africa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"topscorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the highest league for the league cup more than 1, and a FA cup of 1?" }, { "role": "assistant", "content": "SELECT MAX(\"league\") FROM \"topscorers_in_order_of_league_goals\" WHERE \"league_cup\">1 AND \"fa_cup\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"date\" text,\n \"location\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"team\" text\n);\n\nQuestion: Who is the Driver, when the Date is October 6?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"winners\" WHERE \"date\"='october 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"date\" text,\n \"location\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"team\" text\n);\n\nQuestion: What is the total number of Seasons, when the Engine is Cosworth, and when the Team is Kraco Racing?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"winners\" WHERE \"engine\"='cosworth' AND \"team\"='kraco racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"date\" text,\n \"location\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"team\" text\n);\n\nQuestion: Who is the Driver, when the Engine is Chevrolet, and when the Date is October 3?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"winners\" WHERE \"engine\"='chevrolet' AND \"date\"='october 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"season\" real,\n \"date\" text,\n \"location\" text,\n \"driver\" text,\n \"chassis\" text,\n \"engine\" text,\n \"team\" text\n);\n\nQuestion: What is the sum of Seasons, when the Team is Penske Racing, and when the Date is October 3?" }, { "role": "assistant", "content": "SELECT SUM(\"season\") FROM \"winners\" WHERE \"team\"='penske racing' AND \"date\"='october 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bridges_under_construction\" (\n \"name\" text,\n \"main_span_metres\" text,\n \"main_span_feet\" text,\n \"year_to_open\" real,\n \"country\" text\n);\n\nQuestion: What was the Year to Open for the Dandeung Bridge?" }, { "role": "assistant", "content": "SELECT COUNT(\"year_to_open\") FROM \"bridges_under_construction\" WHERE \"name\"='dandeung bridge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bridges_under_construction\" (\n \"name\" text,\n \"main_span_metres\" text,\n \"main_span_feet\" text,\n \"year_to_open\" real,\n \"country\" text\n);\n\nQuestion: What is the Main span of the Qincaobei Bridge" }, { "role": "assistant", "content": "SELECT \"main_span_feet\" FROM \"bridges_under_construction\" WHERE \"name\"='qincaobei bridge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bridges_under_construction\" (\n \"name\" text,\n \"main_span_metres\" text,\n \"main_span_feet\" text,\n \"year_to_open\" real,\n \"country\" text\n);\n\nQuestion: What is the Main span of the bridge from China with a Year to open of 2013 and Main span feet of 2,585?" }, { "role": "assistant", "content": "SELECT \"main_span_metres\" FROM \"bridges_under_construction\" WHERE \"year_to_open\"=2013 AND \"country\"='china' AND \"main_span_feet\"='2,585';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"conservative_ticket\" text,\n \"liberal_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"socialist_workers_ticket\" text\n);\n\nQuestion: Which republican ticket has stanley h. fuld as the Democratic ticket?" }, { "role": "assistant", "content": "SELECT \"republican_ticket\" FROM \"1966_state_election_results\" WHERE \"democratic_ticket\"='stanley h. fuld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"conservative_ticket\" text,\n \"liberal_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"socialist_workers_ticket\" text\n);\n\nQuestion: What is the liberal ticket that has judith white as the socialist workers?" }, { "role": "assistant", "content": "SELECT \"liberal_ticket\" FROM \"1966_state_election_results\" WHERE \"socialist_workers_ticket\"='judith white';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"conservative_ticket\" text,\n \"liberal_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"socialist_workers_ticket\" text\n);\n\nQuestion: What socialist workers ticket has malcolm wilson as the Republican ticket?" }, { "role": "assistant", "content": "SELECT \"socialist_workers_ticket\" FROM \"1966_state_election_results\" WHERE \"republican_ticket\"='malcolm wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"conservative_ticket\" text,\n \"liberal_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"socialist_workers_ticket\" text\n);\n\nQuestion: Which office has kieran o'doherty as the conservative ticket?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"1966_state_election_results\" WHERE \"conservative_ticket\"='kieran o''doherty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966_state_election_results\" (\n \"office\" text,\n \"republican_ticket\" text,\n \"democratic_ticket\" text,\n \"conservative_ticket\" text,\n \"liberal_ticket\" text,\n \"socialist_labor_ticket\" text,\n \"socialist_workers_ticket\" text\n);\n\nQuestion: What office has (none) as the socialist labor ticket, and stanley h. fuld as the liberal ticket?" }, { "role": "assistant", "content": "SELECT \"office\" FROM \"1966_state_election_results\" WHERE \"socialist_labor_ticket\"='(none)' AND \"liberal_ticket\"='stanley h. fuld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: If the call sign is w291ch what's the ERP W corresponding to that sign?" }, { "role": "assistant", "content": "SELECT \"erp_w\" FROM \"translators\" WHERE \"call_sign\"='w291ch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: For the call sign w242at what's the city the license plate is registered to?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"call_sign\"='w242at';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What's the Class for the city the license plate was issued in great barrington, massachusetts?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"translators\" WHERE \"city_of_license\"='great barrington, massachusetts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold have a bronze of 1, a rank smaller than 6, and a total less than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"bronze\"=1 AND \"rank\"<6 AND \"total\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many France bronze have a gold of more than 1 and a rank of 0?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"medals_table\" WHERE \"gold\">1 AND \"nation\"='france' AND \"rank\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold have a silver of 1 and a bronze of 0?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"silver\"=1 AND \"bronze\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What is the Aircraft when Kabul was the location, unknown fatalities, and the tail number was ya-ban?" }, { "role": "assistant", "content": "SELECT \"aircraft\" FROM \"accidents_and_incidents\" WHERE \"location\"='kabul' AND \"fatalities\"='unknown' AND \"tail_number\"='ya-ban';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What is the Fatalities when the tail number was unknown and in Kabul>" }, { "role": "assistant", "content": "SELECT \"fatalities\" FROM \"accidents_and_incidents\" WHERE \"tail_number\"='unknown' AND \"location\"='kabul';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What is the location for the an-12b aircraft?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"accidents_and_incidents\" WHERE \"aircraft\"='an-12b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What location had 25/25 fatalities?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"accidents_and_incidents\" WHERE \"fatalities\"='25/25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What tail number was on the an-26, with 25/25 fatalities?" }, { "role": "assistant", "content": "SELECT \"tail_number\" FROM \"accidents_and_incidents\" WHERE \"aircraft\"='an-26' AND \"fatalities\"='25/25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accidents_and_incidents\" (\n \"location\" text,\n \"aircraft\" text,\n \"tail_number\" text,\n \"aircraft_damage\" text,\n \"fatalities\" text\n);\n\nQuestion: What type of aircraft was the plane with a tail number of ya-bao?" }, { "role": "assistant", "content": "SELECT \"aircraft\" FROM \"accidents_and_incidents\" WHERE \"tail_number\"='ya-bao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the total number of Points from a Match that is larger than 18?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"third_league\" WHERE \"match\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"racing_record\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: In what Season was the Series Formula Renault 3.5 series with less than 7 Races?" }, { "role": "assistant", "content": "SELECT SUM(\"season\") FROM \"racing_record\" WHERE \"series\"='formula renault 3.5 series' AND \"races\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"racing_record\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What was the Series in 2009?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"racing_record\" WHERE \"season\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"racing_record\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: How many Wins in the Year with more than 16 Races?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"racing_record\" WHERE \"races\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"racing_record\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: In what Season were then less than 3 Races with less than 1 Win?" }, { "role": "assistant", "content": "SELECT AVG(\"season\") FROM \"racing_record\" WHERE \"races\"<3 AND \"wins\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which 1st leg has a Team #1 of ummc ekaterinburg?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"eighth_finals\" WHERE \"team_num1\"='ummc ekaterinburg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team #2 has a 2nd leg of 79 - 74 (ot)?" }, { "role": "assistant", "content": "SELECT \"team_num2\" FROM \"eighth_finals\" WHERE \"2nd_leg\"='79 - 74 (ot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team #2 has a 1st leg of 70 - 44?" }, { "role": "assistant", "content": "SELECT \"team_num2\" FROM \"eighth_finals\" WHERE \"1st_leg\"='70 - 44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eighth_finals\" (\n \"team_num1\" text,\n \"agg\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team #2 has a Team #1 of gambrinus sika brno?" }, { "role": "assistant", "content": "SELECT \"team_num2\" FROM \"eighth_finals\" WHERE \"team_num1\"='gambrinus sika brno';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Goal number in R\u00e5sunda, Stockholm with a Result of 2\u20132?" }, { "role": "assistant", "content": "SELECT AVG(\"goal\") FROM \"international_goals\" WHERE \"result\"='2\u20132' AND \"venue\"='r\u00e5sunda, stockholm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Result of Goal number 3?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"goal\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: On what day was a game played at Reese Smith Field, with a score of 4-3?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule_and_results\" WHERE \"score\"='4-3' AND \"site_stadium\"='reese smith field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game played on May 10 at Alex Box Stadium?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"site_stadium\"='alex box stadium' AND \"date\"='may 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: What was the score for the game played at Sarge Frye Field?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"site_stadium\"='sarge frye field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: On what date was a game played, which left the team with a record of 5-7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule_and_results\" WHERE \"record\"='5-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game played at Harmon Stadium on February 24?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"site_stadium\"='harmon stadium' AND \"date\"='february 24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"record\" text\n);\n\nQuestion: Where was the game on May 9 played?" }, { "role": "assistant", "content": "SELECT \"site_stadium\" FROM \"schedule_and_results\" WHERE \"date\"='may 9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the greatest position when the points are less than 21, and the played greater than 14?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"campeonato_paulista\" WHERE \"points\"<21 AND \"played\">14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the fewest lost with a difference of 9 and a less than 3 drawn?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"campeonato_paulista\" WHERE \"difference\"='9' AND \"drawn\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Team Estudantes Paulista with a position less than 4 has what average against?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"campeonato_paulista\" WHERE \"team\"='estudantes paulista' AND \"position\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory on Apr 8, 1979?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_tour_wins_8\" WHERE \"date\"='apr 8, 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score when the margin of victory was 2 strokes and the runner-up was Pat Bradley?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"lpga_tour_wins_8\" WHERE \"margin_of_victory\"='2 strokes' AND \"runner_s_up\"='pat bradley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory when the winning score was \u22125 (69-69-73=211)?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_tour_wins_8\" WHERE \"winning_score\"='\u22125 (69-69-73=211)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which tournament had a winning score of \u22125 (69-69-73=211)?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"lpga_tour_wins_8\" WHERE \"winning_score\"='\u22125 (69-69-73=211)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_8\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: When was the winning score \u22126 (69-69-73-71=282)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"lpga_tour_wins_8\" WHERE \"winning_score\"='\u22126 (69-69-73-71=282)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the opponent of the game played on November 20, 1995?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 20, 1995';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest Grid with a Name that is jamie whincup?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"race_2_results\" WHERE \"name\"='jamie whincup';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Team with a Lap that is 5?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race_2_results\" WHERE \"laps\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft_selections\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the lowest round Justin Forsett was drafted in, with a draft pick larger than 233?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"2008_nfl_draft_selections\" WHERE \"name\"='justin forsett' AND \"pick\">233;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft_selections\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the average round the position of RB was drafted?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"2008_nfl_draft_selections\" WHERE \"position\"='rb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft_selections\" (\n \"round\" real,\n \"pick\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What's the average round Red Bryant was drafted with a pick larger than 121?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"2008_nfl_draft_selections\" WHERE \"name\"='red bryant' AND \"pick\">121;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"overall_record\" text,\n \"divisional_record\" text\n);\n\nQuestion: Can you tell me the Overall Record that has the Away Team of miami?" }, { "role": "assistant", "content": "SELECT \"overall_record\" FROM \"schedule\" WHERE \"away_team\"='miami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"overall_record\" text,\n \"divisional_record\" text\n);\n\nQuestion: Can you tell me the Overall Record that has the Week of 3?" }, { "role": "assistant", "content": "SELECT \"overall_record\" FROM \"schedule\" WHERE \"week\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"overall_record\" text,\n \"divisional_record\" text\n);\n\nQuestion: Can you tell me the Divisional Record that has the Away Team of dallas?" }, { "role": "assistant", "content": "SELECT \"divisional_record\" FROM \"schedule\" WHERE \"away_team\"='dallas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"overall_record\" text,\n \"divisional_record\" text\n);\n\nQuestion: Can you tell me the Overall Record that has the Week smaller than 16, and the Divisional Record of (1-0), and the Away Team of miami?" }, { "role": "assistant", "content": "SELECT \"overall_record\" FROM \"schedule\" WHERE \"week\"<16 AND \"divisional_record\"='(1-0)' AND \"away_team\"='miami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"home_team\" text,\n \"away_team\" text,\n \"overall_record\" text,\n \"divisional_record\" text\n);\n\nQuestion: Can you tell me the Week that has the Home Team of detroit, and the Divisional Record of (3-0), and the Overall Record of (5-1), and the Away Team of minnesota?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"home_team\"='detroit' AND \"divisional_record\"='(3-0)' AND \"overall_record\"='(5-1)' AND \"away_team\"='minnesota';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"week_6_july_16_2008\" (\n \"couple\" text,\n \"style\" text,\n \"music\" text,\n \"choreographer_s\" text,\n \"results\" text\n);\n\nQuestion: Who is the choreographer with the style pas de deux?" }, { "role": "assistant", "content": "SELECT \"choreographer_s\" FROM \"week_6_july_16_2008\" WHERE \"style\"='pas de deux';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"autocephalous_church_since_1967\" (\n \"name\" text,\n \"start_of_reign\" real,\n \"end_of_reign\" text,\n \"birth_name\" text,\n \"title\" text\n);\n\nQuestion: What is the end of reign for Dimitar Stojkovski?" }, { "role": "assistant", "content": "SELECT \"end_of_reign\" FROM \"autocephalous_church_since_1967\" WHERE \"birth_name\"='dimitar stojkovski';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"autocephalous_church_since_1967\" (\n \"name\" text,\n \"start_of_reign\" real,\n \"end_of_reign\" text,\n \"birth_name\" text,\n \"title\" text\n);\n\nQuestion: What is the title of the person who started their reign in 1999?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"autocephalous_church_since_1967\" WHERE \"start_of_reign\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"autocephalous_church_since_1967\" (\n \"name\" text,\n \"start_of_reign\" real,\n \"end_of_reign\" text,\n \"birth_name\" text,\n \"title\" text\n);\n\nQuestion: What is the date of birth of the person who started their reign in 1986?" }, { "role": "assistant", "content": "SELECT \"birth_name\" FROM \"autocephalous_church_since_1967\" WHERE \"start_of_reign\"=1986;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"career\" text,\n \"apps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the average number for goals less than 73?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"top_goalscorers\" WHERE \"goals\"<73;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"name\" text,\n \"career\" text,\n \"apps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the total average for 1990-1995, and goals less than 90?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"top_goalscorers\" WHERE \"career\"='1990-1995' AND \"goals\"<90;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What was the lowest Position for a Team with fewer than 3 Lost, a Difference of 1, and more than 7 games Played?" }, { "role": "assistant", "content": "SELECT MIN(\"position\") FROM \"torneio_rio_s_o_paulo\" WHERE \"lost\"<3 AND \"difference\"='1' AND \"played\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the sum of games Played by the Team Vasco Da Gama, with fewer than 12 Against?" }, { "role": "assistant", "content": "SELECT SUM(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"team\"='vasco da gama' AND \"against\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What was the Difference of the Team that had a Position less than 2?" }, { "role": "assistant", "content": "SELECT \"difference\" FROM \"torneio_rio_s_o_paulo\" WHERE \"position\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which attendance number was taken on november 21, 2004?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='november 21, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which attendance number was taken in a week less than 16 when the Washington Redskins were the opponents?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<16 AND \"opponent\"='washington redskins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many weeks had the Green Bay packers as opponents?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"opponent\"='green bay packers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_friday_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Country had a Score of 71-67=138?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round_friday_saturday\" WHERE \"score\"='71-67=138';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round_friday_saturday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What Country had a Score of 75-68=143?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round_friday_saturday\" WHERE \"score\"='75-68=143';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sri_lanka\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: How many total innings have an average under 6.33, strike rate under 71.43, balls faced over 36, and smaller than 19 runs scored?" }, { "role": "assistant", "content": "SELECT SUM(\"innings\") FROM \"sri_lanka\" WHERE \"average\"<6.33 AND \"s_r\"<71.43 AND \"balls_faced\">36 AND \"runs_scored\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sri_lanka\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: What is the number of averages having a balls faced over 297 and more than 7 innings?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"sri_lanka\" WHERE \"balls_faced\">297 AND \"innings\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sri_lanka\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: What is the smallest number of innings with a strike rate of 72.05 and under 297 balls faced?" }, { "role": "assistant", "content": "SELECT MIN(\"innings\") FROM \"sri_lanka\" WHERE \"s_r\"=72.05 AND \"balls_faced\"<297;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sri_lanka\" (\n \"name\" text,\n \"innings\" real,\n \"runs_scored\" real,\n \"balls_faced\" real,\n \"average\" real,\n \"s_r\" real\n);\n\nQuestion: What is the sum of balls faced associated with a strike rate over 48.28, 3 innings, and an average under 5?" }, { "role": "assistant", "content": "SELECT SUM(\"balls_faced\") FROM \"sri_lanka\" WHERE \"s_r\">48.28 AND \"innings\"=3 AND \"average\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"record_progression\" (\n \"record\" text,\n \"athlete\" text,\n \"nation\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Nation with a Date that is may 6, 1991?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"record_progression\" WHERE \"date\"='may 6, 1991';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"record_progression\" (\n \"record\" text,\n \"athlete\" text,\n \"nation\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the Record with a Date that is may 20, 1961?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"record_progression\" WHERE \"date\"='may 20, 1961';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5_1_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: Who was the partner of the winner?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_5_1_4\" WHERE \"outcome\"='winner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the Volume:Issue for the song \" stars on 45 medley \"?" }, { "role": "assistant", "content": "SELECT \"volume_issue\" FROM \"see_also\" WHERE \"song\"='\\\" stars on 45 medley \\\"';" } ]