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 \"current\" (\n \"club\" text,\n \"nickname\" text,\n \"location\" text,\n \"home_ground\" text,\n \"gfl_premierships\" text,\n \"years_in_gfl\" text\n);\n\nQuestion: What is the location of the Saints having 1979- as Years in GFL?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"current\" WHERE \"years_in_gfl\"='1979-' AND \"nickname\"='saints';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the type of the player who ended in 2013, had a summer transfer window, and moved from kalmar ff?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"in\" WHERE \"ends\"=2013 AND \"transfer_window\"='summer' AND \"moving_from\"='kalmar ff';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: Where did the player with a transfer type, a summer transfer window, and ended before 2013 move from?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"in\" WHERE \"type\"='transfer' AND \"transfer_window\"='summer' AND \"ends\"<2013;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the transfer window for larsson?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"in\" WHERE \"name\"='larsson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the average end year of the player from swe and a summer transfer window?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ends\") FROM \"in\" WHERE \"nat\"='swe' AND \"transfer_window\"='summer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_singles_finals_6_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the outcome on 2 December 2012?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"itf_singles_finals_6_1\" WHERE \"date\"='2 december 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"itf_singles_finals_6_1\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What is the score of the final in $10,000 \u2013 tarakan , indonesia f2?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"itf_singles_finals_6_1\" WHERE \"tournament\"='$10,000 \u2013 tarakan , indonesia f2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the place for the score 70-72-69=211?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='70-72-69=211';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the player for t9 and a score of 73-69-74=216?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"place\"='t9' AND \"score\"='73-69-74=216';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Stacy Lewis' place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='stacy lewis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the tie no was 13?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"tie_no\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when Burnley was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='burnley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the To par when the finish is 66?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"finish\"='66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: When the year won is 1981, 1987, and the finish is t46, what is the lowest total?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t46' AND \"year_s_won\"='1981, 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which year was won with a finish of 68"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"finish\"='68';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"light_heavyweight_85_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: WHTA IS THE SNATCH WITH A TOTAL OF LARGER THAN 318 KG AND BODY WEIGHT OF 84.15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"snatch\") FROM \"light_heavyweight_85_kg\" WHERE \"total_kg\">318 AND \"bodyweight\"=84.15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"light_heavyweight_85_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: WHAT IS THE SNATCH WITH TOTAL KG SMALLER THAN 318, AND CLEAN JERK LARGER THAN 175?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"snatch\") FROM \"light_heavyweight_85_kg\" WHERE \"total_kg\"<318 AND \"clean_jerk\">175;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religious_political_or_racial_crimes\" (\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What date has 2 for killed, and jaffa as the location?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"religious_political_or_racial_crimes\" WHERE \"killed\"='2' AND \"location\"='jaffa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"religious_political_or_racial_crimes\" (\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What is the injured that has skierlik as the location?"
},
{
"role": "assistant",
"content": "SELECT \"injured\" FROM \"religious_political_or_racial_crimes\" WHERE \"location\"='skierlik';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows at 1:00 pm when 4:00 pm shows local programs, and 8:00 am is The Early Show?"
},
{
"role": "assistant",
"content": "SELECT \"1_00_pm\" FROM \"summer_2001\" WHERE \"4_00_pm\"='local programs' AND \"8_00_am\"='the early show';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows at 7:30 am when 3:30 pm is Big Guy and Rusty the Boy Robot?"
},
{
"role": "assistant",
"content": "SELECT \"7_30_am\" FROM \"summer_2001\" WHERE \"3_30_pm\"='big guy and rusty the boy robot';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows at 9:00 am that has a 3:30 pm of passions?"
},
{
"role": "assistant",
"content": "SELECT \"9_00_am\" FROM \"summer_2001\" WHERE \"3_30_pm\"='passions';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows at 4:30 pm when 4:00 pm is Pok\u00e9mon?"
},
{
"role": "assistant",
"content": "SELECT \"4_30_pm\" FROM \"summer_2001\" WHERE \"4_00_pm\"='pok\u00e9mon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_2001\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What shows at 12:30 pm when 1:30 pm is All My Children?"
},
{
"role": "assistant",
"content": "SELECT \"12_30_pm\" FROM \"summer_2001\" WHERE \"1_30_pm\"='all my children';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_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 that Team 1 is Union Berlin?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"second_round\" WHERE \"team_1\"='union berlin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_30_highest_goalscorers_all_time\" (\n \"name\" text,\n \"years\" text,\n \"goals\" real,\n \"apps\" real,\n \"ratio\" real\n);\n\nQuestion: What is the Apps for the player with 150 Goals and a Ratio of 0.52?"
},
{
"role": "assistant",
"content": "SELECT \"apps\" FROM \"top_30_highest_goalscorers_all_time\" WHERE \"ratio\"=0.52 AND \"goals\"=150;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winter_1999_2000\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 3pm on the channel that shows Local Programs at non?"
},
{
"role": "assistant",
"content": "SELECT \"3_00_pm\" FROM \"winter_1999_2000\" WHERE \"noon\"='local programs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winter_1999_2000\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the noon show on the channel that shows General Hospital at 3pm?"
},
{
"role": "assistant",
"content": "SELECT \"noon\" FROM \"winter_1999_2000\" WHERE \"3_00_pm\"='general hospital';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winter_1999_2000\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is the 5pm show where CBS This Morning is on at 7am?"
},
{
"role": "assistant",
"content": "SELECT \"5_00_pm\" FROM \"winter_1999_2000\" WHERE \"7_00_am\"='cbs this morning';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winter_1999_2000\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 12:30pm where Local Programs are on at 1:30pm and Power Rangers Lost Galaxy is on at 3:30pm?"
},
{
"role": "assistant",
"content": "SELECT \"12_30_pm\" FROM \"winter_1999_2000\" WHERE \"1_30_pm\"='local programs' AND \"3_30_pm\"='power rangers lost galaxy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winter_1999_2000\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"10_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is on at 5pm on the channel where As the World Turns is on at 2pm?"
},
{
"role": "assistant",
"content": "SELECT \"5_00_pm\" FROM \"winter_1999_2000\" WHERE \"2_00_pm\"='as the world turns';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which team won at the symmons plains raceway?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"circuit\"='symmons plains raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which team won at winton motor raceway?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"circuit\"='winton motor raceway';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which circuit was the atcc round 7 at?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"series\"='atcc round 7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which circuit did winfield team nissan win for the tooheys 1000?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"team\"='winfield team nissan' AND \"series\"='tooheys 1000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the date for the tooheys 1000?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"series\"='tooheys 1000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: what series was in sydney, new south wales?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"race_calendar\" WHERE \"city_state\"='sydney, new south wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"club\" text,\n \"years\" real,\n \"games\" real,\n \"pts\" real\n);\n\nQuestion: What was the rank for 1.26 \u00d8-Pts in game 1458?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"references\" WHERE \"pts\">1.26 AND \"games\"=1458;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome of the match with Partner Marcella Mesker and a Score of 6\u20134, 4\u20136, 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_9_3_6\" WHERE \"partner\"='marcella mesker' AND \"score\"='6\u20134, 4\u20136, 4\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Surface of the match with a Score of 2\u20136, 6\u20134, 7\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_9_3_6\" WHERE \"score\"='2\u20136, 6\u20134, 7\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Surface of the match played on October 5, 1987?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_9_3_6\" WHERE \"date\"='october 5, 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Date of the match with a Score of 0\u20136, 2\u20136 with Partner Marcella Mesker?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_9_3_6\" WHERE \"partner\"='marcella mesker' AND \"score\"='0\u20136, 2\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who is the Opponents on May 3, 1982?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_9_3_6\" WHERE \"date\"='may 3, 1982';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_9_3_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Score of the match on May 21, 1984 with Outcome of runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_9_3_6\" WHERE \"outcome\"='runner-up' AND \"date\"='may 21, 1984';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"time\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the date of the 200m individual medley?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"women\" WHERE \"event\"='200m individual medley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: Which team was team 1 in the match where team 2 was olympique lyonnais (d2)?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"team_2\"='olympique lyonnais (d2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What was the score of the match where paris sg (d1) was team 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"round_of_16\" WHERE \"team_1\"='paris sg (d1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Week has a Result of w 23\u201322?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='w 23\u201322';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When was there a bye result?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='bye';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When was the attendance 65,806?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='65,806';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent after week 16?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Commissioned, when Laid Down is \"6 September 2003\"?"
},
{
"role": "assistant",
"content": "SELECT \"commissioned\" FROM \"ships_in_class\" WHERE \"laid_down\"='6 september 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Launched, when Laid Down is \"31 October 1981\"?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"ships_in_class\" WHERE \"laid_down\"='31 october 1981';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Ship, when Commissioned is \"13 March 1982\"?"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"ships_in_class\" WHERE \"commissioned\"='13 march 1982';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Launched, when Commissioned is \"25 July 1998\"?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"ships_in_class\" WHERE \"commissioned\"='25 july 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Laid Down, when Hull Number is \"CVN-69\"?"
},
{
"role": "assistant",
"content": "SELECT \"laid_down\" FROM \"ships_in_class\" WHERE \"hull_number\"='cvn-69';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"ship\" text,\n \"hull_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned\" text\n);\n\nQuestion: What is Laid Down, when Commissioned is \"11 November 1989\"?"
},
{
"role": "assistant",
"content": "SELECT \"laid_down\" FROM \"ships_in_class\" WHERE \"commissioned\"='11 november 1989';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"position\" text,\n \"driver\" text,\n \"entrant\" text,\n \"class\" text,\n \"laps\" real\n);\n\nQuestion: Can you tell me the Position that has the Entrant of j ampt?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"results\" WHERE \"entrant\"='j ampt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"position\" text,\n \"driver\" text,\n \"entrant\" text,\n \"class\" text,\n \"laps\" real\n);\n\nQuestion: Can you tell me the Entrant that has the Laps of 17?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"results\" WHERE \"laps\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"position\" text,\n \"driver\" text,\n \"entrant\" text,\n \"class\" text,\n \"laps\" real\n);\n\nQuestion: Can you tell me the Position that has the Driver of bib stillwell?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"results\" WHERE \"driver\"='bib stillwell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sugar_bowl\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What are the results for a game with an attendance of 41,429?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"sugar_bowl\" WHERE \"attendance\"='41,429';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sugar_bowl\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who were the opponents when there was an attendance of 48,165?"
},
{
"role": "assistant",
"content": "SELECT \"opponentnum\" FROM \"sugar_bowl\" WHERE \"attendance\"='48,165';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sugar_bowl\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What are the results for the game with 82,113 attending?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"sugar_bowl\" WHERE \"attendance\"='82,113';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 4 after week 3's Mikaela James?"
},
{
"role": "assistant",
"content": "SELECT \"week_4\" FROM \"2010\" WHERE \"week_3\"='mikaela james';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 1 that was previous to week 3's Ava Hart?"
},
{
"role": "assistant",
"content": "SELECT \"week_1\" FROM \"2010\" WHERE \"week_3\"='ava hart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 2 that was previous to week 4's Chelsie Loraine?"
},
{
"role": "assistant",
"content": "SELECT \"week_2\" FROM \"2010\" WHERE \"week_4\"='chelsie loraine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 5 that came after week 3's Mikaela James?"
},
{
"role": "assistant",
"content": "SELECT \"week_5\" FROM \"2010\" WHERE \"week_3\"='mikaela james';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 1 that preceded week 2's Kamila Sulewska?"
},
{
"role": "assistant",
"content": "SELECT \"week_1\" FROM \"2010\" WHERE \"week_2\"='kamila sulewska';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who was the girl on week 5 that came after week 3's Shelly Louise?"
},
{
"role": "assistant",
"content": "SELECT \"week_5\" FROM \"2010\" WHERE \"week_3\"='shelly louise';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What is the lowest 1988-89, when Average is greater than 0.965, when 1987-88 is \"40\", when 1986-87 is \"49\", and when Points is greater than 123?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1988_89\") FROM \"relegation\" WHERE \"average\">0.965 AND \"1987_88\"='40' AND \"1986_87\"='49' AND \"points\">123;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What is Played, when Points is less than 107, and when 1987-88 is \"31\"?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"relegation\" WHERE \"points\"<107 AND \"1987_88\"='31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What is the lowest 1988-89, when Points is greater than 130, when 1987-88 is \"37\", and when Played is less than 114?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1988_89\") FROM \"relegation\" WHERE \"points\">130 AND \"1987_88\"='37' AND \"played\"<114;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1986_87\" text,\n \"1987_88\" text,\n \"1988_89\" real\n);\n\nQuestion: What is 1987-88, when Points is \"136\"?"
},
{
"role": "assistant",
"content": "SELECT \"1987_88\" FROM \"relegation\" WHERE \"points\"=136;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: Name the the highest Draw which has Points of 22 and Goals Conceded smaller than 26?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draw\") FROM \"standings\" WHERE \"points\"='22' AND \"goals_conceded\"<26;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: Name the highest Played of Goals Scored smaller than 18 and a Lost larger than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"standings\" WHERE \"goals_scored\"<18 AND \"lost\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: Name the average Played with a Points of 0*?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"standings\" WHERE \"points\"='0*';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: Count the Draw which has Lost of 0, and a Goals Scored larger than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draw\") FROM \"standings\" WHERE \"lost\"=0 AND \"goals_scored\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: Name the Goals Conceded which has a Draw of 0 and a Played larger than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_conceded\") FROM \"standings\" WHERE \"draw\"=0 AND \"played\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the rank for the Mixed Team nation with a total of less than 13?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medal_count\" WHERE \"total\"<13 AND \"nation\"='mixed team';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\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 bronze medals for teams with less than 0 silver?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_count\" WHERE \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of bronze medals when the team's silver are more than 1 but the total medals are less than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_count\" WHERE \"silver\">1 AND \"total\"<9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_conflicts\" (\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths_not_including_foreigners\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many military or civilians were wounded in the conflict that had an unknown number of civilian and total deaths?"
},
{
"role": "assistant",
"content": "SELECT \"military_and_or_civilian_wounded\" FROM \"regular_conflicts\" WHERE \"civilian_deaths\"='unknown' AND \"total_deaths_not_including_foreigners\"='unknown';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_conflicts\" (\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths_not_including_foreigners\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many civilians died in the conflict that left 231 members of the military dead?"
},
{
"role": "assistant",
"content": "SELECT \"civilian_deaths\" FROM \"regular_conflicts\" WHERE \"military_deaths\"='231';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_conflicts\" (\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths_not_including_foreigners\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many civilians died in the conflict that left 178, excluding foreigners, dead?"
},
{
"role": "assistant",
"content": "SELECT \"civilian_deaths\" FROM \"regular_conflicts\" WHERE \"total_deaths_not_including_foreigners\"='178';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_conflicts\" (\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths_not_including_foreigners\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many members of the military died in the conflict that had a total of 531 casualties?"
},
{
"role": "assistant",
"content": "SELECT \"military_deaths\" FROM \"regular_conflicts\" WHERE \"total_casualties\"='531';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_conflicts\" (\n \"military_deaths\" text,\n \"civilian_deaths\" text,\n \"total_deaths_not_including_foreigners\" text,\n \"military_and_or_civilian_wounded\" text,\n \"total_casualties\" text\n);\n\nQuestion: How many civilians died in the conflict that had a total of 1,130 casualties?"
},
{
"role": "assistant",
"content": "SELECT \"civilian_deaths\" FROM \"regular_conflicts\" WHERE \"total_casualties\"='1,130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which team was the opponent on week 15?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"week\"=15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the average Total, when Finish is \"T47\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is To par, when Total is less than 297, and when Finish is \"1\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"<297 AND \"finish\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"official_itv1_rating\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: What is the Official ITV1 rating for auditions 4?"
},
{
"role": "assistant",
"content": "SELECT \"official_itv1_rating\" FROM \"ratings\" WHERE \"episode\"='auditions 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"official_itv1_rating\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: What is the lowest official ITV1 rating with 45.4% share?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"official_itv1_rating\") FROM \"ratings\" WHERE \"share\"='45.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many Goals against have Wins larger than 12, and a Club of ud las palmas, and a Position larger than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_against\") FROM \"group_ii\" WHERE \"wins\">12 AND \"club\"='ud las palmas' AND \"position\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which Goals against has Points smaller than 26, and Goals for smaller than 38, and a Position larger than 14, and a Goal Difference smaller than -32?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_against\") FROM \"group_ii\" WHERE \"points\"<26 AND \"goals_for\"<38 AND \"position\">14 AND \"goal_difference\"<-32;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which Goals against have a Club of cd castell\u00f3n, and Points smaller than 24?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_against\") FROM \"group_ii\" WHERE \"club\"='cd castell\u00f3n' AND \"points\"<24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How much Played has Goals against smaller than 34, and Wins smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"group_ii\" WHERE \"goals_against\"<34 AND \"wins\"<13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which Played has a Position smaller than 4, and Wins larger than 16, and Points of 38, and Goals against larger than 35?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"group_ii\" WHERE \"position\"<4 AND \"wins\">16 AND \"points\"=38 AND \"goals_against\">35;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To Par score for the player from France?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"country\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the name of the player with an overall score of 70-69-69=208?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='70-69-69=208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the To Par score for the player with an overall score of 71-68-69=208?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"score\"='71-68-69=208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What location did Anke Huber win the championship?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"women_s_singles\" WHERE \"champion\"='anke huber';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.