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 \"women_s_singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Who won the runner-up in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"women_s_singles\" WHERE \"year\"=1999;"
}
]
|
[
{
"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 was the score when Flavia Pennetta won the championship?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"women_s_singles\" WHERE \"champion\"='flavia pennetta';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runs\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"balls\" real,\n \"s_rate\" real,\n \"100s\" real,\n \"average\" real\n);\n\nQuestion: How many Matches have an S/Rate smaller than 133.72, and a Team of yorkshire carnegie?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"matches\") FROM \"runs\" WHERE \"s_rate\"<133.72 AND \"team\"='yorkshire carnegie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runs\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"balls\" real,\n \"s_rate\" real,\n \"100s\" real,\n \"average\" real\n);\n\nQuestion: Which Team has Balls smaller than 258, and Inns of 10, and Matches smaller than 12?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"runs\" WHERE \"balls\"<258 AND \"inns\"=10 AND \"matches\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runs\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"balls\" real,\n \"s_rate\" real,\n \"100s\" real,\n \"average\" real\n);\n\nQuestion: How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"matches\") FROM \"runs\" WHERE \"balls\"<224 AND \"average\">38.25 AND \"s_rate\">139.09;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runs\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real,\n \"balls\" real,\n \"s_rate\" real,\n \"100s\" real,\n \"average\" real\n);\n\nQuestion: How many Matches have an Average larger than 26.53, and an S/Rate of 165.4, and a 100s smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"matches\") FROM \"runs\" WHERE \"average\">26.53 AND \"s_rate\"=165.4 AND \"100s\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text\n);\n\nQuestion: What was the fastest lap for Grand Prix dutch tt?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"calendar\" WHERE \"grand_prix\"='dutch tt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text\n);\n\nQuestion: Who won the race circuit of sachsenring?"
},
{
"role": "assistant",
"content": "SELECT \"race_winner\" FROM \"calendar\" WHERE \"circuit\"='sachsenring';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text\n);\n\nQuestion: Who won with the fastest lap of daijiro hiura on March 29?"
},
{
"role": "assistant",
"content": "SELECT \"race_winner\" FROM \"calendar\" WHERE \"fastest_lap\"='daijiro hiura' AND \"date\"='march 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ground_history\" (\n \"name_of_ground\" text,\n \"location\" text,\n \"year\" text,\n \"fc_matches\" text,\n \"la_matches\" text,\n \"t20_matches\" text,\n \"total\" text\n);\n\nQuestion: What year had a total of 2 and LA matches of 0?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"ground_history\" WHERE \"total\"='2' AND \"la_matches\"='0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ground_history\" (\n \"name_of_ground\" text,\n \"location\" text,\n \"year\" text,\n \"fc_matches\" text,\n \"la_matches\" text,\n \"t20_matches\" text,\n \"total\" text\n);\n\nQuestion: What year was the total 9?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"ground_history\" WHERE \"total\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is in week 4 if week 5 is [month ended] and week 2 is April Ireland?"
},
{
"role": "assistant",
"content": "SELECT \"week_4\" FROM \"2007\" WHERE \"week_5\"='[month ended]' AND \"week_2\"='april ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is week 3 if week 2 is Nikki Fiction?"
},
{
"role": "assistant",
"content": "SELECT \"week_3\" FROM \"2007\" WHERE \"week_2\"='nikki fiction';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is week 1 if week 3 is Natasha Budhi?"
},
{
"role": "assistant",
"content": "SELECT \"week_1\" FROM \"2007\" WHERE \"week_3\"='natasha budhi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is week 5 if week 2 is Jenna Jordan?"
},
{
"role": "assistant",
"content": "SELECT \"week_5\" FROM \"2007\" WHERE \"week_2\"='jenna jordan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is week 2 if week 3 is Sara Stokes?"
},
{
"role": "assistant",
"content": "SELECT \"week_2\" FROM \"2007\" WHERE \"week_3\"='sara stokes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is week 3 if week 1 is Amanda Batt?"
},
{
"role": "assistant",
"content": "SELECT \"week_3\" FROM \"2007\" WHERE \"week_1\"='amanda batt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ugdsb_secondary_schools\" (\n \"name\" text,\n \"location\" text,\n \"enrollment\" real,\n \"1_year_ranking_of_727\" real,\n \"5_year_ranking_of_693\" real\n);\n\nQuestion: How many enrollments have a location of Guelph and a 1-year ranking of 727 larger than 717?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"ugdsb_secondary_schools\" WHERE \"location\"='guelph' AND \"1_year_ranking_of_727\">717;"
}
]
|
[
{
"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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What average bronze has a total less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What average gold has China (chn) as the nation with a bronze greater than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"nation\"='china (chn)' AND \"bronze\">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\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which is the highest gold that has a bronze greater than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"bronze\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1984\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What date has fewer than 32 against and the opposing team of Australia?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1984\" WHERE \"against\"<32 AND \"opposing_teams\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1984\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the average against for a test match?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"1984\" WHERE \"status\"='test match';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1984\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which venue has more than 9 against and a status of second test?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1984\" WHERE \"against\">9 AND \"status\"='second test';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1984\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which status has an against of 35?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1984\" WHERE \"against\"=35;"
}
]
|
[
{
"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 \"2003_04_pts\" text,\n \"2004_05_pts\" text,\n \"2005_06_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real\n);\n\nQuestion: Which Total Pld has a Total Pts smaller than 153, and a 2004\u201305 Pts of 43, and a 2005\u201306 Pts smaller than 49?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_pld\") FROM \"relegation\" WHERE \"total_pts\"<153 AND \"2004_05_pts\"='43' AND \"2005_06_pts\"<49;"
}
]
|
[
{
"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 \"2003_04_pts\" text,\n \"2004_05_pts\" text,\n \"2005_06_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real\n);\n\nQuestion: Which Total Pld has a 2004\u201305 Pts of 43, and a Team of olimpo, and a 2005\u201306 Pts larger than 49?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_pld\") FROM \"relegation\" WHERE \"2004_05_pts\"='43' AND \"team\"='olimpo' AND \"2005_06_pts\">49;"
}
]
|
[
{
"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 \"2003_04_pts\" text,\n \"2004_05_pts\" text,\n \"2005_06_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real\n);\n\nQuestion: Which Total Pld has a 2005\u201306 Pts of 27?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_pld\") FROM \"relegation\" WHERE \"2005_06_pts\"=27;"
}
]
|
[
{
"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 \"2003_04_pts\" text,\n \"2004_05_pts\" text,\n \"2005_06_pts\" real,\n \"total_pts\" real,\n \"total_pld\" real\n);\n\nQuestion: Which 2005\u201306 Pts has a 2004\u201305 Pts of 48?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"2005_06_pts\") FROM \"relegation\" WHERE \"2004_05_pts\"='48';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"po_prostu_taniec_just_dance\" (\n \"team\" text,\n \"dance\" text,\n \"music\" text,\n \"points_jury\" text,\n \"place\" text\n);\n\nQuestion: What was the music for the modern dance?"
},
{
"role": "assistant",
"content": "SELECT \"music\" FROM \"po_prostu_taniec_just_dance\" WHERE \"dance\"='modern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"po_prostu_taniec_just_dance\" (\n \"team\" text,\n \"dance\" text,\n \"music\" text,\n \"points_jury\" text,\n \"place\" text\n);\n\nQuestion: What was the place for the tango dance when the points was jury of 24 (7,5,6,6)?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"po_prostu_taniec_just_dance\" WHERE \"dance\"='tango' AND \"points_jury\"='24 (7,5,6,6)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_1950\" (\n \"player\" text,\n \"club\" text,\n \"qualifying_goals\" real,\n \"finals_goals\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the Average Qualifying Goals for Jack Froggatt where the Final Goals is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"qualifying_goals\") FROM \"brazil_1950\" WHERE \"player\"='jack froggatt' AND \"finals_goals\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_1950\" (\n \"player\" text,\n \"club\" text,\n \"qualifying_goals\" real,\n \"finals_goals\" real,\n \"total_goals\" real\n);\n\nQuestion: Which Player has a Total Goals greater than 1 and Qualifying Goals smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"brazil_1950\" WHERE \"total_goals\">1 AND \"qualifying_goals\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_1950\" (\n \"player\" text,\n \"club\" text,\n \"qualifying_goals\" real,\n \"finals_goals\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the total number of Total Goals scored by Stan Mortensen where the Qualifying Goals is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_goals\") FROM \"brazil_1950\" WHERE \"player\"='stan mortensen' AND \"qualifying_goals\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_1950\" (\n \"player\" text,\n \"club\" text,\n \"qualifying_goals\" real,\n \"finals_goals\" real,\n \"total_goals\" real\n);\n\nQuestion: What is the Average Finals Goals if the Total Goals is less than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"finals_goals\") FROM \"brazil_1950\" WHERE \"total_goals\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was Adam Scott's total score when playing in Australia with a to par of e?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"score\") FROM \"first_round\" WHERE \"country\"='australia' AND \"to_par\"='e' AND \"player\"='adam scott';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was Fredrik Jacobson's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round\" WHERE \"player\"='fredrik jacobson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_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 HOME TEAM WITH AN AWAY OF LEYTON ORIENT?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='leyton orient';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_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 NO TIE FROM brighton & hove albion?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"home_team\"='brighton & hove albion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result for the game on October 5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the FA Cup Apps when total goals is smaller than 4, League Cup Goals is 0, and League Apps is 8 (10)?"
},
{
"role": "assistant",
"content": "SELECT \"fa_cup_apps\" FROM \"appearances_and_goals\" WHERE \"total_goals\"<4 AND \"league_cup_goals\"=0 AND \"league_apps\"='8 (10)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the lowest total goals when position is df, and FA Cup Goals is smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"position\"='df' AND \"fa_cup_goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Viewers (m) has an Episode of school council?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"episode\"='school council';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Viewers (m) has a Rating of 1.7, and an Episode of the game of life?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"rating\"='1.7' AND \"episode\"='the game of life';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Viewers (m) has an Episode of 40 days?"
},
{
"role": "assistant",
"content": "SELECT \"viewers_m\" FROM \"weekly_ratings\" WHERE \"episode\"='40 days';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Episode has a Rating of 1.8, and Viewers (m) smaller than 2.73?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"weekly_ratings\" WHERE \"rating\"='1.8' AND \"viewers_m\"<2.73;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Rating has Viewers (m) of 2.73?"
},
{
"role": "assistant",
"content": "SELECT \"rating\" FROM \"weekly_ratings\" WHERE \"viewers_m\"=2.73;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"18_49\" text,\n \"viewers_m\" real,\n \"rating\" text,\n \"share\" text\n);\n\nQuestion: What Episode has a Share of tba?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"weekly_ratings\" WHERE \"share\"='tba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_60\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Partner which is in 1979, and Opponents in the final of heinz g\u00fcnthardt bob hewitt?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"wins_60\" WHERE \"date\"=1979 AND \"opponents_in_the_final\"='heinz g\u00fcnthardt bob hewitt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_60\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: which Surface has Opponents in the final of mark edmondson sherwood stewart, and a Tournament of dallas , u.s.?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_60\" WHERE \"opponents_in_the_final\"='mark edmondson sherwood stewart' AND \"tournament\"='dallas , u.s.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_60\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the date of Tournament of paris indoor , france?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"date\") FROM \"wins_60\" WHERE \"tournament\"='paris indoor , france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_60\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Outcome has a Surface of hard, and a Score in the final of 6\u20132, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"wins_60\" WHERE \"surface\"='hard' AND \"score_in_the_final\"='6\u20132, 6\u20134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_60\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the Surface which has a Score in the final of 6\u20133, 6\u20132 and Opponents in the final of mansour bahrami diego p\u00e9rez?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"wins_60\" WHERE \"score_in_the_final\"='6\u20133, 6\u20132' AND \"opponents_in_the_final\"='mansour bahrami diego p\u00e9rez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Res has a Time of 11:58?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='11:58';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was jerry bohlander's time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jerry bohlander';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"serie_a\" real,\n \"champions_league\" real,\n \"coppa_italia\" real,\n \"total\" real\n);\n\nQuestion: What was the total of Mauro Camoranesi when coppa italia was 0, champions league was 1 and less than 2 serie A?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"goal_scorers\" WHERE \"coppa_italia\"=0 AND \"champions_league\"=1 AND \"serie_a\"<2 AND \"name\"='mauro camoranesi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"serie_a\" real,\n \"champions_league\" real,\n \"coppa_italia\" real,\n \"total\" real\n);\n\nQuestion: What's the Serie A when the coppa italia was 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"serie_a\") FROM \"goal_scorers\" WHERE \"coppa_italia\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"serie_a\" real,\n \"champions_league\" real,\n \"coppa_italia\" real,\n \"total\" real\n);\n\nQuestion: What's the total when the champions league was 0, the coppa italia was less than 0, and the Serie A was more than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"goal_scorers\" WHERE \"champions_league\"=0 AND \"serie_a\">1 AND \"coppa_italia\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_scorers\" (\n \"name\" text,\n \"serie_a\" real,\n \"champions_league\" real,\n \"coppa_italia\" real,\n \"total\" real\n);\n\nQuestion: What is the championsleague when the total was greater than 1, the coppa italia was more than 2, and the Serie A was 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"champions_league\") FROM \"goal_scorers\" WHERE \"serie_a\"=1 AND \"total\">1 AND \"coppa_italia\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_race_wins_in_a_single_season\" (\n \"women\" text,\n \"country\" text,\n \"season\" text,\n \"victories\" real,\n \"downhill\" text,\n \"super_g\" text,\n \"giant_slalom\" text,\n \"slalom\" text,\n \"combined\" text\n);\n\nQuestion: Can you tell me the Combined that has the Victories of 14?"
},
{
"role": "assistant",
"content": "SELECT \"combined\" FROM \"most_race_wins_in_a_single_season\" WHERE \"victories\"=14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_race_wins_in_a_single_season\" (\n \"women\" text,\n \"country\" text,\n \"season\" text,\n \"victories\" real,\n \"downhill\" text,\n \"super_g\" text,\n \"giant_slalom\" text,\n \"slalom\" text,\n \"combined\" text\n);\n\nQuestion: Can you tell me the Giant Slalom that has the Combined of 1, and the Country of united states, and the Victories larger than 11?"
},
{
"role": "assistant",
"content": "SELECT \"giant_slalom\" FROM \"most_race_wins_in_a_single_season\" WHERE \"combined\"='1' AND \"country\"='united states' AND \"victories\">11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\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 Bob Charles' To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_both_cuts\" WHERE \"player\"='bob charles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\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 Total for the Player with a To par of +11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"made_both_cuts\" WHERE \"to_par\"='+11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_both_cuts\" (\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 Total of the Player with a To par of \u201313?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"made_both_cuts\" WHERE \"to_par\"='\u201313';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"year\" text,\n \"hometown\" text\n);\n\nQuestion: What is Guard Kerri Shields Hometown?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"current_roster\" WHERE \"position\"='guard' AND \"name\"='kerri shields';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"number\" real,\n \"position\" text,\n \"height\" text,\n \"year\" text,\n \"hometown\" text\n);\n\nQuestion: What is the Name of the Player from Albuquerque, New Mexico?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"current_roster\" WHERE \"hometown\"='albuquerque, new mexico';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What was the score of the 2nd leg when Newell's Old Boys played at home?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"knockout_stages\" WHERE \"home_2nd_leg\"='newell''s old boys';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Who played at home for the second leg, with a score of 1-1 on the first leg and an aggregate score of 2-4?"
},
{
"role": "assistant",
"content": "SELECT \"home_2nd_leg\" FROM \"knockout_stages\" WHERE \"1st_leg\"='1-1' AND \"aggregate\"='2-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Which team played at home for the second leg and has aggregate score of 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"home_2nd_leg\" FROM \"knockout_stages\" WHERE \"aggregate\"='2-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What was the score on the first leg when gimnasia de mendoza played at home for the second leg?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"knockout_stages\" WHERE \"home_2nd_leg\"='gimnasia de mendoza';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Which team played at home for the second leg and has an aggregate score of 2-4?"
},
{
"role": "assistant",
"content": "SELECT \"home_2nd_leg\" FROM \"knockout_stages\" WHERE \"aggregate\"='2-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"knockout_stages\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What was the 2nd leg score when atl\u00e9tico tucum\u00e1n played at home?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"knockout_stages\" WHERE \"home_2nd_leg\"='atl\u00e9tico tucum\u00e1n';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the record of the match with a win res., a 5:00 time, and more than 3 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"time\"='5:00' AND \"round\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the method of opponent georges st-pierre?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='georges st-pierre';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the location of fightfest 2, which has 3 rounds?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=3 AND \"event\"='fightfest 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who is the opponent with a time of 1:19?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who is the opponent with a 0-1 record?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='0-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the total rank with more than 392 total points and an 24.8 average?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank_by_average\") FROM \"average_score_chart\" WHERE \"total_points\">392 AND \"average\"=24.8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the highest average with less than 3 places, less than 433 total points, and a rank less than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"average\") FROM \"average_score_chart\" WHERE \"place\"<3 AND \"total_points\"<433 AND \"rank_by_average\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the total average with 54 total points and a rank less than 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average\") FROM \"average_score_chart\" WHERE \"total_points\"=54 AND \"rank_by_average\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"average_score_chart\" (\n \"rank_by_average\" real,\n \"place\" real,\n \"couple\" text,\n \"total_points\" real,\n \"number_of_dances\" real,\n \"average\" real\n);\n\nQuestion: What is the total rank by average for 2 dances, which have more than 37 total points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank_by_average\") FROM \"average_score_chart\" WHERE \"number_of_dances\"=2 AND \"total_points\">37;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_40_20_20\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What Championship has an Opponent in the final of aaron krickstein, and a Score in the final of 7\u20135, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"singles_40_20_20\" WHERE \"opponent_in_the_final\"='aaron krickstein' AND \"score_in_the_final\"='7\u20135, 6\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_40_20_20\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What Score in the final has a Surface of hard, a Championship of washington, d.c. , u.s., and an Opponent in the final of ivan lendl?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"singles_40_20_20\" WHERE \"surface\"='hard' AND \"championship\"='washington, d.c. , u.s.' AND \"opponent_in_the_final\"='ivan lendl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"number_of_seasons_in_liga_mx\" real,\n \"top_division_titles\" real\n);\n\nQuestion: What is the highest Number of seasons in Liga MX for Club cruz azul?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_seasons_in_liga_mx\") FROM \"clubs\" WHERE \"club\"='cruz azul';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"number_of_seasons_in_liga_mx\" real,\n \"top_division_titles\" real\n);\n\nQuestion: What is the highest Number of seasons in Liga MX for Club cruz azul, when their season in the top division is higher than 68?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_seasons_in_liga_mx\") FROM \"clubs\" WHERE \"club\"='cruz azul' AND \"number_of_seasons_in_top_division\">68;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"number_of_seasons_in_liga_mx\" real,\n \"top_division_titles\" real\n);\n\nQuestion: What is the total number of Top division titles for the club that has more than 40 seasons in top division, a First season of current spell in top division of 1943-44, and more than 89 seasons in Liga MX?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"top_division_titles\") FROM \"clubs\" WHERE \"number_of_seasons_in_top_division\">40 AND \"first_season_of_current_spell_in_top_division\"='1943-44' AND \"number_of_seasons_in_liga_mx\">89;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"number_of_seasons_in_liga_mx\" real,\n \"top_division_titles\" real\n);\n\nQuestion: How many top division titles does Club Guadalajara have, with more than 42 seasons in Liga MX?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"top_division_titles\") FROM \"clubs\" WHERE \"number_of_seasons_in_liga_mx\">42 AND \"club\"='guadalajara';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"number_of_seasons_in_liga_mx\" real,\n \"top_division_titles\" real\n);\n\nQuestion: Which club has fewer than 40 seasons in Liga MX and 65 seasons in the top division?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"clubs\" WHERE \"number_of_seasons_in_liga_mx\"<40 AND \"number_of_seasons_in_top_division\"=65;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"verified_aerial_victories\" (\n \"number\" real,\n \"time\" real,\n \"aircraft\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What number is in Bois de Warville with a time less than 810?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number\") FROM \"verified_aerial_victories\" WHERE \"location\"='bois de warville' AND \"time\"<810;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"verified_aerial_victories\" (\n \"number\" real,\n \"time\" real,\n \"aircraft\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What is number 21's highest time?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"time\") FROM \"verified_aerial_victories\" WHERE \"number\"=21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"verified_aerial_victories\" (\n \"number\" real,\n \"time\" real,\n \"aircraft\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What number with the opponent Fokker D.vii have with a time of 1655?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number\") FROM \"verified_aerial_victories\" WHERE \"opponent\"='fokker d.vii' AND \"time\"=1655;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"verified_aerial_victories\" (\n \"number\" real,\n \"time\" real,\n \"aircraft\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: Who is the opponent with a time higher than 1040, a Spad xiii aircraft in Dun-Sur-Meuse with a lower number than 22?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"verified_aerial_victories\" WHERE \"time\">1040 AND \"aircraft\"='spad xiii' AND \"number\"<22 AND \"location\"='dun-sur-meuse';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"verified_aerial_victories\" (\n \"number\" real,\n \"time\" real,\n \"aircraft\" text,\n \"opponent\" text,\n \"location\" text\n);\n\nQuestion: What number has the opponent Fokker d.vii with a time of 600?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number\") FROM \"verified_aerial_victories\" WHERE \"opponent\"='fokker d.vii' AND \"time\"=600;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the Name of the Building with 36 or more Floors with Years as tallest of 1986\u20131992?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\">36 AND \"years_as_tallest\"='1986\u20131992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the Years as tallest of the Building with a Height ft (m) of 145 (44)?"
},
{
"role": "assistant",
"content": "SELECT \"years_as_tallest\" FROM \"timeline_of_tallest_buildings\" WHERE \"height_ft_m\"='145 (44)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the Street Address of the Building with 17 Floors?"
},
{
"role": "assistant",
"content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: What is the Name of the Building at 100 North Tampa Street?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='100 north tampa street';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"round\" text,\n \"opponents\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What away is there for the q3 round?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"european_record\" WHERE \"round\"='q3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"round\" text,\n \"opponents\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the Aggregate of Bayer Leverkusen opponents?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"european_record\" WHERE \"opponents\"='bayer leverkusen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the competition that was at serravalle, san marino?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='serravalle, san marino';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.