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 \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What is the assists for the year 1995?"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"college\" WHERE \"year\"='1995';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What assists has the Team SMU and the total points of 85?"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"college\" WHERE \"team\"='smu' AND \"total_points\"='85';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What year had 48 assists?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"college\" WHERE \"assists\"='48';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What is the total points for GP/GS of 24/23?"
},
{
"role": "assistant",
"content": "SELECT \"total_points\" FROM \"college\" WHERE \"gp_gs\"='24/23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"year\" text,\n \"team\" text,\n \"gp_gs\" text,\n \"goals\" text,\n \"assists\" text,\n \"total_points\" text\n);\n\nQuestion: What is the assists for the Team of Florida and the total points of 75?"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"college\" WHERE \"team\"='florida' AND \"total_points\"='75';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance of the match with F.C. central chugoku as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"first_round\" WHERE \"home_team\"='f.c. central chugoku';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the away team of match 9?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"first_round\" WHERE \"match_no\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score of match 15?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round\" WHERE \"match_no\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance of the match with kochi university as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"first_round\" WHERE \"away_team\"='kochi university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"match_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance of the match with rosso kumamoto as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"first_round\" WHERE \"away_team\"='rosso kumamoto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"financial_results\" (\n \"year\" real,\n \"turnover\" text,\n \"net_income\" text,\n \"balance_sheet_total\" text,\n \"employees\" real\n);\n\nQuestion: What year did the company have a balance sheet total of \u20ac125,359,000?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"financial_results\" WHERE \"balance_sheet_total\"='\u20ac125,359,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music_videos\" (\n \"song\" text,\n \"artist\" text,\n \"album\" text,\n \"director\" text,\n \"year\" real\n);\n\nQuestion: What was the average Year of release for the Album, \"Da Baddest Bitch\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"music_videos\" WHERE \"album\"='da baddest bitch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music_videos\" (\n \"song\" text,\n \"artist\" text,\n \"album\" text,\n \"director\" text,\n \"year\" real\n);\n\nQuestion: After 2009, which Artist published the Song, \"Party Like A DJ\"?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"music_videos\" WHERE \"year\">2009 AND \"song\"='\\\"party like a dj\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the game with a score of 3-2?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_career\" WHERE \"score\"='3-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score of the 2014 World Cup Qualification?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_career\" WHERE \"competition\"='2014 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_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the game with a score of 4-1?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_career\" WHERE \"score\"='4-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What venue held with game with a score of 3-2?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_career\" WHERE \"score\"='3-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Which Cover model has a 20 Questions of christina applegate?"
},
{
"role": "assistant",
"content": "SELECT \"cover_model\" FROM \"2004\" WHERE \"20_questions\"='christina applegate';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: When has a Centerfold model of krista kelly?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2004\" WHERE \"centerfold_model\"='krista kelly';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Which 20 Questions has a Cover model of rena mero , torrie wilson (two alternative covers)?"
},
{
"role": "assistant",
"content": "SELECT \"20_questions\" FROM \"2004\" WHERE \"cover_model\"='rena mero , torrie wilson (two alternative covers)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: When Centerfold model is on 3-04?"
},
{
"role": "assistant",
"content": "SELECT \"centerfold_model\" FROM \"2004\" WHERE \"date\"='3-04';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: Which Cover model has a Centerfold model of scarlett keegan?"
},
{
"role": "assistant",
"content": "SELECT \"cover_model\" FROM \"2004\" WHERE \"centerfold_model\"='scarlett keegan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"cover_model\" text,\n \"centerfold_model\" text,\n \"interview_subject\" text,\n \"20_questions\" text\n);\n\nQuestion: When has a Centerfold model of pilar lastra?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2004\" WHERE \"centerfold_model\"='pilar lastra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_standard_ratings\" (\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" text,\n \"viewers\" real,\n \"weekly_rank\" text\n);\n\nQuestion: What is the average share at 8:00 p.m., and an 18-49 of 1.3/4 with an air date of April 4, 2008?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"share\") FROM \"u_s_standard_ratings\" WHERE \"timeslot\"='8:00 p.m.' AND \"18_49\"='1.3/4' AND \"air_date\"='april 4, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_standard_ratings\" (\n \"air_date\" text,\n \"timeslot\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" text,\n \"viewers\" real,\n \"weekly_rank\" text\n);\n\nQuestion: What is the lowest share with an air date of March 21, 2008 and had viewers larger than 5.15?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"share\") FROM \"u_s_standard_ratings\" WHERE \"air_date\"='march 21, 2008' AND \"viewers\">5.15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_and_top_goalscorers\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_position\" text,\n \"top_goalscorer_s\" text,\n \"team_s\" real\n);\n\nQuestion: What is the lowest team (s) that have tvmk as top scorer (s) and flora as the champion?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"team_s\") FROM \"champions_and_top_goalscorers\" WHERE \"top_goalscorer_s\"='tvmk' AND \"champion\"='flora';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_and_top_goalscorers\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_position\" text,\n \"top_goalscorer_s\" text,\n \"team_s\" real\n);\n\nQuestion: Which runner-up has narva trans as a 3rd position for the 2005 season?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"champions_and_top_goalscorers\" WHERE \"3rd_position\"='narva trans' AND \"season\"='2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_and_top_goalscorers\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_position\" text,\n \"top_goalscorer_s\" text,\n \"team_s\" real\n);\n\nQuestion: Which season has flora as the runner-up, tvmk as the 3rd position, and narva trans as the top goalscorer (s)?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"champions_and_top_goalscorers\" WHERE \"runner_up\"='flora' AND \"3rd_position\"='tvmk' AND \"top_goalscorer_s\"='narva trans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_and_top_goalscorers\" (\n \"season\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"3rd_position\" text,\n \"top_goalscorer_s\" text,\n \"team_s\" real\n);\n\nQuestion: Which runner-up has levadia as the 3rd position for the team (s) 37?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"champions_and_top_goalscorers\" WHERE \"3rd_position\"='levadia' AND \"team_s\"=37;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_brugge\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: What round had the opponent Lyon?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"club_brugge\" WHERE \"opposition\"='lyon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"club_brugge\" (\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate_score\" text\n);\n\nQuestion: Who has the first leg that has a round in the semi-final?"
},
{
"role": "assistant",
"content": "SELECT \"first_leg\" FROM \"club_brugge\" WHERE \"round\"='semi-final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What is Most Laps Led, when Winning Team is Chip Ganassi Racing, and when Fastest Lap is Marco Andretti?"
},
{
"role": "assistant",
"content": "SELECT \"most_laps_led\" FROM \"round_1\" WHERE \"winning_team\"='chip ganassi racing' AND \"fastest_lap\"='marco andretti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: Who is the Winning Driver, when Most Laps Led is Dario Franchitti, and when Pole Position is H\u00e9lio Castroneves?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"round_1\" WHERE \"most_laps_led\"='dario franchitti' AND \"pole_position\"='h\u00e9lio castroneves';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What is Winning Team, when Most Laps Led is Alex Tagliani?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"round_1\" WHERE \"most_laps_led\"='alex tagliani';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What is Winning Driver, when Fastest Lap is Ryan Hunter-Reay, and when Most Laps Led is Ryan Briscoe?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"round_1\" WHERE \"fastest_lap\"='ryan hunter-reay' AND \"most_laps_led\"='ryan briscoe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"race\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"most_laps_led\" text,\n \"winning_driver\" text,\n \"winning_team\" text,\n \"report\" text\n);\n\nQuestion: What is Race, when Winning Team is Chip Ganassi Racing, when Pole Position is Ryan Briscoe, and when Most Laps Led is Scott Dixon?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"round_1\" WHERE \"winning_team\"='chip ganassi racing' AND \"pole_position\"='ryan briscoe' AND \"most_laps_led\"='scott dixon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_champions_league_era\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"losing_semifinalists\" text\n);\n\nQuestion: Who was the Winner when the Runner-up was Real Salt Lake?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"finals_champions_league_era\" WHERE \"runner_up\"='real salt lake';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_champions_league_era\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"losing_semifinalists\" text\n);\n\nQuestion: During which Season was the tournament in progress?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"finals_champions_league_era\" WHERE \"runner_up\"='tournament in progress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_champions_league_era\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"losing_semifinalists\" text\n);\n\nQuestion: What was the Score during the Season in which the Winner was C.F. Atlante?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"finals_champions_league_era\" WHERE \"winner\"='c.f. atlante';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_champions_league_era\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"losing_semifinalists\" text\n);\n\nQuestion: What was the Score when the Losing Semifinalists were Toluca Unam?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"finals_champions_league_era\" WHERE \"losing_semifinalists\"='toluca unam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"homosexuality_laws_in_majority_muslim_co\" (\n \"country\" text,\n \"laws_against_homosexuality\" text,\n \"penalty\" text,\n \"same_sex_unions\" text,\n \"laws_against_discrimination\" text\n);\n\nQuestion: What law has a penalty of \u2014 in Iraq?"
},
{
"role": "assistant",
"content": "SELECT \"laws_against_homosexuality\" FROM \"homosexuality_laws_in_majority_muslim_co\" WHERE \"penalty\"='\u2014' AND \"country\"='iraq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"homosexuality_laws_in_majority_muslim_co\" (\n \"country\" text,\n \"laws_against_homosexuality\" text,\n \"penalty\" text,\n \"same_sex_unions\" text,\n \"laws_against_discrimination\" text\n);\n\nQuestion: What are the laws against homosexuality in Malaysia?"
},
{
"role": "assistant",
"content": "SELECT \"laws_against_homosexuality\" FROM \"homosexuality_laws_in_majority_muslim_co\" WHERE \"country\"='malaysia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average Events when the top-25 is 12 and there are less than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"events\") FROM \"summary\" WHERE \"top_25\"=12 AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the sum of Events when the top-25 is more than 5, and the top-10 is less than 4, and wins is more than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"events\") FROM \"summary\" WHERE \"top_25\">5 AND \"top_10\"<4 AND \"wins\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average Top-10 when there were 17 cuts made with less than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_10\") FROM \"summary\" WHERE \"cuts_made\"=17 AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the sum of Cuts made when there were more than 72 events?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"cuts_made\") FROM \"summary\" WHERE \"events\">72;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the average Top-5 for the open championship, and a Top-10 smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"top_5\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"top_10\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" real,\n \"total_viewers_in_millions\" real,\n \"rank_per_week\" text\n);\n\nQuestion: What was the date of airing for episodes with ratings under 10.1 and production number of 96 5-09?"
},
{
"role": "assistant",
"content": "SELECT \"original_airing\" FROM \"united_states\" WHERE \"rating\"<10.1 AND \"episode_number_production_number\"='96 5-09';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states\" (\n \"episode_number_production_number\" text,\n \"title\" text,\n \"original_airing\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" real,\n \"total_viewers_in_millions\" real,\n \"rank_per_week\" text\n);\n\nQuestion: What was the fewest number of viewers for the episode production number of 109 5-22?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_viewers_in_millions\") FROM \"united_states\" WHERE \"episode_number_production_number\"='109 5-22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leap_year_error\" (\n \"scholar\" text,\n \"date\" text,\n \"triennial_leap_years_bc\" text,\n \"first_julian_day\" text,\n \"first_aligned_day\" text,\n \"quadriennial_leap_year_resumes\" text\n);\n\nQuestion: What is the First Aligned date in 1614?"
},
{
"role": "assistant",
"content": "SELECT \"first_aligned_day\" FROM \"leap_year_error\" WHERE \"date\"='1614';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_aircraft_movements\" (\n \"rank\" text,\n \"route\" text,\n \"avg_daily_flts\" real,\n \"num_of_airlines\" real,\n \"distance_km\" real,\n \"market_share_leader\" text\n);\n\nQuestion: How many Airlines have a total distance of 705 (km)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"num_of_airlines\") FROM \"by_aircraft_movements\" WHERE \"distance_km\"=705;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg result when team 1 is Gambia?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"first_round\" WHERE \"team_1\"='gambia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg result when team 2 is Morocco?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"first_round\" WHERE \"team_2\"='morocco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" real,\n \"source\" text,\n \"year\" text\n);\n\nQuestion: Which Name was in the Year 2001?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rankings\" WHERE \"year\"='2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" real,\n \"source\" text,\n \"year\" text\n);\n\nQuestion: Which Name had a Rank of 18 Out of a number smaller than 149?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rankings\" WHERE \"out_of\"<149 AND \"rank\"=18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" real,\n \"source\" text,\n \"year\" text\n);\n\nQuestion: Which Name had the Rank, 15?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rankings\" WHERE \"rank\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" real,\n \"source\" text,\n \"year\" text\n);\n\nQuestion: What is the lowest Rank for the Name, \"area of permanent crops\", Out of a number smaller than 181?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"rankings\" WHERE \"name\"='area of permanent crops' AND \"out_of\"<181;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rankings\" (\n \"name\" text,\n \"rank\" real,\n \"out_of\" real,\n \"source\" text,\n \"year\" text\n);\n\nQuestion: Which Name had the Source, World Bank, and a Rank smaller than 110, Out of a number smaller than 199?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rankings\" WHERE \"source\"='world bank' AND \"rank\"<110 AND \"out_of\"<199;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"team\" text,\n \"city\" text,\n \"inaugural_season\" text,\n \"final_season\" text,\n \"captain\" text,\n \"coach\" text\n);\n\nQuestion: Which Team has Manzoor Elahi as Coach and Taufeeq Umar as Captain?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"league\" WHERE \"coach\"='manzoor elahi' AND \"captain\"='taufeeq umar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league\" (\n \"team\" text,\n \"city\" text,\n \"inaugural_season\" text,\n \"final_season\" text,\n \"captain\" text,\n \"coach\" text\n);\n\nQuestion: Which City has the Bahawalpur Stags Team?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"league\" WHERE \"team\"='bahawalpur stags';"
}
] |
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Who is the opponent of the December 18, 1994 game?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 18, 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What is the Artist with a Date that is june 1979?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"1970s\" WHERE \"date\"='june 1979';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What is the Writer with an Actual Title that is mork & mindy?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"1970s\" WHERE \"actual_title\"='mork & mindy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"spoofed_title\" text,\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What is the Writer with a Date that is january 1975?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"1970s\" WHERE \"date\"='january 1975';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities_and_towns\" (\n \"city\" text,\n \"2011_estimate\" real,\n \"2010_census\" real,\n \"2000_census\" text,\n \"county\" text\n);\n\nQuestion: What was the 2010 census when the 2011 estimate was 410?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2010_census\") FROM \"cities_and_towns\" WHERE \"2011_estimate\"=410;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the smallest played amount when there are 2 draws and an against of more than 73?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"campeonato_paulista\" WHERE \"drawn\"=2 AND \"against\">73;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"season\" real,\n \"episodes\" real,\n \"premiere\" text,\n \"finale\" text,\n \"dvd_release_date\" text\n);\n\nQuestion: What is the earliest season with a premiere of february5,2007?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"episodes\") FROM \"series_overview\" WHERE \"premiere\"='february5,2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"season\" real,\n \"episodes\" real,\n \"premiere\" text,\n \"finale\" text,\n \"dvd_release_date\" text\n);\n\nQuestion: Which premiere had more than 15 episodes?"
},
{
"role": "assistant",
"content": "SELECT \"premiere\" FROM \"series_overview\" WHERE \"episodes\">15;"
}
] |
[
{
"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 rebounds of the game on April 7?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='april 7';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is Result, when Date is 2003?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"mixed_martial_arts_record\" WHERE \"date\"='2003';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is Record, when Date is 1996?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"date\"='1996';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is Notes, when Date is 2007?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"mixed_martial_arts_record\" WHERE \"date\"='2007';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is the highest Round, when the Opponent is Junior Pitbull?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='junior pitbull';"
}
] |
[
{
"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 \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"date\" text,\n \"round\" real,\n \"location\" text,\n \"notes\" text\n);\n\nQuestion: What is Date, when Result is Loss, and when Method is Submission (Armbar)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"mixed_martial_arts_record\" WHERE \"result\"='loss' AND \"method\"='submission (armbar)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Coombe Road time with a Selsdon evening peak?"
},
{
"role": "assistant",
"content": "SELECT \"coombe_road\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"selsdon\"='evening peak';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Woodside for the 16:19 Coombe Road?"
},
{
"role": "assistant",
"content": "SELECT \"woodside\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"coombe_road\"='16:19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Elmers End with a 09:54 Bingham Road?"
},
{
"role": "assistant",
"content": "SELECT \"elmers_end\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"bingham_road\"='09:54';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Coombe Road with a Woodside time of 07:23?"
},
{
"role": "assistant",
"content": "SELECT \"coombe_road\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"woodside\"='07:23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Elmers End with a 17:57 Selsdon time?"
},
{
"role": "assistant",
"content": "SELECT \"elmers_end\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"selsdon\"='17:57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_timetable_an_illustrative_example\" (\n \"sanderstead\" text,\n \"selsdon\" text,\n \"coombe_road\" text,\n \"bingham_road\" text,\n \"woodside\" text,\n \"elmers_end\" text\n);\n\nQuestion: What is the Selsdon for the 17:19 Coombe Road?"
},
{
"role": "assistant",
"content": "SELECT \"selsdon\" FROM \"1980_timetable_an_illustrative_example\" WHERE \"coombe_road\"='17:19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest win for losses less than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2007_ladder\" WHERE \"losses\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average Byes for the losses of 15, and before 1874?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"byes\") FROM \"2007_ladder\" WHERE \"losses\"=15 AND \"against\"<1874;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_ladder\" (\n \"ballarat_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the sum of against in Ballarat FL of East Point and wins less than 16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2007_ladder\" WHERE \"ballarat_fl\"='east point' AND \"wins\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the School with a Pick that is 24?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"first_round_selections\" WHERE \"pick\"=24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the Team with a Player that is david cooper?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"first_round_selections\" WHERE \"player\"='david cooper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_visited_tourist_attractions\" (\n \"rank\" real,\n \"cultural_attraction\" text,\n \"type\" text,\n \"location\" text,\n \"visitors_2007\" real\n);\n\nQuestion: How many visitors in 2007 were there for ski jumping hill?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"visitors_2007\") FROM \"most_visited_tourist_attractions\" WHERE \"type\"='ski jumping hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the highest Games, when Rebounds is greater than 100, when Name is Nikola Pekovi\u0107, and when Rank is less than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"games\") FROM \"rebounds\" WHERE \"rebounds\">100 AND \"name\"='nikola pekovi\u0107' AND \"rank\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the total number of Games, when Rank is less than 4, and when Rebounds is less than 102?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"rebounds\" WHERE \"rank\"<4 AND \"rebounds\"<102;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the lowest Games, when Name is Travis Watson, and when Rebounds is less than 136?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"games\") FROM \"rebounds\" WHERE \"name\"='travis watson' AND \"rebounds\"<136;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the sum of Rebounds, when Team is Aris Thessaloniki, and when Games is greater than 14?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rebounds\") FROM \"rebounds\" WHERE \"team\"='aris thessaloniki' AND \"games\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What is the highest Rank, when Name is Travis Watson, and when Games is less than 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"rebounds\" WHERE \"name\"='travis watson' AND \"games\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Authors, when Novelty is Gen Nov, when Location is South Africa, and when Name is Criocephalosaurus?"
},
{
"role": "assistant",
"content": "SELECT \"authors\" FROM \"non_mammalian\" WHERE \"novelty\"='gen nov' AND \"location\"='south africa' AND \"name\"='criocephalosaurus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Status, when Location is Russia?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"non_mammalian\" WHERE \"location\"='russia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Authors, when Novelty is Gen Et Sp Nov, and when Name is Lanthanocephalus?"
},
{
"role": "assistant",
"content": "SELECT \"authors\" FROM \"non_mammalian\" WHERE \"novelty\"='gen et sp nov' AND \"name\"='lanthanocephalus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Name, when Authors are Kammerer & Sidor?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"non_mammalian\" WHERE \"authors\"='kammerer & sidor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Name, when Location is Tanzania, and when Novelty is Gen Nov?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"non_mammalian\" WHERE \"location\"='tanzania' AND \"novelty\"='gen nov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_mammalian\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"location\" text\n);\n\nQuestion: What is Name, when Status is Valid, when Authors is Maisch, when Location is Tanzania, and when Novelty is Gen Et Sp Nov?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"non_mammalian\" WHERE \"status\"='valid' AND \"authors\"='maisch' AND \"location\"='tanzania' AND \"novelty\"='gen et sp nov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"category_6a\" (\n \"t568_a_pair\" real,\n \"t568_b_pair\" real,\n \"wire\" text,\n \"t568_a_color\" text,\n \"t568_b_color\" text\n);\n\nQuestion: What is the T568A color for the cable with a white/orange stripe T568B color?"
},
{
"role": "assistant",
"content": "SELECT \"t568_a_color\" FROM \"category_6a\" WHERE \"t568_b_color\"='white/orange stripe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Date with an Opponent that is flavia pennetta?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5_5_runners_up\" WHERE \"opponent\"='flavia pennetta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_5_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Score with an Opponent that is flavia pennetta?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5_5_runners_up\" WHERE \"opponent\"='flavia pennetta';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.