chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"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: Name the record for february 27"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='february 27';"
}
] |
[
{
"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: Name the team for 48 game"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_overall\" real\n);\n\nQuestion: What's the average of shows that had a timeslot rank greater that 3 but still had a smaller viewership less than 4.87?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"share\") FROM \"weekly_ratings\" WHERE \"rank_timeslot\">3 AND \"viewers_m\"<4.87;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"conference\" text,\n \"division\" text,\n \"appearances\" real,\n \"wins\" real,\n \"losses\" real\n);\n\nQuestion: Which division in the AFC Conference had a total of 10 wins and appeared more than 18 times?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"statistics\" WHERE \"conference\"='afc' AND \"wins\"=10 AND \"appearances\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"conference\" text,\n \"division\" text,\n \"appearances\" real,\n \"wins\" real,\n \"losses\" real\n);\n\nQuestion: How many losses did the East Division have who appeared 18 times and lost 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"statistics\" WHERE \"division\"='east' AND \"losses\"=8 AND \"appearances\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"conference\" text,\n \"division\" text,\n \"appearances\" real,\n \"wins\" real,\n \"losses\" real\n);\n\nQuestion: How many losses did the division who appeared less than 16 times have?"
},
{
"role": "assistant",
"content": "SELECT \"losses\" FROM \"statistics\" WHERE \"appearances\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: How many medals for spain with 1 silver?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medal_count\" WHERE \"silver\"='1' AND \"nation\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: How many silvers for finland?"
},
{
"role": "assistant",
"content": "SELECT \"silver\" FROM \"medal_count\" WHERE \"nation\"='finland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: How many medals for spain that has 1 silver and 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_count\" WHERE \"silver\"='1' AND \"bronze\"='1' AND \"nation\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: What is the record when they play the canucks and have under 98 points?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"points\"<98 AND \"opponent\"='canucks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text,\n \"arena\" text,\n \"points\" real\n);\n\nQuestion: How many attended the game against the sharks with over 86 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"regular_season\" WHERE \"points\">86 AND \"opponent\"='sharks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Name the song that has a track larger than 7 and means death."
},
{
"role": "assistant",
"content": "SELECT \"recorded\" FROM \"track_listing\" WHERE \"track\">7 AND \"translation\"='death';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Which track 7 title was recorded in 1959-09-15?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"recorded\"='1959-09-15' AND \"track\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"translation\" text,\n \"composer\" text,\n \"recorded\" text\n);\n\nQuestion: Which track translates to Flemish Women?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"track_listing\" WHERE \"translation\"='flemish women';"
}
] |
[
{
"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 is the high capacity that has an average under 489 and a highest over 778?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"capacity\") FROM \"attendances\" WHERE \"average\"<489 AND \"highest\">778;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music_videos\" (\n \"title\" text,\n \"other_performer_s\" text,\n \"director_s\" text,\n \"album\" text,\n \"year\" real\n);\n\nQuestion: On the album titled \u201cLoud\u201d who was the other performer on the song directed by Melina Matsoukas?"
},
{
"role": "assistant",
"content": "SELECT \"other_performer_s\" FROM \"music_videos\" WHERE \"director_s\"='melina matsoukas' AND \"album\"='loud';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the decision when vancouver is at home and winnipeg is away?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"october\" WHERE \"home\"='vancouver' AND \"visitor\"='winnipeg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the team from chicago?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"october\" WHERE \"home\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the away team st kilda?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: Which club has 1 cap?"
},
{
"role": "assistant",
"content": "SELECT \"club_province\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: Which position has a club of Meralomas and a player named David Biddle?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2007_rugby_world_cup_squads\" WHERE \"club_province\"='meralomas' AND \"player\"='david biddle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the average number of caps for Meralomas with positions of centre?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"caps\") FROM \"2007_rugby_world_cup_squads\" WHERE \"club_province\"='meralomas' AND \"position\"='centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games_for_zrinjski_in_european_competiti\" (\n \"date\" text,\n \"venue\" text,\n \"opponent\" text,\n \"score\" text,\n \"scorers\" text,\n \"competition\" text\n);\n\nQuestion: Who are the scorers when the score is 9-2?"
},
{
"role": "assistant",
"content": "SELECT \"scorers\" FROM \"games_for_zrinjski_in_european_competiti\" WHERE \"score\"='9-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_municipalities_in_quebec\" (\n \"code\" real,\n \"type\" text,\n \"name\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"regional_county_municipality\" text,\n \"region\" real\n);\n\nQuestion: What is the smallest population in a region greater than 9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population\") FROM \"list_of_municipalities_in_quebec\" WHERE \"region\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_municipalities_in_quebec\" (\n \"code\" real,\n \"type\" text,\n \"name\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"regional_county_municipality\" text,\n \"region\" real\n);\n\nQuestion: What is the average area for code 98030 with population over 312?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_km_2\") FROM \"list_of_municipalities_in_quebec\" WHERE \"code\"=98030 AND \"population\">312;"
}
] |
[
{
"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 is the attendance on may 28?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='may 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On the Date of 4 Oct 2009, who was the Runner(s)-up?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"japan_golf_tour_wins_10\" WHERE \"date\"='4 oct 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: On the Date of 2 Aug 2009, who was the Runner(s)-up?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"japan_golf_tour_wins_10\" WHERE \"date\"='2 aug 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Which Tournament was on the Date 6 Sep 2009?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"japan_golf_tour_wins_10\" WHERE \"date\"='6 sep 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the Winning score for the Mynavi ABC Championship Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"japan_golf_tour_wins_10\" WHERE \"tournament\"='mynavi abc championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the Winning score when the Margin of victory is 5 strokes and the Date was 6 Sep 2009?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"japan_golf_tour_wins_10\" WHERE \"margin_of_victory\"='5 strokes' AND \"date\"='6 sep 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"japan_golf_tour_wins_10\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the Runner(s)-up on the Date 4 Oct 2009?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"japan_golf_tour_wins_10\" WHERE \"date\"='4 oct 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: What is the score with third place of stefan edberg?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"2009\" WHERE \"third_place\"='stefan edberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Name the runner-up for algarve tournament"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"2009\" WHERE \"tournament\"='algarve';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: I want to know the tournament that has a third place of magnus gustafsson"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"2009\" WHERE \"third_place\"='magnus gustafsson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Who was the winner when the third place was fernando meligeni?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2009\" WHERE \"third_place\"='fernando meligeni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Name the tournament for patrick rafter winning"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"2009\" WHERE \"winner\"='patrick rafter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_barbaro_stakes_since_1993\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who was the owner in 1996 of trainer Nick Zito?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners_of_the_barbaro_stakes_since_1993\" WHERE \"trainer\"='nick zito' AND \"year\"='1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_barbaro_stakes_since_1993\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What year did jockey Ramon Dominguez have a distance of 1-1/16?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners_of_the_barbaro_stakes_since_1993\" WHERE \"distance\"='1-1/16' AND \"jockey\"='ramon dominguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_barbaro_stakes_since_1993\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who was the owner of the trainer Steve Klesaris?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners_of_the_barbaro_stakes_since_1993\" WHERE \"trainer\"='steve klesaris';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_barbaro_stakes_since_1993\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: Who is the owner of the Raglan Road winner?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners_of_the_barbaro_stakes_since_1993\" WHERE \"winner\"='raglan road';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_barbaro_stakes_since_1993\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"distance\" text,\n \"time\" text,\n \"purse\" text\n);\n\nQuestion: What year was Burning Roma the winner?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners_of_the_barbaro_stakes_since_1993\" WHERE \"winner\"='burning roma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honour_board\" (\n \"season\" real,\n \"position\" real,\n \"win_loss\" text,\n \"coach\" text,\n \"captain\" text,\n \"dudley_tuckey_medal\" text,\n \"leading_goalkicker\" text\n);\n\nQuestion: What is the win/loss of coach Peter German?"
},
{
"role": "assistant",
"content": "SELECT \"win_loss\" FROM \"honour_board\" WHERE \"coach\"='peter german';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Name the home team scored 9.8 (62)"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"home_team_score\"='9.8 (62)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which tyre was before 1995 with 142 laps?"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"year\"<1995 AND \"laps\"=142;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which tyres has more than 5 laps with team nissan motorsports international?"
},
{
"role": "assistant",
"content": "SELECT \"tyres\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"laps\">5 AND \"team\"='nissan motorsports international';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What position that has m tyres and 352 or more laps?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"tyres\"='m' AND \"laps\">352;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_playoffs\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: who is the team 2 when the 1st leg is 2-2?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"relegation_playoffs\" WHERE \"1st_leg\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_playoffs\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: who is the team 2 when the team 1 is sestese(e16)?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"relegation_playoffs\" WHERE \"team_1\"='sestese(e16)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_playoffs\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: who is the team 2 when the 2nd leg is 3-4?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"relegation_playoffs\" WHERE \"2nd_leg\"='3-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_playoffs\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: who is the team 2 when the 1st leg is 1-1 and the team 1 is verucchio(f15)?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"relegation_playoffs\" WHERE \"1st_leg\"='1-1' AND \"team_1\"='verucchio(f15)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" real,\n \"genes\" real\n);\n\nQuestion: What is the largest base pair with a Strain of unspecified?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"base_pairs\") FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"strain\"='unspecified';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" real,\n \"genes\" real\n);\n\nQuestion: What is the lowst base pair with a Species of borrelia garinii, and a Genes larger than 832?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"base_pairs\") FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"species\"='borrelia garinii' AND \"genes\">832;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" real,\n \"genes\" real\n);\n\nQuestion: What type has an unspecified species and less than 367 genes?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"species\"='unspecified' AND \"genes\"<367;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" real,\n \"genes\" real\n);\n\nQuestion: What base pair has 832 genes?"
},
{
"role": "assistant",
"content": "SELECT \"base_pairs\" FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"genes\"=832;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_sequenced_bacterial_genomes\" (\n \"species\" text,\n \"strain\" text,\n \"type\" text,\n \"base_pairs\" real,\n \"genes\" real\n);\n\nQuestion: How many genes have a Species of leptospira interrogans, and a Base Pairs smaller than 4,277,185?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"genes\") FROM \"list_of_sequenced_bacterial_genomes\" WHERE \"species\"='leptospira interrogans' AND \"base_pairs\"<'4,277,185';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"rank\" real,\n \"date\" text,\n \"stadium\" text,\n \"opponent\" text,\n \"competition\" text,\n \"score_scotland_s_score_is_shown_first\" text\n);\n\nQuestion: Which competition was ranked 9?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"scotland_national_team\" WHERE \"rank\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"rank\" real,\n \"date\" text,\n \"stadium\" text,\n \"opponent\" text,\n \"competition\" text,\n \"score_scotland_s_score_is_shown_first\" text\n);\n\nQuestion: What was Scotland's score at the rank 3 Competition of BHC?"
},
{
"role": "assistant",
"content": "SELECT \"score_scotland_s_score_is_shown_first\" FROM \"scotland_national_team\" WHERE \"competition\"='bhc' AND \"rank\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_table\" (\n \"rank\" real,\n \"club_1\" text,\n \"seasons\" real,\n \"spells\" real,\n \"played_2\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals\" text,\n \"points_3\" text\n);\n\nQuestion: What is the sum of draws with 274-357 goals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"all_time_table\" WHERE \"goals\"='274-357';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_table\" (\n \"rank\" real,\n \"club_1\" text,\n \"seasons\" real,\n \"spells\" real,\n \"played_2\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals\" text,\n \"points_3\" text\n);\n\nQuestion: What is the lowest played 2 number with less than 83 losses and less than 65 draws with Chernomorets Novorossiysk in season 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played_2\") FROM \"all_time_table\" WHERE \"lost\">83 AND \"seasons\"=8 AND \"club_1\"='chernomorets novorossiysk' AND \"drawn\"<65;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_table\" (\n \"rank\" real,\n \"club_1\" text,\n \"seasons\" real,\n \"spells\" real,\n \"played_2\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals\" text,\n \"points_3\" text\n);\n\nQuestion: What is the rank number with 562-506 goals before season 13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"all_time_table\" WHERE \"goals\"='562-506' AND \"seasons\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_table\" (\n \"rank\" real,\n \"club_1\" text,\n \"seasons\" real,\n \"spells\" real,\n \"played_2\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals\" text,\n \"points_3\" text\n);\n\nQuestion: How many seasons have goals of 261-338 with more than 111 losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"seasons\") FROM \"all_time_table\" WHERE \"goals\"='261-338' AND \"lost\">111;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_table\" (\n \"rank\" real,\n \"club_1\" text,\n \"seasons\" real,\n \"spells\" real,\n \"played_2\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals\" text,\n \"points_3\" text\n);\n\nQuestion: What is the highest season number with 57 draws, rank 20, and more than 1 spell?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seasons\") FROM \"all_time_table\" WHERE \"drawn\"=57 AND \"rank\"=20 AND \"spells\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the results of the game at Doha?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"venue\"='doha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score during the competition of 1998 fifa world cup qualification?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='1998 fifa world cup qualification';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the competition that took place on October 1, 1994?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='october 1, 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the competition that had a 2-2 result?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where did the competition take place that had a 4-2 result?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='4-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Where was the competition that took place that had a 5-1 result?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='5-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: Tell me the highest goals with tries less than 1 and fullback position"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"1996_squad_statistics\" WHERE \"tries\"<1 AND \"position\"='fullback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: Tell me the lowest tries for goals more than 0 with centre position and points less than 54"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tries\") FROM \"1996_squad_statistics\" WHERE \"goals\">0 AND \"position\"='centre' AND \"points\"<54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: I want to know the player with tries more than 1 and position of hooker with points less than 54"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1996_squad_statistics\" WHERE \"tries\">1 AND \"points\"<54 AND \"position\"='hooker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_squad_statistics\" (\n \"player\" text,\n \"position\" text,\n \"tries\" real,\n \"goals\" real,\n \"points\" real\n);\n\nQuestion: Tell me the player with points larger than 36 and goals more than 0 with tries of 12"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1996_squad_statistics\" WHERE \"points\">36 AND \"goals\">0 AND \"tries\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What Tournament was the 2010 Olympic Games?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2010\"='olympic games';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"ship\" text,\n \"built\" real,\n \"entered_service\" real,\n \"route\" text,\n \"gross_tonnage\" text,\n \"length\" text,\n \"width\" text,\n \"passengers\" real,\n \"vessels\" real,\n \"knots\" real\n);\n\nQuestion: Which width had an entered service year of 2010?"
},
{
"role": "assistant",
"content": "SELECT \"width\" FROM \"current_fleet\" WHERE \"entered_service\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"ship\" text,\n \"built\" real,\n \"entered_service\" real,\n \"route\" text,\n \"gross_tonnage\" text,\n \"length\" text,\n \"width\" text,\n \"passengers\" real,\n \"vessels\" real,\n \"knots\" real\n);\n\nQuestion: What is the most recent built year when the year of entering service was more recent than 2003, and the knots is less than 27?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"built\") FROM \"current_fleet\" WHERE \"entered_service\">2003 AND \"knots\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_fleet\" (\n \"ship\" text,\n \"built\" real,\n \"entered_service\" real,\n \"route\" text,\n \"gross_tonnage\" text,\n \"length\" text,\n \"width\" text,\n \"passengers\" real,\n \"vessels\" real,\n \"knots\" real\n);\n\nQuestion: How many knots did the Ms Moby Vincent have when passengers was less than 1.6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"knots\") FROM \"current_fleet\" WHERE \"ship\"='ms moby vincent' AND \"passengers\"<1.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Richmond play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"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: When the phillies 1:15 pm played on April 9, what was the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"opponent\"='phillies 1:15 pm' AND \"date\"='april 9';"
}
] |
[
{
"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: When was there a score of 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='5-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of silvers for nations with over 1 bronze medal?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"bronze\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the Interregnum ended for Count Palatine of Saxony of frederick augustus i, elector of saxony?"
},
{
"role": "assistant",
"content": "SELECT \"interregnum_ended\" FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"count_palatine_of_saxony\"='frederick augustus i, elector of saxony';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the Interregnum ended for Count Palatine of Saxony of john george ii, elector of saxony?"
},
{
"role": "assistant",
"content": "SELECT \"interregnum_ended\" FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"count_palatine_of_saxony\"='john george ii, elector of saxony';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the duration for Count Palatine of the Rhine of charles albert, elector of bavaria?"
},
{
"role": "assistant",
"content": "SELECT \"duration\" FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"count_palatine_of_the_rhine\"='charles albert, elector of bavaria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the name of the Count Palatine of the Rhine with a Interregnum began of 2 april 1657 death of ferdinand iii?"
},
{
"role": "assistant",
"content": "SELECT \"count_palatine_of_the_rhine\" FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"interregnum_began\"='2 april 1657 death of ferdinand iii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_imperial_vicars_1437_1792\" (\n \"interregnum_began\" text,\n \"interregnum_ended\" text,\n \"duration\" text,\n \"count_palatine_of_saxony\" text,\n \"count_palatine_of_the_rhine\" text\n);\n\nQuestion: What is the Interregnum ended for the person with a Duration of 3 months, 6 days?"
},
{
"role": "assistant",
"content": "SELECT \"interregnum_ended\" FROM \"list_of_imperial_vicars_1437_1792\" WHERE \"duration\"='3 months, 6 days';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size when the home team was Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_5\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" real,\n \"rank_night\" text,\n \"rank_overall\" real\n);\n\nQuestion: What is the total share with Timeslot of 8:30 p.m., anAir Date of march 27, 2008, and a Rank greater than 65?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"share\") FROM \"weekly_ratings\" WHERE \"timeslot\"='8:30 p.m.' AND \"air_date\"='march 27, 2008' AND \"rank_overall\">65;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" real,\n \"rank_night\" text,\n \"rank_overall\" real\n);\n\nQuestion: How many viewers have an Air Date of march 20, 2008, and an 18-49 (Rating/Share) of 2.3/7?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_m\" FROM \"weekly_ratings\" WHERE \"air_date\"='march 20, 2008' AND \"18_49_rating_share\"='2.3/7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" real,\n \"rank_night\" text,\n \"rank_overall\" real\n);\n\nQuestion: What is the total number of Viewers with a Rank (Night) of n/a, and a Timeslot of 8:30 p.m.?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"rank_night\"='n/a' AND \"timeslot\"='8:30 p.m.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people attended the game when Calgary was the home team and the decision was McLean?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"april\" WHERE \"decision\"='mclean' AND \"home\"='calgary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game when Los Angeles was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"april\" WHERE \"home\"='los angeles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game with a score of 1 \u2013 5?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"april\" WHERE \"score\"='1 \u2013 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the least number of people to attend a game when Los Angeles was the home team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"april\" WHERE \"home\"='los angeles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: who is the runner- up when the tournament is santiago?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"2011\" WHERE \"tournament\"='santiago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: what is the score when the runner-up is richard krajicek?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"2011\" WHERE \"runner_up\"='richard krajicek';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: what is the tournament when the score is 7-6(0), 6-3?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"2011\" WHERE \"score\"='7-6(0), 6-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: who is third place when the tournament is delray beach?"
},
{
"role": "assistant",
"content": "SELECT \"third_place\" FROM \"2011\" WHERE \"tournament\"='delray beach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score in the Continental Qualifier on February 23, 2003?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='continental qualifier' AND \"date\"='february 23, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score for the World Cup Qualifier?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='world cup qualifier';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.