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 \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Which Date has a Result of w 13\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 13\u20136';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Result of Week larger than 3 on 1971-11-07?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">3 AND \"date\"='1971-11-07';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"division\" text,\n \"pos\" real,\n \"cup_competitions\" text\n);\n\nQuestion: What is the pos with more than 1 tier during Pokal Slovenije 1. round?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"season_by_season\" WHERE \"tier\">1 AND \"cup_competitions\"='pokal slovenije 1. round';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dry_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial_value\" text,\n \"us_customary\" text\n);\n\nQuestion: What are the exact Cubic inches of the Metric value of 104.955 L?"
},
{
"role": "assistant",
"content": "SELECT \"cubic_inches_exact\" FROM \"dry_measures\" WHERE \"metric_value\"='104.955 l';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dry_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial_value\" text,\n \"us_customary\" text\n);\n\nQuestion: What is the Translation of the US Customary value 0.263 pt?"
},
{
"role": "assistant",
"content": "SELECT \"translation\" FROM \"dry_measures\" WHERE \"us_customary\"='0.263 pt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dry_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial_value\" text,\n \"us_customary\" text\n);\n\nQuestion: What is the Metric value of Russian \u0447\u0435\u0301\u0442\u0432\u0435\u0440\u0442\u044c?"
},
{
"role": "assistant",
"content": "SELECT \"metric_value\" FROM \"dry_measures\" WHERE \"russian\"='\u0447\u0435\u0301\u0442\u0432\u0435\u0440\u0442\u044c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"dry_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial_value\" text,\n \"us_customary\" text\n);\n\nQuestion: What are the exact Cubic inches of the Unit of kruzhka?"
},
{
"role": "assistant",
"content": "SELECT \"cubic_inches_exact\" FROM \"dry_measures\" WHERE \"unit\"='kruzhka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_part_of_yanagiya_s_flight_log_in_april\" (\n \"date\" text,\n \"id_code_of_his_zero_fighter\" text,\n \"flight_hours\" text,\n \"count\" text,\n \"sub_total\" text\n);\n\nQuestion: Which Zero Fighter has a count of 10?"
},
{
"role": "assistant",
"content": "SELECT \"id_code_of_his_zero_fighter\" FROM \"a_part_of_yanagiya_s_flight_log_in_april\" WHERE \"count\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_part_of_yanagiya_s_flight_log_in_april\" (\n \"date\" text,\n \"id_code_of_his_zero_fighter\" text,\n \"flight_hours\" text,\n \"count\" text,\n \"sub_total\" text\n);\n\nQuestion: On which day were the subtotal hours 9:30?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"a_part_of_yanagiya_s_flight_log_in_april\" WHERE \"sub_total\"='9:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_part_of_yanagiya_s_flight_log_in_april\" (\n \"date\" text,\n \"id_code_of_his_zero_fighter\" text,\n \"flight_hours\" text,\n \"count\" text,\n \"sub_total\" text\n);\n\nQuestion: What is the count for the Zero Fighter with hours of 2:00?"
},
{
"role": "assistant",
"content": "SELECT \"count\" FROM \"a_part_of_yanagiya_s_flight_log_in_april\" WHERE \"flight_hours\"='2:00';"
}
] |
[
{
"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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which record has Katsuomi Inagaki as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='katsuomi inagaki';"
}
] |
[
{
"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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which method has a 1:46 time?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:46';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Henri Crockett's highest overall with more than 3 picks?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">3 AND \"name\"='henri crockett';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has fewer than 2 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What are the total number of picks for a guard with fewer than 6 rounds?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='guard' AND \"round\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest overall for a quarterback with fewer than 7 rounds?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='quarterback' AND \"round\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text,\n \"avg_attendance\" real\n);\n\nQuestion: What Playoffs had an Open Cup of 3rd round?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"open_cup\"='3rd round';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2005\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What was the D segment for episode 60?"
},
{
"role": "assistant",
"content": "SELECT \"segment_d\" FROM \"season_5_2005\" WHERE \"episode\"=60;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2005\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What was the B segmint for Netlix S03E01?"
},
{
"role": "assistant",
"content": "SELECT \"segment_b\" FROM \"season_5_2005\" WHERE \"netflix\"='s03e01';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2005\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What was the D segment for episode 60?"
},
{
"role": "assistant",
"content": "SELECT \"segment_d\" FROM \"season_5_2005\" WHERE \"episode\"=60;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"argentine_clubs_in_international_competi\" (\n \"team\" text,\n \"intercontinental\" text,\n \"recopa_1996\" text,\n \"supercopa_1996\" text,\n \"conmebol_1996\" text,\n \"copa_libertadores_1997\" text\n);\n\nQuestion: What racing club team made supercopa 1996?"
},
{
"role": "assistant",
"content": "SELECT \"supercopa_1996\" FROM \"argentine_clubs_in_international_competi\" WHERE \"team\"='racing club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Name the # country for new palestine"
},
{
"role": "assistant",
"content": "SELECT \"num_county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='new palestine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Name the number of enrollment for county of 48 madison"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"num_county\"='48 madison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Name the IHSAA class with county 18 delaware and tigers mascot"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"num_county\"='18 delaware' AND \"mascot\"='tigers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"num_county\" text\n);\n\nQuestion: Name the mascot for shelbyville"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='shelbyville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What's the capacity that has the highest greater than 1,763 and is at Hampden Park?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"capacity\") FROM \"attendances\" WHERE \"stadium\"='hampden park' AND \"highest\">'1,763';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: What's the highest with a capacity of greater than 4,000 and an average of 615?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"highest\") FROM \"attendances\" WHERE \"average\"=615 AND \"capacity\">'4,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendances\" (\n \"team\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"highest\" real,\n \"lowest\" real,\n \"average\" real\n);\n\nQuestion: At Balmoor Stadium, what's the total average having a greater than 400 lowest?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average\") FROM \"attendances\" WHERE \"stadium\"='balmoor' AND \"lowest\">400;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the score of Tommy Aaron (2) when the tournament was in georgia?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"tournament_results\" WHERE \"location\"='georgia' AND \"winner\"='tommy aaron (2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the tournament that had a first prize of $12,600?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"tournament_results\" WHERE \"1st_prize\"='12,600';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What was the score of Ken Still (3) when he won first place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"tournament_results\" WHERE \"winner\"='ken still (3)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_performances\" (\n \"date\" text,\n \"placing\" text,\n \"beat_by\" text,\n \"location\" text,\n \"distance\" text\n);\n\nQuestion: Who beat Chic by 8fm?"
},
{
"role": "assistant",
"content": "SELECT \"beat_by\" FROM \"race_performances\" WHERE \"distance\"='8fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_performances\" (\n \"date\" text,\n \"placing\" text,\n \"beat_by\" text,\n \"location\" text,\n \"distance\" text\n);\n\nQuestion: What was the placing of the race in which Chic won by 8gf?"
},
{
"role": "assistant",
"content": "SELECT \"placing\" FROM \"race_performances\" WHERE \"beat_by\"='won' AND \"distance\"='8gf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_performances\" (\n \"date\" text,\n \"placing\" text,\n \"beat_by\" text,\n \"location\" text,\n \"distance\" text\n);\n\nQuestion: What was the date in which Chic won at CHS?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_performances\" WHERE \"beat_by\"='won' AND \"location\"='chs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of game 54, which was in Los Angeles and was before day 18?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"location_attendance\"='los angeles' AND \"date\"<18 AND \"game\"=54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the earliest date of the game with a score of 2-2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"date\") FROM \"schedule_and_results\" WHERE \"score\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the average date of the game with the Detroit Red Wings as the opponent?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"date\") FROM \"schedule_and_results\" WHERE \"opponent\"='detroit red wings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game with a score of 4-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule_and_results\" WHERE \"score\"='4-2';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game that had a record of 3-3?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='3-3';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game with a loss of Mercedes (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='mercedes (0-1)';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game with a loss of Weaver (1-2)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='weaver (1-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What's the Remixed by with a Version of Strings for Soul's Mix?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"version\"='strings for soul''s mix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What the highest Year with a Remixed by Laurent Boutonnat?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"official_versions\" WHERE \"remixed_by\"='laurent boutonnat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What's the total Year with a Length of 4:45 an has an Album of Les Mots?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"official_versions\" WHERE \"length\"='4:45' AND \"album\"='les mots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What's the Length with the Version of Album Version?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"official_versions\" WHERE \"version\"='album version';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What Album has a Year that's larger than 2001?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"official_versions\" WHERE \"year\">2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_2_20_12_2007\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is the lowest position for bruce taylor?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"race_2_20_12_2007\" WHERE \"pilot\"='bruce taylor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_2_20_12_2007\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: Which pilot has a position above 5 and a speed of 118.8km/h?"
},
{
"role": "assistant",
"content": "SELECT \"pilot\" FROM \"race_2_20_12_2007\" WHERE \"position\">5 AND \"speed\"='118.8km/h';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_2_20_12_2007\" (\n \"position\" real,\n \"pilot\" text,\n \"glider\" text,\n \"speed\" text,\n \"distance\" text\n);\n\nQuestion: What is Erwin Sommer's average position?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"race_2_20_12_2007\" WHERE \"pilot\"='erwin sommer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opening_weekend_gross\" (\n \"date\" text,\n \"territory\" text,\n \"screens\" real,\n \"rank\" real,\n \"gross\" text\n);\n\nQuestion: What is the highest rank of the day with a gross of $38,916 and more than 6 screens?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"opening_weekend_gross\" WHERE \"gross\"='$38,916' AND \"screens\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opening_weekend_gross\" (\n \"date\" text,\n \"territory\" text,\n \"screens\" real,\n \"rank\" real,\n \"gross\" text\n);\n\nQuestion: What is the gross in the United Kingdom?"
},
{
"role": "assistant",
"content": "SELECT \"gross\" FROM \"opening_weekend_gross\" WHERE \"territory\"='united kingdom';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opening_weekend_gross\" (\n \"date\" text,\n \"territory\" text,\n \"screens\" real,\n \"rank\" real,\n \"gross\" text\n);\n\nQuestion: What is the territory with 17 screens?"
},
{
"role": "assistant",
"content": "SELECT \"territory\" FROM \"opening_weekend_gross\" WHERE \"screens\"=17;"
}
] |
[
{
"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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"participants\" real\n);\n\nQuestion: What is the lowest number of Golds that has Participants smaller than 14, and Rank of 1, and Total larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"participants\"<14 AND \"rank\"=1 AND \"total\">1;"
}
] |
[
{
"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: On what date was the record 39\u201354?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='39\u201354';"
}
] |
[
{
"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: What was the record on July 1?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='july 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_a_helsinki\" (\n \"pos\" real,\n \"matches\" real,\n \"wins\" real,\n \"loses\" real,\n \"results\" text,\n \"points\" real,\n \"diff\" text\n);\n\nQuestion: How many total matches with less than 1 win and a position higher than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"matches\") FROM \"group_a_helsinki\" WHERE \"wins\"<1 AND \"pos\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liberal_party_federal_electoral_results\" (\n \"year\" text,\n \"seats_in_house\" real,\n \"liberal_candidates\" real,\n \"seats_won\" real,\n \"seat_change\" text,\n \"popular_vote\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text,\n \"liberal_leader\" text\n);\n\nQuestion: Which Liberal leader has Seats won smaller than 100, and Seats in House of 215, and a % of popular vote of 43.1%?"
},
{
"role": "assistant",
"content": "SELECT \"liberal_leader\" FROM \"liberal_party_federal_electoral_results\" WHERE \"seats_won\"<100 AND \"seats_in_house\"=215 AND \"pct_of_popular_vote\"='43.1%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liberal_party_federal_electoral_results\" (\n \"year\" text,\n \"seats_in_house\" real,\n \"liberal_candidates\" real,\n \"seats_won\" real,\n \"seat_change\" text,\n \"popular_vote\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text,\n \"liberal_leader\" text\n);\n\nQuestion: Which Popular vote has a Liberal leader of king, and Seats won larger than 116, and a Year of 1921?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"popular_vote\") FROM \"liberal_party_federal_electoral_results\" WHERE \"liberal_leader\"='king' AND \"seats_won\">116 AND \"year\"='1921';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liberal_party_federal_electoral_results\" (\n \"year\" text,\n \"seats_in_house\" real,\n \"liberal_candidates\" real,\n \"seats_won\" real,\n \"seat_change\" text,\n \"popular_vote\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text,\n \"liberal_leader\" text\n);\n\nQuestion: How many Liberal candidates have a Liberal leader of pearson, and a % of popular vote of 40.2%, and Seats won smaller than 131?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"liberal_candidates\") FROM \"liberal_party_federal_electoral_results\" WHERE \"liberal_leader\"='pearson' AND \"pct_of_popular_vote\"='40.2%' AND \"seats_won\"<131;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liberal_party_federal_electoral_results\" (\n \"year\" text,\n \"seats_in_house\" real,\n \"liberal_candidates\" real,\n \"seats_won\" real,\n \"seat_change\" text,\n \"popular_vote\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text,\n \"liberal_leader\" text\n);\n\nQuestion: Which % of popular vote has a Liberal leader of laurier, and a Popular vote larger than 521,041, and Liberal candidates of 213, and Seats in House smaller than 235?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_popular_vote\" FROM \"liberal_party_federal_electoral_results\" WHERE \"liberal_leader\"='laurier' AND \"popular_vote\">'521,041' AND \"liberal_candidates\"=213 AND \"seats_in_house\"<235;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liberal_party_federal_electoral_results\" (\n \"year\" text,\n \"seats_in_house\" real,\n \"liberal_candidates\" real,\n \"seats_won\" real,\n \"seat_change\" text,\n \"popular_vote\" real,\n \"pct_of_popular_vote\" text,\n \"result\" text,\n \"liberal_leader\" text\n);\n\nQuestion: How many Liberal candidates have Seats in House smaller than 245, and a Popular vote larger than 350,512, and Seats won smaller than 139, and a Seat Change of +28?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"liberal_candidates\") FROM \"liberal_party_federal_electoral_results\" WHERE \"seats_in_house\"<245 AND \"popular_vote\">'350,512' AND \"seats_won\"<139 AND \"seat_change\"='+28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winners\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the score during the 2006-2007 year?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"year\"='2006-2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winners\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Who were the winners in 2010-2011?"
},
{
"role": "assistant",
"content": "SELECT \"winners\" FROM \"winners\" WHERE \"year\"='2010-2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winners\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the score of the match with UTC as the runner-up and Saint-Gaudens Bears as the winners?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"runner_up\"='utc' AND \"winners\"='saint-gaudens bears';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winners\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which year had UTC as the runner-up and Saint-Gaudens Bears as the winners?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners\" WHERE \"runner_up\"='utc' AND \"winners\"='saint-gaudens bears';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winners\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What is the venue of the match with a score of 33-22?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"score\"='33-22';"
}
] |
[
{
"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: Who had the highest assists during the game on February 22?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='february 22';"
}
] |
[
{
"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 team did the Heat play against at the TD Waterhouse Centre?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"location_attendance\"='td waterhouse centre';"
}
] |
[
{
"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 date was the game against Toronto which had a game number higher than 53?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\">53 AND \"team\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoff_games_that_went_at_least_into_do\" (\n \"length_of_game\" text,\n \"date\" text,\n \"away_team\" text,\n \"score\" text,\n \"home_team\" text\n);\n\nQuestion: What is the date of the that was played with the Baltimore Colts at home?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoff_games_that_went_at_least_into_do\" WHERE \"home_team\"='baltimore colts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoff_games_that_went_at_least_into_do\" (\n \"length_of_game\" text,\n \"date\" text,\n \"away_team\" text,\n \"score\" text,\n \"home_team\" text\n);\n\nQuestion: How long did the game go that was played with the Houston Oilers at home?"
},
{
"role": "assistant",
"content": "SELECT \"length_of_game\" FROM \"playoff_games_that_went_at_least_into_do\" WHERE \"home_team\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoff_games_that_went_at_least_into_do\" (\n \"length_of_game\" text,\n \"date\" text,\n \"away_team\" text,\n \"score\" text,\n \"home_team\" text\n);\n\nQuestion: What was the date of the game that lasted 75:43?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoff_games_that_went_at_least_into_do\" WHERE \"length_of_game\"='75:43';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoff_games_that_went_at_least_into_do\" (\n \"length_of_game\" text,\n \"date\" text,\n \"away_team\" text,\n \"score\" text,\n \"home_team\" text\n);\n\nQuestion: Who is the away team for the game played on December 24, 1977?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"playoff_games_that_went_at_least_into_do\" WHERE \"date\"='december 24, 1977';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoff_games_that_went_at_least_into_do\" (\n \"length_of_game\" text,\n \"date\" text,\n \"away_team\" text,\n \"score\" text,\n \"home_team\" text\n);\n\nQuestion: What was the length of the game where the Baltimore Colts were at home?"
},
{
"role": "assistant",
"content": "SELECT \"length_of_game\" FROM \"playoff_games_that_went_at_least_into_do\" WHERE \"home_team\"='baltimore colts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the number of laps for 16 grids?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"125cc_classification\" WHERE \"grid\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who was the rider for laps less than 23 with grid greater than 21 that had a time of +1 lap?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"125cc_classification\" WHERE \"laps\"<23 AND \"grid\">21 AND \"time_retired\"='+1 lap';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the total grid for someone with a time/retire of +44.831"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"125cc_classification\" WHERE \"time_retired\"='+44.831';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the smallest grid for Time/Retired of +22.687?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"125cc_classification\" WHERE \"time_retired\"='+22.687';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the recoupa sudaamericana 1996 result of team flamengo, which did not qualify for the copa conmebol 1996?"
},
{
"role": "assistant",
"content": "SELECT \"recopa_sudamericana_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_conmebol_1996\"='did not qualify' AND \"team\"='flamengo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the copa libertadores 1996 result of the team with a copa conmebol 1996 result of quarterfinals?"
},
{
"role": "assistant",
"content": "SELECT \"copa_libertadores_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_conmebol_1996\"='quarterfinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the copa libertadores 1996 of team corinthians?"
},
{
"role": "assistant",
"content": "SELECT \"copa_libertadores_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"team\"='corinthians';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the copa conmebol 1996 result of the team with a recopa sudamericana 1996 result of champions?"
},
{
"role": "assistant",
"content": "SELECT \"copa_conmebol_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"recopa_sudamericana_1996\"='champions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the recoupa sudamericana 1996 of the team with a copa libertadores 1996 result of the round of 16?"
},
{
"role": "assistant",
"content": "SELECT \"recopa_sudamericana_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"copa_libertadores_1996\"='round of 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1996\" text,\n \"supercopa_sudamericana_1996\" text,\n \"copa_conmebol_1996\" text,\n \"recopa_sudamericana_1996\" text\n);\n\nQuestion: What is the recoupa sudamericana 1996 result of team corinthians?"
},
{
"role": "assistant",
"content": "SELECT \"recopa_sudamericana_1996\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"team\"='corinthians';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greatest_win_margins_by_runs\" (\n \"rank\" text,\n \"margin\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What season has 195 runs as a margin?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"greatest_win_margins_by_runs\" WHERE \"margin\"='195 runs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greatest_win_margins_by_runs\" (\n \"rank\" text,\n \"margin\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What season has 2 as a rank?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"greatest_win_margins_by_runs\" WHERE \"rank\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greatest_win_margins_by_runs\" (\n \"rank\" text,\n \"margin\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What venue has 2 as the rank?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"greatest_win_margins_by_runs\" WHERE \"rank\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greatest_win_margins_by_runs\" (\n \"rank\" text,\n \"margin\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What opponent has 2011/12 as the season?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"greatest_win_margins_by_runs\" WHERE \"season\"='2011/12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What is the length of the version from 2003?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"official_versions\" WHERE \"year\"=2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: Who remixed the version with a length of 4:22?"
},
{
"role": "assistant",
"content": "SELECT \"remixed_by\" FROM \"official_versions\" WHERE \"length\"='4:22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What is the length of the UK remix version?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"official_versions\" WHERE \"version\"='uk remix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What year was the version with a remixes album?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"official_versions\" WHERE \"album\"='remixes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanfl\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: How many losses did the team, Sturt, have when they had more than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"sanfl\" WHERE \"team\"='sturt' AND \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanfl\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the average number of draws for the team that had more than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"draws\") FROM \"sanfl\" WHERE \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanfl\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the least amount of losses for the team that had more than 0 draws during the seasons earlier than 1926?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"sanfl\" WHERE \"draws\">0 AND \"season\"<1926;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanfl\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the highest number of wins for the team, Central District, who had less than 0 draws and took place during a season before 1995?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"sanfl\" WHERE \"season\"<1995 AND \"team\"='central district' AND \"draws\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sanfl\" (\n \"season\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the average number of wins before the season in 1906 where there were 0 draws?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"sanfl\" WHERE \"season\"<1906 AND \"draws\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chief_wilson_s_36_triples\" (\n \"triple\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: Who is the Opposing Pitcher when Team is phillies, Location is pittsburgh, and Inning is 8th?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_pitcher\" FROM \"chief_wilson_s_36_triples\" WHERE \"team\"='phillies' AND \"location\"='pittsburgh' AND \"inning\"='8th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chief_wilson_s_36_triples\" (\n \"triple\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: What is the lowest Game where Inning is 6th, and the Opposing Pitcher is cliff curtis?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"chief_wilson_s_36_triples\" WHERE \"inning\"='6th' AND \"opposing_pitcher\"='cliff curtis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chief_wilson_s_36_triples\" (\n \"triple\" real,\n \"game\" real,\n \"date\" text,\n \"inning\" text,\n \"location\" text,\n \"opposing_pitcher\" text,\n \"team\" text\n);\n\nQuestion: What is was Date that where Triple was smaller than 26, and Game was 25?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"chief_wilson_s_36_triples\" WHERE \"triple\"<26 AND \"game\"=25;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.