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 \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance when the result was w61-7?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='w61-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head\" (\n \"team\" text,\n \"miles_one_way\" real,\n \"home_result\" text,\n \"fans_brought\" real,\n \"away_result\" text,\n \"fans_took\" text,\n \"points_gained\" real\n);\n\nQuestion: What shows for miles [One Way] when the fans took 340?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"miles_one_way\") FROM \"head_to_head\" WHERE \"fans_took\"='340';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: what is the reported birth date when the reported age is 110 years, 185 days?"
},
{
"role": "assistant",
"content": "SELECT \"reported_birth_date\" FROM \"oldest_norwegian_person_by_region\" WHERE \"reported_age\"='110 years, 185 days';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: what is the reported age when the reported birth date is 22 december 1878?"
},
{
"role": "assistant",
"content": "SELECT \"reported_age\" FROM \"oldest_norwegian_person_by_region\" WHERE \"reported_birth_date\"='22 december 1878';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: what is the region when the reported age is 111 years, 107 days?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"oldest_norwegian_person_by_region\" WHERE \"reported_age\"='111 years, 107 days';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: what is the reported death date for laura svehaug?"
},
{
"role": "assistant",
"content": "SELECT \"reported_death_date\" FROM \"oldest_norwegian_person_by_region\" WHERE \"name\"='laura svehaug';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: Who has a reported age of 111 years, 66 days?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"oldest_norwegian_person_by_region\" WHERE \"reported_age\"='111 years, 66 days';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_norwegian_person_by_region\" (\n \"region\" text,\n \"name\" text,\n \"reported_birth_date\" text,\n \"reported_death_date\" text,\n \"reported_age\" text\n);\n\nQuestion: Who has a reported death of 6 march 1998?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"oldest_norwegian_person_by_region\" WHERE \"reported_death_date\"='6 march 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general\" (\n \"overall_ranking\" text,\n \"lat_am_ranking\" text,\n \"countries_surveyed\" real,\n \"pct_rank\" text,\n \"date\" text\n);\n\nQuestion: Date for less than 122 countries and a 47% rank?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"general\" WHERE \"countries_surveyed\"<122 AND \"pct_rank\"='47';"
}
] |
[
{
"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 high assists has the high points of andrew bynum (23)?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"high_points\"='andrew bynum (23)';"
}
] |
[
{
"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 score is the team of charlotte?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='charlotte';"
}
] |
[
{
"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 strikeforce: barnett vs. cormier's record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='strikeforce: barnett vs. cormier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution_of_triples_with_q_1\" (\n \"q_1\" real,\n \"q_1_05\" real,\n \"q_1_1\" real,\n \"q_1_2\" real,\n \"q_1_3\" real,\n \"q_1_4\" real\n);\n\nQuestion: What is the total q > 1.4 with a q > 1 less than 7,801,334, and a q > 1.05 greater than 812,499?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"q_1_4\") FROM \"distribution_of_triples_with_q_1\" WHERE \"q_1\"<'7,801,334' AND \"q_1_05\">'812,499';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution_of_triples_with_q_1\" (\n \"q_1\" real,\n \"q_1_05\" real,\n \"q_1_1\" real,\n \"q_1_2\" real,\n \"q_1_3\" real,\n \"q_1_4\" real\n);\n\nQuestion: What is the sum of q > 1 when q > 1.05 is bigger than 18,233, and a q > 1.4 less than 112, and q > 1.1 is 13,266?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"q_1\") FROM \"distribution_of_triples_with_q_1\" WHERE \"q_1_05\">'18,233' AND \"q_1_4\"<112 AND \"q_1_1\"='13,266';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution_of_triples_with_q_1\" (\n \"q_1\" real,\n \"q_1_05\" real,\n \"q_1_1\" real,\n \"q_1_2\" real,\n \"q_1_3\" real,\n \"q_1_4\" real\n);\n\nQuestion: What is the mean q > 1 with a q > 1.2 less than 3,028, and a q > 1.4 of 51, and a q > 1.05 greater than 18,233?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"q_1\") FROM \"distribution_of_triples_with_q_1\" WHERE \"q_1_2\"<'3,028' AND \"q_1_4\"=51 AND \"q_1_05\">'18,233';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"distribution_of_triples_with_q_1\" (\n \"q_1\" real,\n \"q_1_05\" real,\n \"q_1_1\" real,\n \"q_1_2\" real,\n \"q_1_3\" real,\n \"q_1_4\" real\n);\n\nQuestion: What is the total of q > 1.4 when q > 1.3 is 455, and q >1.2 is less than 3,028?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"q_1_4\") FROM \"distribution_of_triples_with_q_1\" WHERE \"q_1_3\"=455 AND \"q_1_2\"<'3,028';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_scoring_matches\" (\n \"total\" real,\n \"score\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Who was the losing team with a total of 24 when the winning team was Sydney Roosters?"
},
{
"role": "assistant",
"content": "SELECT \"losing_team\" FROM \"lowest_scoring_matches\" WHERE \"total\"=24 AND \"winning_team\"='sydney roosters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_scoring_matches\" (\n \"total\" real,\n \"score\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which venue had a losing team of south sydney rabbitohs?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"lowest_scoring_matches\" WHERE \"losing_team\"='south sydney rabbitohs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lowest_scoring_matches\" (\n \"total\" real,\n \"score\" text,\n \"winning_team\" text,\n \"losing_team\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What day was the total smaller than 19 at Venue of anz stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"lowest_scoring_matches\" WHERE \"total\"<19 AND \"venue\"='anz stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"port_trade\" (\n \"year\" real,\n \"imports_tonnes\" real,\n \"exports_tonnes\" real,\n \"total_trade_tonnes\" real,\n \"vessels_entering_port\" real\n);\n\nQuestion: What is the total number of Total trade (tonnes) when the Imports is smaller than 114,287 tonnes and the year is higher than 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_trade_tonnes\") FROM \"port_trade\" WHERE \"imports_tonnes\"<'114,287' AND \"year\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"port_trade\" (\n \"year\" real,\n \"imports_tonnes\" real,\n \"exports_tonnes\" real,\n \"total_trade_tonnes\" real,\n \"vessels_entering_port\" real\n);\n\nQuestion: What is the sum of Total trade (tonnes) where the Imports are 111,677 tonnes and there are fewer than 129 vessels entering port?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_trade_tonnes\") FROM \"port_trade\" WHERE \"imports_tonnes\"='111,677' AND \"vessels_entering_port\"<129;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"port_trade\" (\n \"year\" real,\n \"imports_tonnes\" real,\n \"exports_tonnes\" real,\n \"total_trade_tonnes\" real,\n \"vessels_entering_port\" real\n);\n\nQuestion: What is the highest Total trade (tonnes) after 2001 when the Imports are 144,368 tonnes, the Exports are more than 4,024,311 tonnes, and there are more than 91 vessels entering port?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_trade_tonnes\") FROM \"port_trade\" WHERE \"year\">2001 AND \"vessels_entering_port\">91 AND \"imports_tonnes\"='144,368' AND \"exports_tonnes\">'4,024,311';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Attendance before Week 17 with a Record of Bye?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<17 AND \"record\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Kickoff Time on January 7, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff_time\" FROM \"schedule\" WHERE \"date\"='january 7, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Opponent in the game with a Result of L 24\u201314?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 24\u201314';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"kickoff_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Result of the game with an Attendance of 69,365?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='69,365';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"date_held\" text,\n \"winner\" text,\n \"events_won_by_kcl\" real,\n \"events_won_by_kclms\" real\n);\n\nQuestion: Which event won by KCLMS in 2008 has KCLMS as the winner and less than 10 wins by KCL?"
},
{
"role": "assistant",
"content": "SELECT \"events_won_by_kcl\" FROM \"results\" WHERE \"winner\"='kclms' AND \"events_won_by_kclms\"<10 AND \"year\"=2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"date_held\" text,\n \"winner\" text,\n \"events_won_by_kcl\" real,\n \"events_won_by_kclms\" real\n);\n\nQuestion: How many years were the events won by KCLMS less than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"results\" WHERE \"events_won_by_kclms\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"date_held\" text,\n \"winner\" text,\n \"events_won_by_kcl\" real,\n \"events_won_by_kclms\" real\n);\n\nQuestion: What is the average value for events won by KCL in a year earlier than 2004?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"events_won_by_kcl\") FROM \"results\" WHERE \"year\"<2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"during_the_season\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What is the appointment day for 4 December 2008 vacancy?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"during_the_season\" WHERE \"date_of_vacancy\"='4 december 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"during_the_season\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Which outgoing manager has tabled 16th position?"
},
{
"role": "assistant",
"content": "SELECT \"outgoing_manager\" FROM \"during_the_season\" WHERE \"position_in_table\"='16th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"during_the_season\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: Which position is team mons who was replaced by Christophe Dessy (caretaker)?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_table\" FROM \"during_the_season\" WHERE \"team\"='mons' AND \"replaced_by\"='christophe dessy (caretaker)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"during_the_season\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What is the table position for 4 December 2008 vacancy?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_table\" FROM \"during_the_season\" WHERE \"date_of_vacancy\"='4 december 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many laps have 50 points?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race_results\" WHERE \"points\"='50';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: What is the grid of team dreyer & reinbold racing, which has 26 points?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race_results\" WHERE \"team\"='dreyer & reinbold racing' AND \"points\"='26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many points have 75 laps?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race_results\" WHERE \"laps\"='75';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many laps have 0 laps led and 13 points?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race_results\" WHERE \"laps_led\"='0' AND \"points\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many points have 88 laps and a grid of 14?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"race_results\" WHERE \"laps\"='88' AND \"grid\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text,\n \"laps_led\" text,\n \"points\" text\n);\n\nQuestion: How many laps have a +0.4865 time/retired?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race_results\" WHERE \"time_retired\"='+0.4865';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atv_missions\" (\n \"designation\" text,\n \"name\" text,\n \"launch_date\" text,\n \"iss_docking_date\" text,\n \"deorbit_date\" text\n);\n\nQuestion: When did the ATV that deorbited on 29 september 2008, launch?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"atv_missions\" WHERE \"deorbit_date\"='29 september 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atv_missions\" (\n \"designation\" text,\n \"name\" text,\n \"launch_date\" text,\n \"iss_docking_date\" text,\n \"deorbit_date\" text\n);\n\nQuestion: When did the atv-002 launch?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"atv_missions\" WHERE \"designation\"='atv-002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atv_missions\" (\n \"designation\" text,\n \"name\" text,\n \"launch_date\" text,\n \"iss_docking_date\" text,\n \"deorbit_date\" text\n);\n\nQuestion: When did Edoardo Amaldi launch?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date\" FROM \"atv_missions\" WHERE \"name\"='edoardo amaldi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atv_missions\" (\n \"designation\" text,\n \"name\" text,\n \"launch_date\" text,\n \"iss_docking_date\" text,\n \"deorbit_date\" text\n);\n\nQuestion: When did the ATV that launched on 9 March 2008, deorbit?"
},
{
"role": "assistant",
"content": "SELECT \"deorbit_date\" FROM \"atv_missions\" WHERE \"launch_date\"='9 march 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_23_11_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was the partner on the game which took place on a clay surface with opponents of marco chiudinelli michael lammer and a runner-up result?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_23_11_12\" WHERE \"outcome\"='runner-up' AND \"surface\"='clay' AND \"opponents\"='marco chiudinelli michael lammer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_23_11_12\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the opponent in the match on a clay surface that had a score of 6\u20133, 7\u20136 (11\u20139)?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_23_11_12\" WHERE \"surface\"='clay' AND \"score\"='6\u20133, 7\u20136 (11\u20139)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real\n);\n\nQuestion: What is Season, when Races is less than 16?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"by_seasons_and_teams\" WHERE \"races\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real\n);\n\nQuestion: What is the sum of Poles, when Podiums is 0, and when Races is 17?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"poles\") FROM \"by_seasons_and_teams\" WHERE \"podiums\"=0 AND \"races\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real\n);\n\nQuestion: What is Poles, when Races is less than 16?"
},
{
"role": "assistant",
"content": "SELECT \"poles\" FROM \"by_seasons_and_teams\" WHERE \"races\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_seasons_and_teams\" (\n \"season\" text,\n \"races\" real,\n \"wins\" real,\n \"podiums\" real,\n \"poles\" real\n);\n\nQuestion: What is the lowest Races, when Podiums is greater than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"races\") FROM \"by_seasons_and_teams\" WHERE \"podiums\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people on average attended the game in week 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: The game in week 11 has what result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: For the game against the San Francisco 49ers what was the total attendance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='san francisco 49ers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Place that has a To standard of \u20131, and a Score of 71-68-76=215?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"to_par\"='\u20131' AND \"score\"='71-68-76=215';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Player that has a To standard of \u20137?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Player that has a To standard of \u20134?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Player that has a To standard of \u20131, and a Score of 71-68-76=215?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='\u20131' AND \"score\"='71-68-76=215';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Player that has a To standard of \u20134?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_timeline\" (\n \"competition\" text,\n \"1970_71\" text,\n \"1971_72\" text,\n \"1972_73\" text,\n \"1973_74\" text,\n \"1974_75\" text,\n \"1975_76\" text,\n \"1976_77\" text,\n \"1977_78\" text,\n \"1978_79\" text,\n \"1979_80\" text,\n \"1980_81\" text,\n \"1981_82\" text,\n \"1982_83\" text,\n \"1983_84\" text,\n \"1984_85\" text,\n \"1985_86\" text,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" text,\n \"1994_95\" text,\n \"1995_96\" text,\n \"1996_97\" text,\n \"1997_98\" text,\n \"1998_99\" text,\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: What shows for 1980\u201381 when 1973\u201374, and 2001\u201302 did not participate?"
},
{
"role": "assistant",
"content": "SELECT \"1980_81\" FROM \"competition_timeline\" WHERE \"1973_74\"='did not participate' AND \"2001_02\"='did not participate';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_timeline\" (\n \"competition\" text,\n \"1970_71\" text,\n \"1971_72\" text,\n \"1972_73\" text,\n \"1973_74\" text,\n \"1974_75\" text,\n \"1975_76\" text,\n \"1976_77\" text,\n \"1977_78\" text,\n \"1978_79\" text,\n \"1979_80\" text,\n \"1980_81\" text,\n \"1981_82\" text,\n \"1982_83\" text,\n \"1983_84\" text,\n \"1984_85\" text,\n \"1985_86\" text,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" text,\n \"1994_95\" text,\n \"1995_96\" text,\n \"1996_97\" text,\n \"1997_98\" text,\n \"1998_99\" text,\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: What is the 2004\u201305 answer when 2003\u201304 shows grp?"
},
{
"role": "assistant",
"content": "SELECT \"2004_05\" FROM \"competition_timeline\" WHERE \"2003_04\"='grp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_timeline\" (\n \"competition\" text,\n \"1970_71\" text,\n \"1971_72\" text,\n \"1972_73\" text,\n \"1973_74\" text,\n \"1974_75\" text,\n \"1975_76\" text,\n \"1976_77\" text,\n \"1977_78\" text,\n \"1978_79\" text,\n \"1979_80\" text,\n \"1980_81\" text,\n \"1981_82\" text,\n \"1982_83\" text,\n \"1983_84\" text,\n \"1984_85\" text,\n \"1985_86\" text,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" text,\n \"1994_95\" text,\n \"1995_96\" text,\n \"1996_97\" text,\n \"1997_98\" text,\n \"1998_99\" text,\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: What is the 1999\u201300 answer when the 2010\u201311 shows grp?"
},
{
"role": "assistant",
"content": "SELECT \"1999_00\" FROM \"competition_timeline\" WHERE \"2010_11\"='grp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_timeline\" (\n \"competition\" text,\n \"1970_71\" text,\n \"1971_72\" text,\n \"1972_73\" text,\n \"1973_74\" text,\n \"1974_75\" text,\n \"1975_76\" text,\n \"1976_77\" text,\n \"1977_78\" text,\n \"1978_79\" text,\n \"1979_80\" text,\n \"1980_81\" text,\n \"1981_82\" text,\n \"1982_83\" text,\n \"1983_84\" text,\n \"1984_85\" text,\n \"1985_86\" text,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" text,\n \"1994_95\" text,\n \"1995_96\" text,\n \"1996_97\" text,\n \"1997_98\" text,\n \"1998_99\" text,\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: What is the 1997\u201398 answer when the 2003\u201304 shows grp?"
},
{
"role": "assistant",
"content": "SELECT \"1997_98\" FROM \"competition_timeline\" WHERE \"2003_04\"='grp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_timeline\" (\n \"competition\" text,\n \"1970_71\" text,\n \"1971_72\" text,\n \"1972_73\" text,\n \"1973_74\" text,\n \"1974_75\" text,\n \"1975_76\" text,\n \"1976_77\" text,\n \"1977_78\" text,\n \"1978_79\" text,\n \"1979_80\" text,\n \"1980_81\" text,\n \"1981_82\" text,\n \"1982_83\" text,\n \"1983_84\" text,\n \"1984_85\" text,\n \"1985_86\" text,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_91\" text,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" text,\n \"1994_95\" text,\n \"1995_96\" text,\n \"1996_97\" text,\n \"1997_98\" text,\n \"1998_99\" text,\n \"1999_00\" text,\n \"2000_01\" text,\n \"2001_02\" text,\n \"2002_03\" text,\n \"2003_04\" text,\n \"2004_05\" text,\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text\n);\n\nQuestion: What is the 1989\u201390 answer when the 2004\u201305 shows grp?"
},
{
"role": "assistant",
"content": "SELECT \"1989_90\" FROM \"competition_timeline\" WHERE \"2004_05\"='grp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: Which rank is 40 for s Wicket with a player of Daniel Marsh?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"most_career_wickets\" WHERE \"s_wicket\"='40' AND \"player\"='daniel marsh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: Which rank has a s wicket at 40 and 28.42 is the average?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"most_career_wickets\" WHERE \"s_wicket\"='40' AND \"average\"='28.42';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: Which value for s wicket is associated with Shaun Young?"
},
{
"role": "assistant",
"content": "SELECT \"s_wicket\" FROM \"most_career_wickets\" WHERE \"player\"='shaun young';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: Which player has a s wicket at 48?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_career_wickets\" WHERE \"s_wicket\"='48';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_career_wickets\" (\n \"rank\" text,\n \"s_wicket\" text,\n \"player\" text,\n \"matches\" text,\n \"average\" text\n);\n\nQuestion: What is the s wicket value associated with Shaun Young?"
},
{
"role": "assistant",
"content": "SELECT \"s_wicket\" FROM \"most_career_wickets\" WHERE \"player\"='shaun young';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the date of the game where the NY Islanders are the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='ny islanders';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the score of the game where the NY Islanders are the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"home\"='ny islanders';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Who was the home team on February 3?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='february 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of Overall, when Round is less than 24, and when College is North Carolina State?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"<24 AND \"college\"='north carolina state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of Pick, when Position is OT, when Overall is greater than 91, when Round is greater than 21, and when College is Mississippi?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='ot' AND \"overall\">91 AND \"round\">21 AND \"college\"='mississippi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest Overall, when College is Hardin-Simmons, and when Round is greater than 26?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='hardin-simmons' AND \"round\">26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_10_titles_11_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the score of the tournament with younes el aynaoui as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_21_10_titles_11_runner_ups\" WHERE \"opponent\"='younes el aynaoui';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_10_titles_11_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the date of the tournament with carlos moy\u00e0 as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_21_10_titles_11_runner_ups\" WHERE \"opponent\"='carlos moy\u00e0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_10_titles_11_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the tournament with greg rusedski as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_21_10_titles_11_runner_ups\" WHERE \"opponent\"='greg rusedski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_10_titles_11_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface on 26 May 1996?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_21_10_titles_11_runner_ups\" WHERE \"date\"='26 may 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers_by_season\" (\n \"season\" real,\n \"player\" text,\n \"club\" text,\n \"nationality\" text,\n \"goals\" real\n);\n\nQuestion: What club did united states player ty harden play for?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"top_goalscorers_by_season\" WHERE \"nationality\"='united states' AND \"player\"='ty harden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers_by_season\" (\n \"season\" real,\n \"player\" text,\n \"club\" text,\n \"nationality\" text,\n \"goals\" real\n);\n\nQuestion: Which seaosn had a player of rohan ricketts?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season\") FROM \"top_goalscorers_by_season\" WHERE \"player\"='rohan ricketts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Tries Against, when Points Against is 213?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"pool_2\" WHERE \"points_against\"='213';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Tries Against, when Tries For is 21?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"pool_2\" WHERE \"tries_for\"='21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Try Diff, when Points Diff is +71?"
},
{
"role": "assistant",
"content": "SELECT \"try_diff\" FROM \"pool_2\" WHERE \"points_diff\"='+71';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Try Diff, when Points Against is 213?"
},
{
"role": "assistant",
"content": "SELECT \"try_diff\" FROM \"pool_2\" WHERE \"points_against\"='213';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Tries Against, when Try Diff is +15?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"pool_2\" WHERE \"try_diff\"='+15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: Which archbishop vacated the throne on May 17, 1907?"
},
{
"role": "assistant",
"content": "SELECT \"archbishop\" FROM \"archbishops\" WHERE \"vacated_throne\"='may 17, 1907';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: When did the archbishop that was ordained a bishop on July 25, 1902 die?"
},
{
"role": "assistant",
"content": "SELECT \"died\" FROM \"archbishops\" WHERE \"ordained_bishop\"='july 25, 1902';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: When was the archbishop that was born on February 10, 1858 ordained a bishop?"
},
{
"role": "assistant",
"content": "SELECT \"ordained_bishop\" FROM \"archbishops\" WHERE \"born\"='february 10, 1858';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: When did Archbishop Albert Daeger vacate the throne?"
},
{
"role": "assistant",
"content": "SELECT \"vacated_throne\" FROM \"archbishops\" WHERE \"archbishop\"='albert daeger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: When was the archbishop that was ordained as a bishop on November 30, 1925 born?"
},
{
"role": "assistant",
"content": "SELECT \"born\" FROM \"archbishops\" WHERE \"ordained_bishop\"='november 30, 1925';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"archbishops\" (\n \"archbishop\" text,\n \"born\" text,\n \"ordained_priest\" text,\n \"ordained_bishop\" text,\n \"appointed_archbishop\" text,\n \"vacated_throne\" text,\n \"died\" text\n);\n\nQuestion: When was the archbishop that was born on February 22, 1825 ordained as a bishop?"
},
{
"role": "assistant",
"content": "SELECT \"ordained_bishop\" FROM \"archbishops\" WHERE \"born\"='february 22, 1825';"
}
] |
[
{
"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\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which event was against Pat Barry?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='pat barry';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"athletics\" (\n \"athlete\" text,\n \"event\" text,\n \"100_h\" real,\n \"200_m\" real,\n \"800_m\" text,\n \"final\" real,\n \"rank\" text\n);\n\nQuestion: What event is 200m larger than 922?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"athletics\" WHERE \"200_m\">922;"
}
] |
[
{
"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 Player has a Score of 71-71=142?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='71-71=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 To par of T9 Place Player Ernie Els?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t9' AND \"player\"='ernie els';"
}
] |
[
{
"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 of the Player from South Africa?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='south africa';"
}
] |
[
{
"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 of the Player with a Score of 70-71=141?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='70-71=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Date has a Set 1 of 25\u201320?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_f\" WHERE \"set_1\"='25\u201320';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Score has a Total of 80\u201372?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"pool_f\" WHERE \"total\"='80\u201372';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Date has a Set 1 of 21\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_f\" WHERE \"set_1\"='21\u201325';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Set 2 has a Set 3 of 25\u201320, and a Time of 13:45?"
},
{
"role": "assistant",
"content": "SELECT \"set_2\" FROM \"pool_f\" WHERE \"set_3\"='25\u201320' AND \"time\"='13:45';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.