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 \"attendance_at_home_games\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"score_aufc_away\" text,\n \"attendance\" real,\n \"weekday\" text\n);\n\nQuestion: Which Attendance has an Opponent of perth glory, and a Round of 9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"attendance_at_home_games\" WHERE \"opponent\"='perth glory' AND \"round\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_newcomers_race_c\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the lowest rank of rider darren gilpin?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"race_1_newcomers_race_c\" WHERE \"rider\"='darren gilpin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_newcomers_race_c\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the highest rank of rider colin martin?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"race_1_newcomers_race_c\" WHERE \"rider\"='colin martin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_regular_national_weekly_schedule\" (\n \"monday\" text,\n \"tuesday\" text,\n \"wednesday\" text,\n \"thursday\" text,\n \"friday\" text\n);\n\nQuestion: What is shown on Tuesday when Monday is showing Fox Sports Primetime?"
},
{
"role": "assistant",
"content": "SELECT \"tuesday\" FROM \"current_regular_national_weekly_schedule\" WHERE \"monday\"='fox sports primetime';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_regular_national_weekly_schedule\" (\n \"monday\" text,\n \"tuesday\" text,\n \"wednesday\" text,\n \"thursday\" text,\n \"friday\" text\n);\n\nQuestion: What is shown on Friday when Tuesday is Jay Mohr Sports?"
},
{
"role": "assistant",
"content": "SELECT \"friday\" FROM \"current_regular_national_weekly_schedule\" WHERE \"tuesday\"='jay mohr sports';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_regular_national_weekly_schedule\" (\n \"monday\" text,\n \"tuesday\" text,\n \"wednesday\" text,\n \"thursday\" text,\n \"friday\" text\n);\n\nQuestion: What is shown on Friday when Monday is Fox Sports Primetime?"
},
{
"role": "assistant",
"content": "SELECT \"friday\" FROM \"current_regular_national_weekly_schedule\" WHERE \"monday\"='fox sports primetime';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_regular_national_weekly_schedule\" (\n \"monday\" text,\n \"tuesday\" text,\n \"wednesday\" text,\n \"thursday\" text,\n \"friday\" text\n);\n\nQuestion: What is shown on Tuesday when Thursday shows Fox Sports Tonight (ends 1 am next day)?"
},
{
"role": "assistant",
"content": "SELECT \"tuesday\" FROM \"current_regular_national_weekly_schedule\" WHERE \"thursday\"='fox sports tonight (ends 1 am next day)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_regular_national_weekly_schedule\" (\n \"monday\" text,\n \"tuesday\" text,\n \"wednesday\" text,\n \"thursday\" text,\n \"friday\" text\n);\n\nQuestion: What is shown on Tuesday when Wednesday is Fox Sports Tonight (ends 1 am next day)?"
},
{
"role": "assistant",
"content": "SELECT \"tuesday\" FROM \"current_regular_national_weekly_schedule\" WHERE \"wednesday\"='fox sports tonight (ends 1 am next day)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classic_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Which capacity has the class 4c3h?"
},
{
"role": "assistant",
"content": "SELECT \"capacity\" FROM \"classic_competition\" WHERE \"class\"='4c3h';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classic_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: What is the navigator for James?"
},
{
"role": "assistant",
"content": "SELECT \"navigator\" FROM \"classic_competition\" WHERE \"driver\"='james';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classic_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: How much time did Coad make when the margin was 04:02?"
},
{
"role": "assistant",
"content": "SELECT \"total_time\" FROM \"classic_competition\" WHERE \"margin\"='04:02' AND \"driver\"='coad';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classic_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: What class has a capacity smaller than 3384 for Ferguson?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"classic_competition\" WHERE \"capacity\"<3384 AND \"navigator\"='ferguson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"figures_of_the_sports_associations_in_th\" (\n \"1985\" text,\n \"1990\" text,\n \"2004\" real,\n \"2005\" real,\n \"2006\" real,\n \"2007\" real\n);\n\nQuestion: Which 1990 has a 2005 smaller than 5,361, and a 2007 smaller than 4,841, and a 2006 smaller than 618, and a 2004 smaller than 389?"
},
{
"role": "assistant",
"content": "SELECT \"1990\" FROM \"figures_of_the_sports_associations_in_th\" WHERE \"2005\"<'5,361' AND \"2007\"<'4,841' AND \"2006\"<618 AND \"2004\"<389;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the total number of places for a song with a draw of 21 and more than 36 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"place\") FROM \"results\" WHERE \"draw\"=21 AND \"points\">36;"
}
]
|
[
{
"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 \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the lowest numbered game against Phoenix with a record of 29-17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"game_log\" WHERE \"opponent\"='phoenix' AND \"record\"='29-17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: what is the soap opera when the duration is 18 years and the character is miley byrne?"
},
{
"role": "assistant",
"content": "SELECT \"soap_opera\" FROM \"ireland\" WHERE \"duration\"='18 years' AND \"character\"='miley byrne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: what is the years when the duration is 13 years and the character is renee phelan?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"ireland\" WHERE \"duration\"='13 years' AND \"character\"='renee phelan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: what is the years when the soap opera is glenroe and the actor is mick lally?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"ireland\" WHERE \"soap_opera\"='glenroe' AND \"actor\"='mick lally';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: who is the actor when the character is dinny byrne?"
},
{
"role": "assistant",
"content": "SELECT \"actor\" FROM \"ireland\" WHERE \"character\"='dinny byrne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ireland\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: what is the soap opera when the actor is dave duffy?"
},
{
"role": "assistant",
"content": "SELECT \"soap_opera\" FROM \"ireland\" WHERE \"actor\"='dave duffy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score for the game with an 11 tie number?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was Ipswich Town the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='ipswich town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Who is the owner with a Hot Adult Contemporary format?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"radio\" WHERE \"format\"='hot adult contemporary';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What's the call sign of The Q?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"branding\"='the q';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: What's the call sign for Jack FM?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"branding\"='jack fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"main\" text,\n \"hessen\" text,\n \"rhein\" text,\n \"saar\" text\n);\n\nQuestion: What is the average year for a Saar of FK Pirmasens and Hessen of Wormatia Worms?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"1928_to_1933\" WHERE \"saar\"='fk pirmasens' AND \"hessen\"='wormatia worms';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"main\" text,\n \"hessen\" text,\n \"rhein\" text,\n \"saar\" text\n);\n\nQuestion: What is the smallest year for a Main of Eintracht Frankfurt, Rhein of Waldhof Mannheim, Sarr of FK Pirmasens, and Hessen of Wormatia Worms?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"1928_to_1933\" WHERE \"main\"='eintracht frankfurt' AND \"rhein\"='waldhof mannheim' AND \"saar\"='fk pirmasens' AND \"hessen\"='wormatia worms';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"main\" text,\n \"hessen\" text,\n \"rhein\" text,\n \"saar\" text\n);\n\nQuestion: Which year has a Main of Eintracht Frankfurt and Hessen of FSV Mainz 05?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"1928_to_1933\" WHERE \"main\"='eintracht frankfurt' AND \"hessen\"='fsv mainz 05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1928_to_1933\" (\n \"year\" real,\n \"main\" text,\n \"hessen\" text,\n \"rhein\" text,\n \"saar\" text\n);\n\nQuestion: Who was the Hessen the year that Saar was FK Pirmasens?"
},
{
"role": "assistant",
"content": "SELECT \"hessen\" FROM \"1928_to_1933\" WHERE \"saar\"='fk pirmasens';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1934\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: What's the series of Buddy The Woodsman by director Jack King?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"1934\" WHERE \"director\"='jack king' AND \"title\"='buddy the woodsman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1934\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: Who was the director of the movie having a release date of 1934-09-15, an MM Series and a production number less than 6494?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1934\" WHERE \"series\"='mm' AND \"production_num\"<6494 AND \"release_date\"='1934-09-15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1934\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: Who's the director of Buddy of the Apes?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1934\" WHERE \"title\"='buddy of the apes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1934\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" real,\n \"release_date\" text\n);\n\nQuestion: What's the title of the film directed by Friz Freleng with an MM Series, production number greater than 6209 and a release date of 1934-11-03?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1934\" WHERE \"production_num\">6209 AND \"series\"='mm' AND \"director\"='friz freleng' AND \"release_date\"='1934-11-03';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"notes\" text\n);\n\nQuestion: What is the lowest time for Paulo Villar in lane 9?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"time\") FROM \"semifinal_1\" WHERE \"athlete\"='paulo villar' AND \"lane\"<9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"notes\" text\n);\n\nQuestion: What is the nationality of lane 4?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_1\" WHERE \"lane\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"notes\" text\n);\n\nQuestion: What is the nationality with a 13.21 time?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_1\" WHERE \"time\"=13.21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: With an increase in net assets of $211,418, what are the net assets at end of year?"
},
{
"role": "assistant",
"content": "SELECT \"net_assets_at_end_of_year\" FROM \"finances\" WHERE \"increase_in_net_assets\"='$211,418';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: What increase in net assets also has $5,617,236 as the total expenses?"
},
{
"role": "assistant",
"content": "SELECT \"increase_in_net_assets\" FROM \"finances\" WHERE \"total_expenses\"='$5,617,236';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: With the net assets at end of year of $8,231,767, what is the increase in net assets?"
},
{
"role": "assistant",
"content": "SELECT \"increase_in_net_assets\" FROM \"finances\" WHERE \"net_assets_at_end_of_year\"='$8,231,767';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: What net assets at end of year has $6,310,964 as the increase in net assets?"
},
{
"role": "assistant",
"content": "SELECT \"net_assets_at_end_of_year\" FROM \"finances\" WHERE \"increase_in_net_assets\"='$6,310,964';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: When the increase in net assets is $654,066, what is the net assets at end of year?"
},
{
"role": "assistant",
"content": "SELECT \"net_assets_at_end_of_year\" FROM \"finances\" WHERE \"increase_in_net_assets\"='$654,066';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finances\" (\n \"year\" text,\n \"total_support_and_revenue\" text,\n \"total_expenses\" text,\n \"increase_in_net_assets\" text,\n \"net_assets_at_end_of_year\" text\n);\n\nQuestion: What net assets at end of year also has $736,132 as the increase in net assets?"
},
{
"role": "assistant",
"content": "SELECT \"net_assets_at_end_of_year\" FROM \"finances\" WHERE \"increase_in_net_assets\"='$736,132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals did Puerto Rico receive with 1 Silver and a Total of 1 or less?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"silver\"=1 AND \"nation\"='puerto rico' AND \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the Total number of medals for the Nation with 7 or less Bronze medals and 1 Silver medal with a Rank of 9 or larger?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"bronze\"<7 AND \"silver\"=1 AND \"rank\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Silver medals did the Nation with 10 or more Bronze receive?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"bronze\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1937_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: what is the average wins when draws is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"1937_ladder\" WHERE \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1937_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: what is the average losses when the club is warrnambool and wins is less than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"1937_ladder\" WHERE \"club\"='warrnambool' AND \"wins\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1937_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: what is the most losses when the club is terang and draws is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"1937_ladder\" WHERE \"club\"='terang' AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1937_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the sum of losses when wins is more than 6, club is camperdown and against is more than 1238?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"1937_ladder\" WHERE \"wins\">6 AND \"club\"='camperdown' AND \"against\">1238;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text\n);\n\nQuestion: What is the drew for the 1999-2000 season when they were in third place?"
},
{
"role": "assistant",
"content": "SELECT \"drew\" FROM \"year_by_year_performance\" WHERE \"round\"='third place' AND \"season\"='1999-2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text\n);\n\nQuestion: What competition did they have 1 lost, 3 draws, and played 9 games?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"year_by_year_performance\" WHERE \"lost\"='1' AND \"drew\"='3' AND \"played\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_performance\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"played\" text,\n \"drew\" text,\n \"lost\" text\n);\n\nQuestion: What is the number of draws when the played 9 and lost 3?"
},
{
"role": "assistant",
"content": "SELECT \"drew\" FROM \"year_by_year_performance\" WHERE \"played\"='9' AND \"lost\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"call_sign\" text,\n \"broadcast_channel\" real,\n \"digital_psip\" real,\n \"cable_channel\" real,\n \"network\" text\n);\n\nQuestion: How many cable channels have callsign CBFT-DT?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"cable_channel\") FROM \"television_stations\" WHERE \"call_sign\"='cbft-dt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"call_sign\" text,\n \"broadcast_channel\" real,\n \"digital_psip\" real,\n \"cable_channel\" real,\n \"network\" text\n);\n\nQuestion: What is the lowest Digital PSIP for channels over 29 with callsign CFTU-DT?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"digital_psip\") FROM \"television_stations\" WHERE \"call_sign\"='cftu-dt' AND \"broadcast_channel\">29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television_stations\" (\n \"call_sign\" text,\n \"broadcast_channel\" real,\n \"digital_psip\" real,\n \"cable_channel\" real,\n \"network\" text\n);\n\nQuestion: What is the Digital PSIP for channels over 15 with callsign CFTU-DT?"
},
{
"role": "assistant",
"content": "SELECT \"digital_psip\" FROM \"television_stations\" WHERE \"broadcast_channel\">15 AND \"call_sign\"='cftu-dt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: Where was the location of the Mong Kok Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"s\" WHERE \"home_ground\"='mong kok stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: Which club, had a home ground of n/a?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"s\" WHERE \"home_ground\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What is the location for the first division, Sun Pegasus Club?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"s\" WHERE \"league_division\"='first division' AND \"club\"='sun pegasus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What division is Sai Kung in?"
},
{
"role": "assistant",
"content": "SELECT \"league_division\" FROM \"s\" WHERE \"club\"='sai kung';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s\" (\n \"club\" text,\n \"league_division\" text,\n \"home_ground\" text,\n \"location\" text,\n \"position_in_2012_13\" text\n);\n\nQuestion: What league is Sun Source in?"
},
{
"role": "assistant",
"content": "SELECT \"league_division\" FROM \"s\" WHERE \"club\"='sun source';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"type_code\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text\n);\n\nQuestion: What was the model that had years 2004-?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"engines\" WHERE \"years\"='2004-';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"type_code\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text\n);\n\nQuestion: What was the torque@rpm of the sl 65 amg?"
},
{
"role": "assistant",
"content": "SELECT \"torque_rpm\" FROM \"engines\" WHERE \"model\"='sl 65 amg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"type_code\" text,\n \"power_rpm\" text,\n \"torque_rpm\" text\n);\n\nQuestion: What was the model that had years 2004-?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"engines\" WHERE \"years\"='2004-';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"ihsaa_class_football\" text,\n \"county\" text,\n \"year_joined\" real\n);\n\nQuestion: What is the IHSAA Class for football for the team joining in 1968?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class_football\" FROM \"membership\" WHERE \"year_joined\"=1968;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"city\" text,\n \"team_name\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"ihsaa_class_football\" text,\n \"county\" text,\n \"year_joined\" real\n);\n\nQuestion: What is the IHSAA class for Tipton?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"membership\" WHERE \"school\"='tipton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_8\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"time_sec\" real,\n \"notes\" text\n);\n\nQuestion: What is the rank for the person with time 11.14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"heat_8\" WHERE \"time_sec\"=11.14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_8\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"time_sec\" real,\n \"notes\" text\n);\n\nQuestion: What is the rank when time is 11.15 and lane is bigger than 7 with notes Q, PB?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"heat_8\" WHERE \"notes\"='q, pb' AND \"time_sec\"=11.15 AND \"lane\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_8\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"time_sec\" real,\n \"notes\" text\n);\n\nQuestion: What is the lane for notes Q, SB and time less than 11.22?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heat_8\" WHERE \"notes\"='q, sb' AND \"time_sec\"<11.22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_8\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"time_sec\" real,\n \"notes\" text\n);\n\nQuestion: Which athlete is ranked less than 5 with time over 11.22?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"heat_8\" WHERE \"time_sec\">11.22 AND \"rank\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws_p_k_wins_p_k_losses\" text,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest played when draws P.K. Wins / P.K. Losses is 3/0, and points is larger than 18?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"torneo_apertura\" WHERE \"draws_p_k_wins_p_k_losses\"='3/0' AND \"points\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction\" real,\n \"time\" real\n);\n\nQuestion: How many lanes does Australia have with a reaction smaller than 0.138?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lane\") FROM \"final\" WHERE \"nationality\"='australia' AND \"reaction\"<0.138;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction\" real,\n \"time\" real\n);\n\nQuestion: Who had a reaction larger than 0.17400000000000002 and a lane larger than 6?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"final\" WHERE \"reaction\">0.17400000000000002 AND \"lane\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passenger_ships\" (\n \"ship\" text,\n \"built\" real,\n \"in_service_for_nal\" text,\n \"type\" text,\n \"tonnage\" text\n);\n\nQuestion: The ship MS Vistafjord has what in service for NAL?"
},
{
"role": "assistant",
"content": "SELECT \"in_service_for_nal\" FROM \"passenger_ships\" WHERE \"ship\"='ms vistafjord';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passenger_ships\" (\n \"ship\" text,\n \"built\" real,\n \"in_service_for_nal\" text,\n \"type\" text,\n \"tonnage\" text\n);\n\nQuestion: The ship SSBergensfjord built before 1973 has what tonnage?"
},
{
"role": "assistant",
"content": "SELECT \"tonnage\" FROM \"passenger_ships\" WHERE \"built\"<1973 AND \"ship\"='ssbergensfjord';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which nationality has a time of 50.92?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"time\"=50.92;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the time with fewer than 5 lanes for the United States?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"time\") FROM \"semifinal_2\" WHERE \"lane\"<5 AND \"nationality\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp\" text,\n \"td_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Att-Cmp has a GP-GS of 7-1?"
},
{
"role": "assistant",
"content": "SELECT \"att_cmp\" FROM \"passing\" WHERE \"gp_gs\"='7-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp\" text,\n \"td_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which Att-Cmp has a TD-INT of 7-8?"
},
{
"role": "assistant",
"content": "SELECT \"att_cmp\" FROM \"passing\" WHERE \"td_int\"='7-8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passing\" (\n \"name\" text,\n \"gp_gs\" text,\n \"effic\" real,\n \"att_cmp\" text,\n \"td_int\" text,\n \"avg_g\" real\n);\n\nQuestion: Which TD-INT has an Effic larger than 111.4?"
},
{
"role": "assistant",
"content": "SELECT \"td_int\" FROM \"passing\" WHERE \"effic\">111.4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of losses with less than 6 wins and less than 0 draws?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2011_ladder\" WHERE \"wins\"<6 AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the average number of against with less than 10 losses, more than 0 draws, and more than 7 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"2011_ladder\" WHERE \"losses\"<10 AND \"draws\">0 AND \"wins\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of byes with more than 0 losses and 1526 against?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"byes\") FROM \"2011_ladder\" WHERE \"losses\">0 AND \"against\"=1526;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest number of draws with more than 2 byes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"2011_ladder\" WHERE \"byes\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"wimmera_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest against of the wimmera fl warrack eagles, which have less than 16 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2011_ladder\" WHERE \"wins\"<16 AND \"wimmera_fl\"='warrack eagles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_number_of_six_day_victories\" (\n \"name\" text,\n \"nationality\" text,\n \"races_won\" real,\n \"races_ridden\" real,\n \"win_average\" real\n);\n\nQuestion: How many races did the German racer that won less than 10 races ride?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"races_ridden\") FROM \"highest_number_of_six_day_victories\" WHERE \"nationality\"='german' AND \"races_won\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_number_of_six_day_victories\" (\n \"name\" text,\n \"nationality\" text,\n \"races_won\" real,\n \"races_ridden\" real,\n \"win_average\" real\n);\n\nQuestion: What is the average win as a percentage of German racer Rudi Altig, who has ridden in over 79 races?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"win_average\") FROM \"highest_number_of_six_day_victories\" WHERE \"nationality\"='german' AND \"name\"='rudi altig' AND \"races_ridden\">79;"
}
]
|
[
{
"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 highest top-5 when cuts made is more than 39?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"cuts_made\">39;"
}
]
|
[
{
"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 highest events when wins is more than 0 and cuts made is more than 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"events\") FROM \"summary\" WHERE \"wins\">0 AND \"cuts_made\">14;"
}
]
|
[
{
"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 highest top-5 when wins is more than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"wins\">1;"
}
]
|
[
{
"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: How many times is the tournament the masters tournament and the top-10 is less than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"top_5\") FROM \"summary\" WHERE \"tournament\"='masters tournament' 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 \"race_5_senior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What ran has noel patterson as the rider?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"race_5_senior_manx_grand_prix\" WHERE \"rider\"='noel patterson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_5_senior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What time has jules croft as the rider?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"race_5_senior_manx_grand_prix\" WHERE \"rider\"='jules croft';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_5_senior_manx_grand_prix\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What team has adam barclay as the rider?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_5_senior_manx_grand_prix\" WHERE \"rider\"='adam barclay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_senior_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: What Round has h/a hurst"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"manchester_and_district_senior_cup\" WHERE \"h_a\"='hurst';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_senior_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: what game ended f-a with a round of round 1 replay"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"manchester_and_district_senior_cup\" WHERE \"round\"='round 1 replay';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"manchester_and_district_senior_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text\n);\n\nQuestion: what is the h/a round of round 2"
},
{
"role": "assistant",
"content": "SELECT \"h_a\" FROM \"manchester_and_district_senior_cup\" WHERE \"round\"='round 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"miller_grand_am_cup_200_gs_class_only_re\" (\n \"class\" text,\n \"class_pos\" real,\n \"driver\" text,\n \"team_car\" text,\n \"laps\" real,\n \"best_lap\" text,\n \"on_lap\" real\n);\n\nQuestion: What is the lowest laps that has an on lap less than 4, with 35 as a class pos.?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"miller_grand_am_cup_200_gs_class_only_re\" WHERE \"on_lap\"<4 AND \"class_pos\"=35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emmy_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: What was the Role/Episode after 2006 with Ellen Burstyn as a recipient and nominee?"
},
{
"role": "assistant",
"content": "SELECT \"role_episode\" FROM \"emmy_awards\" WHERE \"year\">2006 AND \"recipients_and_nominees\"='ellen burstyn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emmy_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: For which Category was Outstanding Main Title Design a Recipient and nominee?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"emmy_awards\" WHERE \"recipients_and_nominees\"='outstanding main title design';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"emmy_awards\" (\n \"year\" real,\n \"category\" text,\n \"recipients_and_nominees\" text,\n \"role_episode\" text,\n \"result\" text\n);\n\nQuestion: Which Category was from before 2009 with a Role/Episode of Libby Goldstein and Junie Lowry-Johnson?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"emmy_awards\" WHERE \"year\"<2009 AND \"role_episode\"='libby goldstein and junie lowry-johnson';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.