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 \"scottish_football_league_challenge_cup_f\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance when the score was \u2020 4\u20134 \u2020?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"scottish_football_league_challenge_cup_f\" WHERE \"score\"='\u2020 4\u20134 \u2020';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scottish_football_league_challenge_cup_f\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: How many people were watching when Livingston was the runner-up?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"scottish_football_league_challenge_cup_f\" WHERE \"runner_up\"='livingston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what average grid has laps larger than 52 and contains the driver of andrea de adamich?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"laps\">52 AND \"driver\"='andrea de adamich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"classification\" WHERE \"driver\"='graham hill' AND \"grid\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what's the average grid that has a time/retired piston and laps smaller than 15?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"time_retired\"='piston' AND \"laps\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"driver\" text,\n \"co_driver\" text,\n \"team\" text,\n \"tuner\" text,\n \"governing_body\" text\n);\n\nQuestion: Who is the tuner after season 2004 with Gaurav Gill as the driver, Team MRF, and Mai governing body?" }, { "role": "assistant", "content": "SELECT \"tuner\" FROM \"results\" WHERE \"season\">2004 AND \"driver\"='gaurav gill' AND \"team\"='team mrf' AND \"governing_body\"='mai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"driver\" text,\n \"co_driver\" text,\n \"team\" text,\n \"tuner\" text,\n \"governing_body\" text\n);\n\nQuestion: Who is the driver in season 2003 with a tuner of N. Leelakrishnan and a Mai governing body?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"results\" WHERE \"tuner\"='n. leelakrishnan' AND \"governing_body\"='mai' AND \"season\"=2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"driver\" text,\n \"co_driver\" text,\n \"team\" text,\n \"tuner\" text,\n \"governing_body\" text\n);\n\nQuestion: Who is the turner on Team MRF?" }, { "role": "assistant", "content": "SELECT \"tuner\" FROM \"results\" WHERE \"team\"='mrf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"driver\" text,\n \"co_driver\" text,\n \"team\" text,\n \"tuner\" text,\n \"governing_body\" text\n);\n\nQuestion: What is the earliest season with driver Farad Bathena?" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"results\" WHERE \"driver\"='farad bathena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"league\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: Which Major League Soccer team for the 2005 season has the lowest goals?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"statistics\" WHERE \"league\"='major league soccer' AND \"season\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"season\" text,\n \"club\" text,\n \"league\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: What are the average apps for the Major League Soccer team club for the Seattle Sounders FC that has goals less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"apps\") FROM \"statistics\" WHERE \"league\"='major league soccer' AND \"club\"='seattle sounders fc' AND \"goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"faroese_words_and_phrases_in_comparison_\" (\n \"faroese\" text,\n \"norwegian_bokm_l\" text,\n \"norwegian_nynorsk\" text,\n \"english\" text,\n \"icelandic\" text,\n \"danish\" text,\n \"swedish\" text,\n \"german\" text,\n \"dutch\" text\n);\n\nQuestion: Which Icelandic has a Danish of bl\u00e5t/bl\u00e5?" }, { "role": "assistant", "content": "SELECT \"icelandic\" FROM \"faroese_words_and_phrases_in_comparison_\" WHERE \"danish\"='bl\u00e5t/bl\u00e5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"faroese_words_and_phrases_in_comparison_\" (\n \"faroese\" text,\n \"norwegian_bokm_l\" text,\n \"norwegian_nynorsk\" text,\n \"english\" text,\n \"icelandic\" text,\n \"danish\" text,\n \"swedish\" text,\n \"german\" text,\n \"dutch\" text\n);\n\nQuestion: Which Icelandic has a Norwegian (nynorsk) of kvitt/kvit?" }, { "role": "assistant", "content": "SELECT \"icelandic\" FROM \"faroese_words_and_phrases_in_comparison_\" WHERE \"norwegian_nynorsk\"='kvitt/kvit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"faroese_words_and_phrases_in_comparison_\" (\n \"faroese\" text,\n \"norwegian_bokm_l\" text,\n \"norwegian_nynorsk\" text,\n \"english\" text,\n \"icelandic\" text,\n \"danish\" text,\n \"swedish\" text,\n \"german\" text,\n \"dutch\" text\n);\n\nQuestion: Which Faroese has an English of white?" }, { "role": "assistant", "content": "SELECT \"faroese\" FROM \"faroese_words_and_phrases_in_comparison_\" WHERE \"english\"='white';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"faroese_words_and_phrases_in_comparison_\" (\n \"faroese\" text,\n \"norwegian_bokm_l\" text,\n \"norwegian_nynorsk\" text,\n \"english\" text,\n \"icelandic\" text,\n \"danish\" text,\n \"swedish\" text,\n \"german\" text,\n \"dutch\" text\n);\n\nQuestion: Which Norwegian (nynorsk) has a Danish of farvel?" }, { "role": "assistant", "content": "SELECT \"norwegian_nynorsk\" FROM \"faroese_words_and_phrases_in_comparison_\" WHERE \"danish\"='farvel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"faroese_words_and_phrases_in_comparison_\" (\n \"faroese\" text,\n \"norwegian_bokm_l\" text,\n \"norwegian_nynorsk\" text,\n \"english\" text,\n \"icelandic\" text,\n \"danish\" text,\n \"swedish\" text,\n \"german\" text,\n \"dutch\" text\n);\n\nQuestion: Which English has a Danish of r\u00f8dt/r\u00f8d?" }, { "role": "assistant", "content": "SELECT \"english\" FROM \"faroese_words_and_phrases_in_comparison_\" WHERE \"danish\"='r\u00f8dt/r\u00f8d';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"legislative_history\" (\n \"congress\" text,\n \"bill_number\" text,\n \"date_introduced\" text,\n \"sponsor\" text,\n \"num_of_cosponsors\" real\n);\n\nQuestion: What number of Congress has 44 cosponsors?" }, { "role": "assistant", "content": "SELECT \"congress\" FROM \"legislative_history\" WHERE \"num_of_cosponsors\"=44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"legislative_history\" (\n \"congress\" text,\n \"bill_number\" text,\n \"date_introduced\" text,\n \"sponsor\" text,\n \"num_of_cosponsors\" real\n);\n\nQuestion: Who was the sponsor on April 22, 2004?" }, { "role": "assistant", "content": "SELECT \"sponsor\" FROM \"legislative_history\" WHERE \"date_introduced\"='april 22, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score of the game when the New York Rangers were the home team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"february\" WHERE \"home\"='new york rangers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result on 8 October 1961?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='8 october 1961';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the venue of the game on 27 April 1964?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='27 april 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game played with a home team score of 8.13 (61)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"home_team_score\"='8.13 (61)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score when the away team was Hawthorn?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score when the away team scored 14.15 (99)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"away_team_score\"='14.15 (99)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was the game played where the away team scored 11.14 (80)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_8\" WHERE \"away_team_score\"='11.14 (80)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game played when the away team scored 14.15 (99)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_8\" WHERE \"away_team_score\"='14.15 (99)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What home team played against the away team with a score of 13.6 (84)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"away_team_score\"='13.6 (84)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_runner_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the game against Divij Sharan?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_runner_up\" WHERE \"opponent_in_the_final\"='divij sharan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_runner_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the match that was a played on a hard surface against Peter Gojowczyk?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_runner_up\" WHERE \"surface\"='hard' AND \"opponent_in_the_final\"='peter gojowczyk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many attended the game with a record of 43-34?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"record\"='43-34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_7_10\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"partner\" text,\n \"surface\" text,\n \"opponents\" text,\n \"result\" text\n);\n\nQuestion: Who was Manuela Maleeva opponent when she played a match partnered with michelle strebel?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"doubles_7_10\" WHERE \"partner\"='michelle strebel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yearly_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text\n);\n\nQuestion: When the percent is larger than 0.685, what is the average number of points scored?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"yearly_results\" WHERE \"pct_pct\">0.685;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yearly_results\" (\n \"season\" text,\n \"games\" real,\n \"lost\" real,\n \"tied\" real,\n \"points\" real,\n \"pct_pct\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"standing\" text\n);\n\nQuestion: When less than 37 points are scored, what's the lowest Pct % found?" }, { "role": "assistant", "content": "SELECT MIN(\"pct_pct\") FROM \"yearly_results\" WHERE \"points\"<37;" } ]
[ { "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 \"time\" text,\n \"location\" text\n);\n\nQuestion: How many rounds did the event rings: king of kings 2000 block a have with a record of 6-1?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='rings: king of kings 2000 block a' AND \"record\"='6-1';" } ]
[ { "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 \"time\" text,\n \"location\" text\n);\n\nQuestion: How long was the fight 'adrenaline mma 3'?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='adrenaline mma 3';" } ]
[ { "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 \"time\" text,\n \"location\" text\n);\n\nQuestion: What was roberto travern's record when he fought against john salter?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='john salter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the away team at the MCG?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_15\" WHERE \"venue\"='mcg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who constructed the car with a grid larger than 20 that got in an accident?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\">20 AND \"time_retired\"='accident';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a CFL Team of montreal alouettes (via edmonton)?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_three\" WHERE \"cfl_team\"='montreal alouettes (via edmonton)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_three\" WHERE \"cfl_team\"='montreal alouettes (via hamilton via winnipeg)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Player of patrick macdonald?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_three\" WHERE \"player\"='patrick macdonald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" real,\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"fifth_place\" text,\n \"sixth_place\" text,\n \"host\" text\n);\n\nQuestion: What series had Joan Tena in sixth place?" }, { "role": "assistant", "content": "SELECT SUM(\"series\") FROM \"series_summary\" WHERE \"sixth_place\"='joan tena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" real,\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"fifth_place\" text,\n \"sixth_place\" text,\n \"host\" text\n);\n\nQuestion: Who was in sixth place in series 7?" }, { "role": "assistant", "content": "SELECT \"sixth_place\" FROM \"series_summary\" WHERE \"series\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" real,\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"fifth_place\" text,\n \"sixth_place\" text,\n \"host\" text\n);\n\nQuestion: Who was sixth place when Hugo Salazar was fifth place?" }, { "role": "assistant", "content": "SELECT \"sixth_place\" FROM \"series_summary\" WHERE \"fifth_place\"='hugo salazar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_summary\" (\n \"series\" real,\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text,\n \"fourth_place\" text,\n \"fifth_place\" text,\n \"sixth_place\" text,\n \"host\" text\n);\n\nQuestion: Who was third place when Fran Dieli was fifth place?" }, { "role": "assistant", "content": "SELECT \"third_place\" FROM \"series_summary\" WHERE \"fifth_place\"='fran dieli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Order and Title with an Elevated with 1261, december 17, and a Faction with angevin?" }, { "role": "assistant", "content": "SELECT \"order_and_title\" FROM \"cardinal_electors\" WHERE \"elevated\"='1261, december 17' AND \"faction\"='angevin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Elector with a Nationality with roman, and an Elevator of urban iv, and an Elevated with 1261, december 17?" }, { "role": "assistant", "content": "SELECT \"elector\" FROM \"cardinal_electors\" WHERE \"nationality\"='roman' AND \"elevator\"='urban iv' AND \"elevated\"='1261, december 17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Nationality with an Elector with bertrand de saint-martin?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"cardinal_electors\" WHERE \"elector\"='bertrand de saint-martin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Order and Title with a Nationality with roman, and an Elector with matteo orsini rosso?" }, { "role": "assistant", "content": "SELECT \"order_and_title\" FROM \"cardinal_electors\" WHERE \"nationality\"='roman' AND \"elector\"='matteo orsini rosso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"order_and_title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Elector with a Faction of roman, and an Elevated with 1244, may 28?" }, { "role": "assistant", "content": "SELECT \"elector\" FROM \"cardinal_electors\" WHERE \"faction\"='roman' AND \"elevated\"='1244, may 28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score at the game when the home team scored 7.11 (53)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"away_team_score\"='7.11 (53)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team that scored 6.5 (41)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"home_team_score\"='6.5 (41)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"65_nm\" (\n \"model_number\" text,\n \"s_spec_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 \"release_price_usd\" text\n);\n\nQuestion: What is the mult value of the microprocessor with a release date q4 2007 and model number pentium dual-core t2310?" }, { "role": "assistant", "content": "SELECT \"mult\" FROM \"65_nm\" WHERE \"release_date\"='q4 2007' AND \"model_number\"='pentium dual-core t2310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"65_nm\" (\n \"model_number\" text,\n \"s_spec_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 \"release_price_usd\" text\n);\n\nQuestion: What is the L2 cache of the microprocessor with model number pentium dual-core t3400?" }, { "role": "assistant", "content": "SELECT \"l2_cache\" FROM \"65_nm\" WHERE \"model_number\"='pentium dual-core t3400';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"65_nm\" (\n \"model_number\" text,\n \"s_spec_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 \"release_price_usd\" text\n);\n\nQuestion: What is the release price (USD) of the microprocessor with a model number pentium dual-core t2330?" }, { "role": "assistant", "content": "SELECT \"release_price_usd\" FROM \"65_nm\" WHERE \"model_number\"='pentium dual-core t2330';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What day did Patrick Tambay have the fastest lap?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"fastest_lap\"='patrick tambay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who held the pole position in SPA-Francorchamps?" }, { "role": "assistant", "content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"location\"='spa-francorchamps';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the Long Beach constructor?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"location\"='long beach';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game played when the away team scored 12.5 (77)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team_score\"='12.5 (77)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when Carlton was the home team?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did St Kilda score when they were the home team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"home_team\"='st kilda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score when South Melbourne was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team when the home team scored 14.14 (98)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team_score\"='14.14 (98)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the leading scorer for april 12, 2008" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"april\" WHERE \"date\"='april 12, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score for the home team that played at Brunswick Street Oval?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_who_made_their_debut_for_the_gee\" (\n \"order\" real,\n \"name\" text,\n \"seasons\" text,\n \"games\" real,\n \"goals\" real\n);\n\nQuestion: what is the name for seasons 1981 and an order more than 807?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"seasons\"='1981' AND \"order\">807;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the smallest crowd of the away team that scored 12.9 (81)?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"round_13\" WHERE \"away_team_score\"='12.9 (81)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team played in Lake Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"tournament\" 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 \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament was on 2009 with 11?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"results\" WHERE \"2009\"='11';" } ]
[ { "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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On what date was the attendance greater than 18,118 when Colorado was the visitor?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"october\" WHERE \"attendance\">'18,118' AND \"visitor\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver went 59 laps on grid 11?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"=59 AND \"grid\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which driver has a grid value of 22?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the value of time/retired for Jean Alesi?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='jean alesi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: When the time/retired is electrical how many laps did Rubens Barrichello have?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"time_retired\"='electrical' AND \"driver\"='rubens barrichello';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: How many laps did Eddie Irvine have?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"driver\"='eddie irvine';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: In the game where the Hornets were the home team and Clippers the visiting team, what is the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"home\"='hornets' AND \"visitor\"='clippers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where is the home venue of carlton that had a crowd bigger than 12,000?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_16\" WHERE \"crowd\">'12,000' AND \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which finish has a 99.550 Qual?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"qual\"='99.550';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which Qual with laps less than 200 and an 11 start?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"laps\"<200 AND \"start\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which rank is the start of totals?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"start\"='totals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Which year has 112 laps?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"indy_500_results\" WHERE \"laps\"=112;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_2_9\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: On what surface was the score in the final 0\u20136, 4\u20136?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_11_2_9\" WHERE \"score_in_the_final\"='0\u20136, 4\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_2_9\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What score in the final had a tournament of $25,000 Glasgow, Great Britain?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_11_2_9\" WHERE \"tournament\"='$25,000 glasgow, great britain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_11_2_9\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which surface has a score in the final of 4\u20136, 3\u20136?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_11_2_9\" WHERE \"score_in_the_final\"='4\u20136, 3\u20136';" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: how many times is the nation listed as united states with the total more than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"nation\"='united states' AND \"total\">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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the lowest total when the rank is less than 2 and bronze is more than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"rank\"<2 AND \"bronze\">0;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the nation with a total of 1, bronze smaller than 1 and a rank of 3?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"total\"=1 AND \"bronze\"<1 AND \"rank\"=3;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the rank when silver is less than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"silver\"<0;" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the amount of silver when gold is 2 and the rank is more than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"gold\"=2 AND \"rank\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which home has a Decision of kolzig, and a Date of november 5?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"november\" WHERE \"decision\"='kolzig' AND \"date\"='november 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has a Decision of johnson?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"november\" WHERE \"decision\"='johnson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which date has a Home of washington, a Visitor of florida, and a Record of 8-15-2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"november\" WHERE \"home\"='washington' AND \"visitor\"='florida' AND \"record\"='8-15-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the total of attendance with a Record of 5-9-0?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"november\" WHERE \"record\"='5-9-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has a Date of november 2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"november\" WHERE \"date\"='november 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What's the length of route FM 2895 with junctions sh 359 us 59?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"farm_to_market_roads\" WHERE \"junctions\"='sh 359 us 59' AND \"route_name\"='fm 2895';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What's the termini of the route with junctions of i-35 fm 3338 sh 255?" }, { "role": "assistant", "content": "SELECT \"termini\" FROM \"farm_to_market_roads\" WHERE \"junctions\"='i-35 fm 3338 sh 255';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What are the junctions of the route with termini aguilares, texas us 59?" }, { "role": "assistant", "content": "SELECT \"junctions\" FROM \"farm_to_market_roads\" WHERE \"termini\"='aguilares, texas us 59';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What route has termini of fm 1472 sh 255?" }, { "role": "assistant", "content": "SELECT \"route_name\" FROM \"farm_to_market_roads\" WHERE \"termini\"='fm 1472 sh 255';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What termini does the route with a population Area of aguilares have?" }, { "role": "assistant", "content": "SELECT \"termini\" FROM \"farm_to_market_roads\" WHERE \"population_area\"='aguilares';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farm_to_market_roads\" (\n \"route_name\" text,\n \"direction\" text,\n \"termini\" text,\n \"junctions\" text,\n \"length\" text,\n \"population_area\" text\n);\n\nQuestion: What's the length of the route with junctions of ur 1472 sh 255?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"farm_to_market_roads\" WHERE \"junctions\"='ur 1472 sh 255';" } ]