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 \"preliminary_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the first leg score when the second leg score is 0-4?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"preliminary_round\" WHERE \"2nd_leg\"='0-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Status with a Name that is anas cheuen?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"newly_named_birds\" WHERE \"name\"='anas cheuen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newly_named_birds\" (\n \"name\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Unit with a Name that is anas cheuen?" }, { "role": "assistant", "content": "SELECT \"unit\" FROM \"newly_named_birds\" WHERE \"name\"='anas cheuen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What team was the Opponent when the Score was 31-6?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"score\"='31-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Score when the record was 9-3-0?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule\" WHERE \"record\"='9-3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Record with an attendance of more than 54,761, and a Result of loss?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"attendance\">'54,761' AND \"result\"='loss';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: What is the away team where the home team is Coventry City?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"third_round_proper\" WHERE \"home_team\"='coventry city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score where the away team is Exeter City?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round_proper\" WHERE \"away_team\"='exeter city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: How many ties does Walsall have?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='walsall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: Where Bolton Wanderers is the home team, who is the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"third_round_proper\" WHERE \"home_team\"='bolton wanderers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: How many ties are there where attendance is 11,997?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"attendance\"='11,997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text,\n \"attendance\" text\n);\n\nQuestion: Where the away team is Bradford City, who is the home team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='bradford city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"t\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: For which school/club team did the player in the position of Guard/Forward play?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"t\" WHERE \"position\"='guard/forward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"t\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How was the player in the position of Center acquired?" }, { "role": "assistant", "content": "SELECT \"acquisition_via\" FROM \"t\" WHERE \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"t\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: In what season did Omar Thomas play, with a jersey number larger than 15?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"t\" WHERE \"number\">15 AND \"name\"='omar thomas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"t\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: How many total players came from the school/club team of De La Salle?" }, { "role": "assistant", "content": "SELECT COUNT(\"number\") FROM \"t\" WHERE \"school_club_team\"='de la salle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"t\" (\n \"name\" text,\n \"position\" text,\n \"number\" real,\n \"school_club_team\" text,\n \"season\" text,\n \"acquisition_via\" text\n);\n\nQuestion: Which player is in the position of Guard/Forward?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"t\" WHERE \"position\"='guard/forward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the most wins associated with under 4 events with 0 top-5s?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"summary\" WHERE \"top_5\">0 AND \"events\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of events having 1 top-10, fewer than 4 cuts made, and 0 wins?" }, { "role": "assistant", "content": "SELECT AVG(\"events\") FROM \"summary\" WHERE \"top_10\"=1 AND \"wins\">0 AND \"cuts_made\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average number of wins for events larger than 28?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"summary\" WHERE \"events\">28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the sum of top-25s for events with more than 1 top-5?" }, { "role": "assistant", "content": "SELECT SUM(\"top_25\") FROM \"summary\" WHERE \"top_5\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"producer\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: Who is the producer of city sharks?" }, { "role": "assistant", "content": "SELECT \"producer\" FROM \"2003\" WHERE \"title\"='city sharks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"producer\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: What is the title of the film when the producer was 2003?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"2003\" WHERE \"producer\"='2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"producer\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: Who is the director when the title is 2003?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"2003\" WHERE \"title\"='2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"producer\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: What is the production cost when the producer is raintree pictures?" }, { "role": "assistant", "content": "SELECT \"production_cost\" FROM \"2003\" WHERE \"producer\"='raintree pictures';" } ]
[ { "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\" real\n);\n\nQuestion: What was the lowest attendance at a week 15 game?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What is the Score for the game with a record of 38-18?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule\" WHERE \"record\"='38-18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What team was the opponent when the score was 8-2?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"score\"='8-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What is the Location when the opponent shows vs. ole miss, and a Loss of mckean (4-1)?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"schedule\" WHERE \"opponent\"='vs. ole miss' AND \"loss\"='mckean (4-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What is the name of the Opponent when there is a Record of 39-19?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"record\"='39-19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What is the Record on may 24, with a Loss of hayes (2-1)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"date\"='may 24' AND \"loss\"='hayes (2-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What is the Location when the Opponent shows vs. #23 south carolina?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"schedule\" WHERE \"opponent\"='vs. #23 south carolina';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"2002_2003_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What is that if the weight for the play born on June 2, 1983?" }, { "role": "assistant", "content": "SELECT SUM(\"weight_kg\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"birthdate\"='june 2, 1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"2002_2003_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: What was the highest weight in kg for F Position, Jersey #12?" }, { "role": "assistant", "content": "SELECT MAX(\"weight_kg\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"position\"='f' AND \"jersey_num\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"jersey_num\" real,\n \"name\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthdate\" text,\n \"birthplace\" text,\n \"2002_2003_team\" text,\n \"nhl_rights_if_any\" text\n);\n\nQuestion: Which player is the NHL right, who was born in Downers Grove, Illinois?" }, { "role": "assistant", "content": "SELECT \"nhl_rights_if_any\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"birthplace\"='downers grove, illinois';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which coding's variant id is abd'1a 3?" }, { "role": "assistant", "content": "SELECT \"coding\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"variant_id\"='abd''1a 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which 5'utr splice's coding is 1a 2, when the Variant id is abd'1a 2?" }, { "role": "assistant", "content": "SELECT \"5_utr_splice\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"coding\"='1a 2' AND \"variant_id\"='abd''1a 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which variant id's coding is 1a 5 when the 5'utr splice is abd'?" }, { "role": "assistant", "content": "SELECT \"variant_id\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"coding\"='1a 5' AND \"5_utr_splice\"='abd''';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which genbank id's variant is abd1a?" }, { "role": "assistant", "content": "SELECT \"gen_bank_id\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"variant_id\"='abd1a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which coding entry has a 3'utr sequence of 1a 0 and a 5'utr splice that is abd?" }, { "role": "assistant", "content": "SELECT \"coding\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"3_utr_sequence\"='1a 0' AND \"5_utr_splice\"='abd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sftpa2_m_rna_transcript_variants\" (\n \"variant_id\" text,\n \"5_utr_splice\" text,\n \"coding\" text,\n \"3_utr_sequence\" text,\n \"gen_bank_id\" text\n);\n\nQuestion: Which genbank id has a 5'utr splice of abd and a variant id that is abd1a 3?" }, { "role": "assistant", "content": "SELECT \"gen_bank_id\" FROM \"sftpa2_m_rna_transcript_variants\" WHERE \"5_utr_splice\"='abd' AND \"variant_id\"='abd1a 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What year did Orlando have a School/Club team in Clemson?" }, { "role": "assistant", "content": "SELECT \"years_in_orlando\" FROM \"g\" WHERE \"school_club_team\"='clemson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What years did the player in Orlando play that is from the United States, and is part of the school/club team Clemson?" }, { "role": "assistant", "content": "SELECT \"years_in_orlando\" FROM \"g\" WHERE \"nationality\"='united states' AND \"school_club_team\"='clemson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player for the School/Club team in Georgia?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"g\" WHERE \"school_club_team\"='georgia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What was the nationality of the player Pat Garrity?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"g\" WHERE \"player\"='pat garrity';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"g\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the School/Club team of Louisville?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"g\" WHERE \"school_club_team\"='louisville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins\" (\n \"driver\" text,\n \"wins\" real,\n \"starts\" real,\n \"sprint\" real,\n \"feature\" real\n);\n\nQuestion: How many features did Adam Carroll win 6 times when the start was larger than 32?" }, { "role": "assistant", "content": "SELECT COUNT(\"feature\") FROM \"wins\" WHERE \"wins\"=6 AND \"driver\"='adam carroll' AND \"starts\">32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins\" (\n \"driver\" text,\n \"wins\" real,\n \"starts\" real,\n \"sprint\" real,\n \"feature\" real\n);\n\nQuestion: What is the lowest feature with 2 wins and 2 sprints?" }, { "role": "assistant", "content": "SELECT MIN(\"feature\") FROM \"wins\" WHERE \"wins\"=2 AND \"sprint\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins\" (\n \"driver\" text,\n \"wins\" real,\n \"starts\" real,\n \"sprint\" real,\n \"feature\" real\n);\n\nQuestion: How many sprints on average had 10 wins and less than 5 features?" }, { "role": "assistant", "content": "SELECT AVG(\"sprint\") FROM \"wins\" WHERE \"wins\"=10 AND \"feature\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: Which country has a lane greater than 6 and a mark of 6.63?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final\" WHERE \"lane\">6 AND \"mark\"='6.63';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the lowest lane for Nigeria, with a react less than 0.133?" }, { "role": "assistant", "content": "SELECT MIN(\"lane\") FROM \"final\" WHERE \"country\"='nigeria' AND \"react\"<0.133;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the mark for Kim Collins?" }, { "role": "assistant", "content": "SELECT \"mark\" FROM \"final\" WHERE \"name\"='kim collins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which country had 1 Bronze, 1 Silver, with a total of 3 medals?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"bronze\"=1 AND \"total\"=3 AND \"silver\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which country had more than 2 silvers and less than 4 golds?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"silver\">2 AND \"gold\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the average bronze with a total number of medals being 1, with more than 0 silvers?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"total\"=1 AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: In the 2005 season, how many races did the 15th place team complete?" }, { "role": "assistant", "content": "SELECT AVG(\"races\") FROM \"career_summary\" WHERE \"final_placing\"='15th' AND \"season\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" text,\n \"final_placing\" text\n);\n\nQuestion: Which team completed 10 races?" }, { "role": "assistant", "content": "SELECT \"team_name\" FROM \"career_summary\" WHERE \"races\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the PBA team with a Pick that is 4?" }, { "role": "assistant", "content": "SELECT \"pba_team\" FROM \"round_1\" WHERE \"pick\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the Player with a Pick that is 6?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_1\" WHERE \"pick\"=6;" } ]
[ { "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 totals have 1 gold and a rank smaller than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medals_table\" WHERE \"gold\"=1 AND \"rank\"<2;" } ]
[ { "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 much gold did South Korea get?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"nation\"='south korea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"built\" real,\n \"number\" real,\n \"type\" text,\n \"slm_number\" real,\n \"wheel_arrangement\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What locomotive built after 1895 has the highest SLM number?" }, { "role": "assistant", "content": "SELECT MAX(\"slm_number\") FROM \"united_kingdom\" WHERE \"built\">1895;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"built\" real,\n \"number\" real,\n \"type\" text,\n \"slm_number\" real,\n \"wheel_arrangement\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: Which type of locomotive was built in 1923?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"united_kingdom\" WHERE \"built\"=1923;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"united_kingdom\" (\n \"built\" real,\n \"number\" real,\n \"type\" text,\n \"slm_number\" real,\n \"wheel_arrangement\" text,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the first locomotive that has a SLM number lower than 924?" }, { "role": "assistant", "content": "SELECT MIN(\"number\") FROM \"united_kingdom\" WHERE \"slm_number\"<924;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_lightweight_tt_250cc_fi\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: When the United Kingdom had a time of 1:30.51.2, what was the lowest that they ranked?" }, { "role": "assistant", "content": "SELECT MIN(\"place\") FROM \"1972_isle_of_man_lightweight_tt_250cc_fi\" WHERE \"country\"='united kingdom' AND \"time\"='1:30.51.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_lightweight_tt_250cc_fi\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What County scored with a speed of 98.09mph?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"1972_isle_of_man_lightweight_tt_250cc_fi\" WHERE \"speed\"='98.09mph';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 4, when Date is Jun 27, and when Set 3 is 17-25?" }, { "role": "assistant", "content": "SELECT \"set_4\" FROM \"results_pool_e\" WHERE \"date\"='jun 27' AND \"set_3\"='17-25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Score, when Set 3 is 17-25?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results_pool_e\" WHERE \"set_3\"='17-25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 5, when Date is Jun 26, and when Set 2 is 25-22?" }, { "role": "assistant", "content": "SELECT \"set_5\" FROM \"results_pool_e\" WHERE \"date\"='jun 26' AND \"set_2\"='25-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 1, when Set 3 is 22-25?" }, { "role": "assistant", "content": "SELECT \"set_1\" FROM \"results_pool_e\" WHERE \"set_3\"='22-25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 1, when Date is Jun 26, and when Set 4 is 26-24?" }, { "role": "assistant", "content": "SELECT \"set_1\" FROM \"results_pool_e\" WHERE \"date\"='jun 26' AND \"set_4\"='26-24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_pool_e\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is Set 4, when Set 5 is NA, and when Set 3 is 19-25?" }, { "role": "assistant", "content": "SELECT \"set_4\" FROM \"results_pool_e\" WHERE \"set_5\"='na' AND \"set_3\"='19-25';" } ]
[ { "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);\n\nQuestion: What is the Team when the match was in buenos aires , argentina?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"winners\" WHERE \"location\"='buenos aires , argentina';" } ]
[ { "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);\n\nQuestion: What is the Location when the team was seve ballesteros & manuel pi\u00f1ero?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"winners\" WHERE \"team\"='seve ballesteros & manuel pi\u00f1ero';" } ]
[ { "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);\n\nQuestion: What is the Location when the individual was jos\u00e9 maria ca\u00f1izares?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"winners\" WHERE \"individual\"='jos\u00e9 maria ca\u00f1izares';" } ]
[ { "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);\n\nQuestion: What is the highest Year when the team was seve ballesteros & manuel pi\u00f1ero?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"winners\" WHERE \"team\"='seve ballesteros & manuel pi\u00f1ero';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"closed_landfills\" (\n \"landfill\" text,\n \"location\" text,\n \"acres\" real,\n \"opened\" real,\n \"capacity\" text,\n \"status\" text,\n \"rehab_period\" text\n);\n\nQuestion: What is the total number of acres at Sai Tso Wan, opening before 1978?" }, { "role": "assistant", "content": "SELECT COUNT(\"acres\") FROM \"closed_landfills\" WHERE \"landfill\"='sai tso wan' AND \"opened\"<1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Which Rank has a Goals smaller than 76, and a Matches larger than 270?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"goals\"<76 AND \"matches\">270;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Which Matches have a Rank smaller than 5, a Years of 1995\u20132003, and a Goals smaller than 104?" }, { "role": "assistant", "content": "SELECT AVG(\"matches\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"rank\"<5 AND \"years\"='1995\u20132003' AND \"goals\"<104;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Which Goals have a Name of lee dong-gook?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"name\"='lee dong-gook';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Which Rank has a Years of 1998\u2013present?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"years\"='1998\u2013present';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: Which Matches have a Rank of 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"matches\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"rank\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What Position was achieved in the World Championships Competition in Tokyo, Japan?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"competition\"='world championships' AND \"venue\"='tokyo, japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which Competition was 1st Position with 57.03 in Notes?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"achievements\" WHERE \"position\"='1st' AND \"notes\"='57.03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What is the earliest Year for 400m h Event with 54.86 in Notes?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"event\"='400m h' AND \"notes\"='54.86';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_goal_scorers\" (\n \"place\" real,\n \"scorer\" text,\n \"goals\" real,\n \"appearances\" real,\n \"team\" text\n);\n\nQuestion: What is the total number of appearances for players from Chaux-de-Fonds with places over 8?" }, { "role": "assistant", "content": "SELECT COUNT(\"appearances\") FROM \"top_goal_scorers\" WHERE \"team\"='chaux-de-fonds' AND \"place\">8;" } ]
[ { "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 \"record\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What is the highest week of the game on November 9, 1997?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"date\"='november 9, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: Which Proto-Austronesian has a Proto-Oceanic of *lima?" }, { "role": "assistant", "content": "SELECT \"proto_austronesian\" FROM \"numerals\" WHERE \"proto_oceanic\"='*lima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: Which Proto-Oceanic has a Proto-Polynesian of *lima?" }, { "role": "assistant", "content": "SELECT \"proto_oceanic\" FROM \"numerals\" WHERE \"proto_polynesian\"='*lima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: Which Number has a Proto-Polynesian of *taha?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"numerals\" WHERE \"proto_polynesian\"='*taha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: WHich Proto-Polynesian has a Number of five?" }, { "role": "assistant", "content": "SELECT \"proto_polynesian\" FROM \"numerals\" WHERE \"number\"='five';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: Which Proto-Polynesian has a Proto-Malayo-Polynesian of *telu?" }, { "role": "assistant", "content": "SELECT \"proto_polynesian\" FROM \"numerals\" WHERE \"proto_malayo_polynesian\"='*telu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"numerals\" (\n \"number\" text,\n \"proto_austronesian\" text,\n \"proto_malayo_polynesian\" text,\n \"proto_oceanic\" text,\n \"proto_polynesian\" text\n);\n\nQuestion: Which Proto-Oceanic has a Proto-Polynesian of *lima?" }, { "role": "assistant", "content": "SELECT \"proto_oceanic\" FROM \"numerals\" WHERE \"proto_polynesian\"='*lima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_participants_per_year_and_coun\" (\n \"country\" text,\n \"1997\" real,\n \"1998\" real,\n \"1999\" real,\n \"2000\" real,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real,\n \"total\" real\n);\n\nQuestion: How many countries in 2009 have fewer than 1 in 1999, more than 0 in 2006 and none in 1997?" }, { "role": "assistant", "content": "SELECT COUNT(\"2009\") FROM \"number_of_participants_per_year_and_coun\" WHERE \"1999\"<1 AND \"2006\">0 AND \"1997\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_participants_per_year_and_coun\" (\n \"country\" text,\n \"1997\" real,\n \"1998\" real,\n \"1999\" real,\n \"2000\" real,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real,\n \"total\" real\n);\n\nQuestion: How much is the highest number in 2006 with fewer than 0 in 2002?" }, { "role": "assistant", "content": "SELECT MAX(\"2006\") FROM \"number_of_participants_per_year_and_coun\" WHERE \"2002\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_participants_per_year_and_coun\" (\n \"country\" text,\n \"1997\" real,\n \"1998\" real,\n \"1999\" real,\n \"2000\" real,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real,\n \"total\" real\n);\n\nQuestion: How many are there in 2003 that have 0 in 2001, more than 0 in 2009 and fewer than 0 in 1999?" }, { "role": "assistant", "content": "SELECT SUM(\"2003\") FROM \"number_of_participants_per_year_and_coun\" WHERE \"2001\"=0 AND \"2009\">0 AND \"1999\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_participants_per_year_and_coun\" (\n \"country\" text,\n \"1997\" real,\n \"1998\" real,\n \"1999\" real,\n \"2000\" real,\n \"2001\" real,\n \"2002\" real,\n \"2003\" real,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real,\n \"2008\" real,\n \"2009\" real,\n \"2010\" real,\n \"2011\" real,\n \"2012\" real,\n \"total\" real\n);\n\nQuestion: Which country has more than 0 in 2012 and 2009, 0 in 2008 and more than 0 in 2004?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"number_of_participants_per_year_and_coun\" WHERE \"2012\">0 AND \"2009\">0 AND \"2008\"=0 AND \"2004\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"recent_government_budget_balances\" (\n \"year\" real,\n \"income\" real,\n \"expenditure\" real,\n \"surplus_deficit\" text,\n \"pct_gdp\" text\n);\n\nQuestion: Which % GDP has an Expenditure larger than 50.9, and a Year larger than 2009, and an Income of 39.3?" }, { "role": "assistant", "content": "SELECT \"pct_gdp\" FROM \"recent_government_budget_balances\" WHERE \"expenditure\">50.9 AND \"year\">2009 AND \"income\"=39.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"recent_government_budget_balances\" (\n \"year\" real,\n \"income\" real,\n \"expenditure\" real,\n \"surplus_deficit\" text,\n \"pct_gdp\" text\n);\n\nQuestion: Which Year has an Expenditure smaller than 41.3, and a % GDP of x, and an Income larger than 34.4?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"recent_government_budget_balances\" WHERE \"expenditure\"<41.3 AND \"pct_gdp\"='x' AND \"income\">34.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"recent_government_budget_balances\" (\n \"year\" real,\n \"income\" real,\n \"expenditure\" real,\n \"surplus_deficit\" text,\n \"pct_gdp\" text\n);\n\nQuestion: Which Surplus(Deficit) has an Expenditure larger than 45.8, and a Year smaller than 2011, and a % GDP of (0.9%)?" }, { "role": "assistant", "content": "SELECT \"surplus_deficit\" FROM \"recent_government_budget_balances\" WHERE \"expenditure\">45.8 AND \"year\"<2011 AND \"pct_gdp\"='(0.9%)';" } ]