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 \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which game had a record of 45-16?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"record\"='45-16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which game is located in Boston Garden and has a record of 49-17?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"location\"='boston garden' AND \"record\"='49-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"1st_lbsc_no\" real,\n \"lbsc_name\" text,\n \"built\" text,\n \"2nd_lbsc_no\" text,\n \"1st_sr_no\" text,\n \"2ns_sr_no\" text,\n \"withdrawn\" text\n);\n\nQuestion: What is the largest 1st LBSC number with a LBSC Name of northcote?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1st_lbsc_no\") FROM \"references\" WHERE \"lbsc_name\"='northcote';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_round\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the result when the round shows 34?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"results_by_round\" WHERE \"round\"=34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_round\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the venue when Woking was the opponent, and the round was less than 29?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results_by_round\" WHERE \"opponent\"='woking' AND \"round\"<29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_round\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: What is the round number when the opponent was Wrexham, and the venue shows as Away?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"results_by_round\" WHERE \"opponent\"='wrexham' AND \"venue\"='away';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the lowest position when the name is esv t\u00fcrkheim, and Drawn more than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"main_round\" WHERE \"name\"='esv t\u00fcrkheim' AND \"drawn\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the highest drawn when played is more than 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"main_round\" WHERE \"played\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the least drawn when the name is sv apfeldorf and the position is more than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"main_round\" WHERE \"name\"='sv apfeldorf' AND \"position\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: who is the winner when the team is mobil 1 racing?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"team\"='mobil 1 racing';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the circuit when the date is 16 april?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"date\"='16 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the circuit when the date is 4 june?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"date\"='4 june';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what is the race title when the winner is dick johnson and the circuit is sandown raceway?"
},
{
"role": "assistant",
"content": "SELECT \"race_title\" FROM \"race_calendar\" WHERE \"winner\"='dick johnson' AND \"circuit\"='sandown raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_semifinals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: On what date was the game 1 played at Portland?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"western_conference_semifinals\" WHERE \"home_team\"='portland' AND \"game\"='game 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_semifinals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Who was the road team on May 2?"
},
{
"role": "assistant",
"content": "SELECT \"road_team\" FROM \"western_conference_semifinals\" WHERE \"date\"='may 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_semifinals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Who was the road team on May 2?"
},
{
"role": "assistant",
"content": "SELECT \"road_team\" FROM \"western_conference_semifinals\" WHERE \"date\"='may 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_semifinals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: On what date did Portland play game 5 at home?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"western_conference_semifinals\" WHERE \"home_team\"='portland' AND \"game\"='game 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_semifinals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which game of the season was played on April 22?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"western_conference_semifinals\" WHERE \"date\"='april 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the highest round a fight lasted against masutatsu yano?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='masutatsu yano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What was the method of resolution when Katsuhisa Fujii's record was 0-1?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='0-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the jersey number of the player from years 1986 \u2013 1991 1997 \u2013 1999?"
},
{
"role": "assistant",
"content": "SELECT \"jersey_number_s\" FROM \"e\" WHERE \"years\"='1986 \u2013 1991 1997 \u2013 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Where is the player from that wears the number 29?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"e\" WHERE \"jersey_number_s\"='29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What position was played by the player during 1986 \u2013 1991 1997 \u2013 1999?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"e\" WHERE \"years\"='1986 \u2013 1991 1997 \u2013 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Who is the player from Tennessee?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"e\" WHERE \"from\"='tennessee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: During what years was the Jersey Numbers 34, 30 played?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"e\" WHERE \"jersey_number_s\"='34, 30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Opponent is San Francisco Warriors?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"october\" WHERE \"opponent\"='san francisco warriors';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is H/A/N, when Date is October 31?"
},
{
"role": "assistant",
"content": "SELECT \"h_a_n\" FROM \"october\" WHERE \"date\"='october 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Opponent is Atlanta Hawks?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"october\" WHERE \"opponent\"='atlanta hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is H/A/N, when Record is 2-5?"
},
{
"role": "assistant",
"content": "SELECT \"h_a_n\" FROM \"october\" WHERE \"record\"='2-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Date is October 31?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"october\" WHERE \"date\"='october 31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when H/A/N is n?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"october\" WHERE \"h_a_n\"='n';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_1_privatisation_of_freight_service\" (\n \"concessionaire\" text,\n \"fa_division_s\" text,\n \"gauge\" text,\n \"length_km\" real,\n \"takeover_date\" text\n);\n\nQuestion: What was the guage of the concessionaire ferrosur roca?"
},
{
"role": "assistant",
"content": "SELECT \"gauge\" FROM \"table_1_privatisation_of_freight_service\" WHERE \"concessionaire\"='ferrosur roca';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_1_privatisation_of_freight_service\" (\n \"concessionaire\" text,\n \"fa_division_s\" text,\n \"gauge\" text,\n \"length_km\" real,\n \"takeover_date\" text\n);\n\nQuestion: Which FA Division has a length of 2704 km?"
},
{
"role": "assistant",
"content": "SELECT \"fa_division_s\" FROM \"table_1_privatisation_of_freight_service\" WHERE \"length_km\"=2704;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_1_privatisation_of_freight_service\" (\n \"concessionaire\" text,\n \"fa_division_s\" text,\n \"gauge\" text,\n \"length_km\" real,\n \"takeover_date\" text\n);\n\nQuestion: What is the takeover date of the FA division mitre?"
},
{
"role": "assistant",
"content": "SELECT \"takeover_date\" FROM \"table_1_privatisation_of_freight_service\" WHERE \"fa_division_s\"='mitre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_titles_8_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What date was the tournament in Indian Wells?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_7_titles_8_runner_ups\" WHERE \"tournament\"='indian wells';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_titles_8_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent in the math that was played in Nice on a clay court?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_7_titles_8_runner_ups\" WHERE \"surface\"='clay' AND \"tournament\"='nice';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_titles_8_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score in the match against Sergi Bruguera?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7_titles_8_runner_ups\" WHERE \"opponent\"='sergi bruguera';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_7_titles_8_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the tournament in Wellington?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_7_titles_8_runner_ups\" WHERE \"tournament\"='wellington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"race_name\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which race was in round 6?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"results\" WHERE \"round\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"race_name\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Which round did jonathan bomarito win?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"results\" WHERE \"winning_driver\"='jonathan bomarito';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"race_name\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What race did the team Mi-Jack Conquest racing win with a pole position of andreas wirth?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"results\" WHERE \"winning_team\"='mi-jack conquest racing' AND \"pole_position\"='andreas wirth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"race_name\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What race after round 6 did Graham Rahal win with a pole position of graham rahal?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"results\" WHERE \"winning_driver\"='graham rahal' AND \"round\">6 AND \"pole_position\"='graham rahal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"round\" real,\n \"race_name\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: What pole position did 2006 gehl championship finale have?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"results\" WHERE \"race_name\"='2006 gehl championship finale';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: who is the player when the place is t5 and the score is 69-74=143?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='t5' AND \"score\"='69-74=143';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the score when the country is united states, the to par is +2 and the player is phil hancock?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"to_par\"='+2' AND \"player\"='phil hancock';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the place for gary player?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='gary player';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the place when the score is 70-72=142?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='70-72=142';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what is the place when the score is 70-70=140?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='70-70=140';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: who is the player when the country is united states and the score is 71-73=144?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='united states' AND \"score\"='71-73=144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_ratings\" (\n \"season\" real,\n \"episodes\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank\" text,\n \"households_millions\" real\n);\n\nQuestion: WHAT SEASON HAD A SEASON FINALE OF MAY 21, 1989 AND WAS VIEWED BY 17.98 MILLION HOUSEHOLDS?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"television_ratings\" WHERE \"season_finale\"='may 21, 1989' AND \"households_millions\"<17.98;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school or team is in a round below 5 with a pick of 2?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"round\"<5 AND \"pick\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player with a pick less than 234 and a quarterback position?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"pick\"<234 AND \"position\"='quarterback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player in tight end position in a round below 12 that has a pick greater than 17?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"pick\">17 AND \"round\"<12 AND \"position\"='tight end';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many picks does Auburn have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"school_club_team\"='auburn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"career\" text\n);\n\nQuestion: What is the career for 2007 3r, and 1999 1r?"
},
{
"role": "assistant",
"content": "SELECT \"career\" FROM \"singles_performance_timeline\" WHERE \"2007\"='3r' AND \"1999\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"career\" text\n);\n\nQuestion: What is the career for the 2006 3r, and the 1999 2r?"
},
{
"role": "assistant",
"content": "SELECT \"career\" FROM \"singles_performance_timeline\" WHERE \"2006\"='3r' AND \"1999\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"career\" text\n);\n\nQuestion: Who in 2009, has a 2003 2r and a 2000 2r?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2003\"='2r' AND \"2000\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"seed\" real,\n \"round\" text,\n \"opponent\" text,\n \"result_score\" text\n);\n\nQuestion: What is Result/Score, when Year is greater than 2005, and when Opponent is #8 Arkansas #1 Memphis?"
},
{
"role": "assistant",
"content": "SELECT \"result_score\" FROM \"ncaa_tournament_results\" WHERE \"year\">2005 AND \"opponent\"='#8 arkansas #1 memphis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"seed\" real,\n \"round\" text,\n \"opponent\" text,\n \"result_score\" text\n);\n\nQuestion: What is the highest Year, when Opponent is #2 Syracuse?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"ncaa_tournament_results\" WHERE \"opponent\"='#2 syracuse';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"seed\" real,\n \"round\" text,\n \"opponent\" text,\n \"result_score\" text\n);\n\nQuestion: What is Round when Year is 1987?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"ncaa_tournament_results\" WHERE \"year\"=1987;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_tournament_results\" (\n \"year\" real,\n \"seed\" real,\n \"round\" text,\n \"opponent\" text,\n \"result_score\" text\n);\n\nQuestion: What is the sum of Year, when Opponent is #3 UCONN?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"ncaa_tournament_results\" WHERE \"opponent\"='#3 uconn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fluctus\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What's the longitude named zipaltonal fluctus in 1997 with a diameter smaller than 490?"
},
{
"role": "assistant",
"content": "SELECT \"longitude\" FROM \"fluctus\" WHERE \"year_named\"=1997 AND \"diameter_km\"<490 AND \"name\"='zipaltonal fluctus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fluctus\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What's the diameter of kaiwan fluctus?"
},
{
"role": "assistant",
"content": "SELECT \"diameter_km\" FROM \"fluctus\" WHERE \"name\"='kaiwan fluctus';"
}
] |
[
{
"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 \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: In what game did the New York Rangers play against the Chicago Black Hawks?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"schedule_and_results\" WHERE \"opponent\"='chicago black hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS THE SCORE FOR GREG NORMAN?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='greg norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS THE PLAYER WITH A TO PAR OF E, AND SCORE OF 68-72=140?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='e' AND \"score\"='68-72=140';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: WHAT IS THE TO PAR WITH T5 PLACE, AND PLAYER MARK MCCUMBER?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t5' AND \"player\"='mark mccumber';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities\" (\n \"city_proper\" text,\n \"population_city_limits_in_millions\" real,\n \"density_per_km\" real,\n \"urban_area\" text,\n \"population_urban_area_in_millions\" real,\n \"metro_area\" text,\n \"population_metro_area_in_millions\" text\n);\n\nQuestion: Which urban area has a population of 5.3 million?"
},
{
"role": "assistant",
"content": "SELECT \"urban_area\" FROM \"largest_cities\" WHERE \"population_urban_area_in_millions\"=5.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: When was the microprocessor with 1.65\u20131.7 v, a mult of 4.5\u00d7, and a slot 1 socket released?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"180_nm\" WHERE \"voltage\"='1.65\u20131.7 v' AND \"mult\"='4.5\u00d7' AND \"socket\"='slot 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is the voltage of the Pentiumiii866 microprocessor with a socket 370?"
},
{
"role": "assistant",
"content": "SELECT \"voltage\" FROM \"180_nm\" WHERE \"socket\"='socket 370' AND \"model_number\"='pentiumiii866';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"180_nm\" (\n \"model_number\" text,\n \"frequency\" text,\n \"l2_cache\" text,\n \"mult\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What kind of socket is on the microprocessor with a part number of 80526pz533256?"
},
{
"role": "assistant",
"content": "SELECT \"socket\" FROM \"180_nm\" WHERE \"part_number_s\"='80526pz533256';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the Date of the match with Opponent in the final Kenneth Carlsen?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_18_12_6\" WHERE \"opponent_in_the_final\"='kenneth carlsen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the Date of the match with a Score in the final of 6\u20133, 6\u20133, 2\u20136, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_18_12_6\" WHERE \"score_in_the_final\"='6\u20133, 6\u20133, 2\u20136, 6\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_matches\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"favour\" real,\n \"against\" real\n);\n\nQuestion: How many games did they lose when they tied less than 2 games?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"european_matches\" WHERE \"draw\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_matches\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"favour\" real,\n \"against\" real\n);\n\nQuestion: What is the least ties when they played less than 14 games, and a lost less than 8 of them?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draw\") FROM \"european_matches\" WHERE \"played\"<14 AND \"lost\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_matches\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"favour\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest number of games played where they tied more than 7 of them?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"european_matches\" WHERE \"draw\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_matches\" (\n \"competition\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"favour\" real,\n \"against\" real\n);\n\nQuestion: What is the highest Against where they lost less than 20 games, tied more than 2 of them, and they had Favour less than 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"european_matches\" WHERE \"lost\"<20 AND \"draw\">2 AND \"favour\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: WHAT IS THE SCORE FOR 2010 fifa world cup qualification?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2010 fifa world cup qualification';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"federer_nadal_grand_slam_era\" (\n \"year\" real,\n \"australian_open\" text,\n \"french_open\" text,\n \"wimbledon\" text,\n \"us_open\" text\n);\n\nQuestion: What is the latest year rafael nadal was in the French Open, Roger Federer was in Wimbledon, and Roger Federer was in the Australian Open?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"federer_nadal_grand_slam_era\" WHERE \"french_open\"='rafael nadal' AND \"wimbledon\"='roger federer' AND \"australian_open\"='roger federer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"federer_nadal_grand_slam_era\" (\n \"year\" real,\n \"australian_open\" text,\n \"french_open\" text,\n \"wimbledon\" text,\n \"us_open\" text\n);\n\nQuestion: What is the total number of years Andy Murray was at Wimbledon?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"federer_nadal_grand_slam_era\" WHERE \"wimbledon\"='andy murray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"federer_nadal_grand_slam_era\" (\n \"year\" real,\n \"australian_open\" text,\n \"french_open\" text,\n \"wimbledon\" text,\n \"us_open\" text\n);\n\nQuestion: What is the Australian open in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"australian_open\" FROM \"federer_nadal_grand_slam_era\" WHERE \"year\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the highest loss with a long more than 61?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"loss\") FROM \"rushing\" WHERE \"long\">61;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the long with a loss lower than 133 and more than 0 gain with an avg/G of 29.8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"long\") FROM \"rushing\" WHERE \"loss\"<133 AND \"gain\">0 AND \"avg_g\"=29.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest long with an avg/G more than -2.2 and a total name and a gain of more than 2,488?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"long\") FROM \"rushing\" WHERE \"avg_g\">-2.2 AND \"name\"='total' AND \"gain\">'2,488';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest avg/G with a gain more than 1,290 and more than 292 loss?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"avg_g\") FROM \"rushing\" WHERE \"gain\">'1,290' AND \"loss\">292;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"network_brand_name\" text,\n \"country\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What is the network brand name of the company vodafone group in Germany?"
},
{
"role": "assistant",
"content": "SELECT \"network_brand_name\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"company_name\"='vodafone group' AND \"country\"='germany';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"network_brand_name\" text,\n \"country\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What is the accreditation level of the network brand Movistar?"
},
{
"role": "assistant",
"content": "SELECT \"accreditation_level\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"network_brand_name\"='movistar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"network_brand_name\" text,\n \"country\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What date was Movistar accredited?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"network_brand_name\"='movistar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"network_brand_name\" text,\n \"country\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What is the accreditation type of Vodacom Group PTY LTD (Vodafone group)?"
},
{
"role": "assistant",
"content": "SELECT \"accreditation_type\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"company_name\"='vodacom group pty ltd (vodafone group)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ecosystem_operators_mobile_phone_and_cli\" (\n \"company_name\" text,\n \"network_brand_name\" text,\n \"country\" text,\n \"accreditation_type\" text,\n \"accreditation_level\" text,\n \"date\" text\n);\n\nQuestion: What is Deutsche Telekom's accreditation type?"
},
{
"role": "assistant",
"content": "SELECT \"accreditation_type\" FROM \"ecosystem_operators_mobile_phone_and_cli\" WHERE \"network_brand_name\"='deutsche telekom';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What was the Location and Attendance of Game 6?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"playoffs\" WHERE \"game\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_epsilon_eridani_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What inclination has a semimajor axis of 20 au?"
},
{
"role": "assistant",
"content": "SELECT \"inclination\" FROM \"the_epsilon_eridani_system\" WHERE \"semimajor_axis_au\"='20 au';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_epsilon_eridani_system\" (\n \"companion_in_order_from_star\" text,\n \"mass\" text,\n \"semimajor_axis_au\" text,\n \"orbital_period_s_day\" text,\n \"eccentricity\" text,\n \"inclination\" text\n);\n\nQuestion: What is the eccentricity when the semimajor axis is 20 au?"
},
{
"role": "assistant",
"content": "SELECT \"eccentricity\" FROM \"the_epsilon_eridani_system\" WHERE \"semimajor_axis_au\"='20 au';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when Team is \"Indiana\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='indiana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when Game is \"8\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Assists, when Date is \"November 1\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='november 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Who was the winner on a hard surface on the week of November 13?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"singles\" WHERE \"surface\"='hard' AND \"week\"='november 13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: Which player had a conference of PAC-10 and position of G?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"notable_undrafted_players\" WHERE \"conf\"='pac-10' AND \"pos\"='g';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: Which player had a position of OL from Ohio State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"notable_undrafted_players\" WHERE \"pos\"='ol' AND \"college\"='ohio state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: Which player had a position of QB for Texas Tech?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"notable_undrafted_players\" WHERE \"pos\"='qb' AND \"college\"='texas tech';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.