chat_prompt
stringlengths 438
1.53k
|
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which loss has a Date of april 26?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='april 26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which date has an Opponent of angels, and a Loss of sanderson (0\u20131)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='angels' AND \"loss\"='sanderson (0\u20131)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the largest Attendance with a Loss of darling (0\u20131)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"loss\"='darling (0\u20131)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_campus_arenas\" (\n \"arena_venue\" text,\n \"home_campus\" text,\n \"location\" text,\n \"province_region\" text,\n \"maximum_seating_capacity\" text,\n \"year_opened\" text\n);\n\nQuestion: What is the maximum capacity of the San Agustin Gym?"
},
{
"role": "assistant",
"content": "SELECT \"maximum_seating_capacity\" FROM \"on_campus_arenas\" WHERE \"arena_venue\"='san agustin gym';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_campus_arenas\" (\n \"arena_venue\" text,\n \"home_campus\" text,\n \"location\" text,\n \"province_region\" text,\n \"maximum_seating_capacity\" text,\n \"year_opened\" text\n);\n\nQuestion: Where is the Cagayan de Oro city located?"
},
{
"role": "assistant",
"content": "SELECT \"province_region\" FROM \"on_campus_arenas\" WHERE \"location\"='cagayan de oro city';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_campus_arenas\" (\n \"arena_venue\" text,\n \"home_campus\" text,\n \"location\" text,\n \"province_region\" text,\n \"maximum_seating_capacity\" text,\n \"year_opened\" text\n);\n\nQuestion: Where is the Holy Cross of Davao College campus located?"
},
{
"role": "assistant",
"content": "SELECT \"province_region\" FROM \"on_campus_arenas\" WHERE \"home_campus\"='holy cross of davao college';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_campus_arenas\" (\n \"arena_venue\" text,\n \"home_campus\" text,\n \"location\" text,\n \"province_region\" text,\n \"maximum_seating_capacity\" text,\n \"year_opened\" text\n);\n\nQuestion: Which campus has the San Agustin gym?"
},
{
"role": "assistant",
"content": "SELECT \"home_campus\" FROM \"on_campus_arenas\" WHERE \"arena_venue\"='san agustin gym';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"on_campus_arenas\" (\n \"arena_venue\" text,\n \"home_campus\" text,\n \"location\" text,\n \"province_region\" text,\n \"maximum_seating_capacity\" text,\n \"year_opened\" text\n);\n\nQuestion: What year did the San Agustin gym open?"
},
{
"role": "assistant",
"content": "SELECT \"year_opened\" FROM \"on_campus_arenas\" WHERE \"arena_venue\"='san agustin gym';"
}
]
|
[
{
"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 player has a total bigger than 285 and a to par of +14?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\">285 AND \"to_par\"='+14';"
}
]
|
[
{
"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 highest total with a t12 finish?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t12';"
}
]
|
[
{
"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 country has a finish of t4?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"finish\"='t4';"
}
]
|
[
{
"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 year won has a total less than 281?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"total\"<281;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which chassis is ranked 24th?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"cart\" WHERE \"rank\"='24th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which chassis was made in 1993?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"cart\" WHERE \"year\"=1993;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Which team is from earlier than 1994?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"cart\" WHERE \"year\"<1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What rank is later than 1994?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"cart\" WHERE \"year\">1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What year did the King team have fewer than 10 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"cart\" WHERE \"team\"='king' AND \"points\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cart\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: What are the average points for the Project Indy team that has the Ford xb engine?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"cart\" WHERE \"engine\"='ford xb' AND \"team\"='project indy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_oldenburg\" (\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Name the became consort for marriage of 4 april 1721"
},
{
"role": "assistant",
"content": "SELECT \"became_consort\" FROM \"house_of_oldenburg\" WHERE \"marriage\"='4 april 1721';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_oldenburg\" (\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Name the birth of the person that has a spouse of frederick iv and became consort of 4 april 1721"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_oldenburg\" WHERE \"spouse\"='frederick iv' AND \"became_consort\"='4 april 1721';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_oldenburg\" (\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Name the became consort for ceased to be consort of 4 april 1588 husband's death"
},
{
"role": "assistant",
"content": "SELECT \"became_consort\" FROM \"house_of_oldenburg\" WHERE \"ceased_to_be_consort\"='4 april 1588 husband''s death';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_oldenburg\" (\n \"birth\" text,\n \"marriage\" text,\n \"became_consort\" text,\n \"ceased_to_be_consort\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: Name the marriage of the person who is married for christian viii"
},
{
"role": "assistant",
"content": "SELECT \"marriage\" FROM \"house_of_oldenburg\" WHERE \"spouse\"='christian viii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: Who has 48 points in the class of 500 cc?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"motorcycle_grand_prix_results\" WHERE \"points\"=48 AND \"class\"='500 cc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many wins does Benelli have before 1962?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"team\"='benelli' AND \"year\"<1962;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"keyboard_feel_feature_matrix_for_current\" (\n \"model\" text,\n \"graded_hammer_non_gh3\" text,\n \"graded_hammer_three_gh3\" text,\n \"natural_wood_keyboard\" text,\n \"synthetic_ivory_keytops\" text\n);\n\nQuestion: Which is Natural Wood Keyboard with a Model of clps306?"
},
{
"role": "assistant",
"content": "SELECT \"natural_wood_keyboard\" FROM \"keyboard_feel_feature_matrix_for_current\" WHERE \"model\"='clps306';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"keyboard_feel_feature_matrix_for_current\" (\n \"model\" text,\n \"graded_hammer_non_gh3\" text,\n \"graded_hammer_three_gh3\" text,\n \"natural_wood_keyboard\" text,\n \"synthetic_ivory_keytops\" text\n);\n\nQuestion: Which Graded Hammer (Non GH3) has a Model of cvp501?"
},
{
"role": "assistant",
"content": "SELECT \"graded_hammer_non_gh3\" FROM \"keyboard_feel_feature_matrix_for_current\" WHERE \"model\"='cvp501';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"keyboard_feel_feature_matrix_for_current\" (\n \"model\" text,\n \"graded_hammer_non_gh3\" text,\n \"graded_hammer_three_gh3\" text,\n \"natural_wood_keyboard\" text,\n \"synthetic_ivory_keytops\" text\n);\n\nQuestion: Which Natural Wood Keyboard has a CLP380 ?"
},
{
"role": "assistant",
"content": "SELECT \"natural_wood_keyboard\" FROM \"keyboard_feel_feature_matrix_for_current\" WHERE \"model\"='clp380';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"keyboard_feel_feature_matrix_for_current\" (\n \"model\" text,\n \"graded_hammer_non_gh3\" text,\n \"graded_hammer_three_gh3\" text,\n \"natural_wood_keyboard\" text,\n \"synthetic_ivory_keytops\" text\n);\n\nQuestion: Which Graded Hammer Three (GH3) shows Model of clp320?"
},
{
"role": "assistant",
"content": "SELECT \"graded_hammer_three_gh3\" FROM \"keyboard_feel_feature_matrix_for_current\" WHERE \"model\"='clp320';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the date for the French Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"world_championship_grands_prix\" WHERE \"name\"='french grand prix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the name for the race in the Miramas circuit?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"world_championship_grands_prix\" WHERE \"circuit\"='miramas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which circuit was Delage the winning constructor for?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"world_championship_grands_prix\" WHERE \"winning_constructor\"='delage';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the name for the Monza circuit race were Bugatti was the winning constructor?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"world_championship_grands_prix\" WHERE \"winning_constructor\"='bugatti' AND \"circuit\"='monza';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_drivers\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which report shows that Frank Lockhart was a winning driver?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"world_championship_grands_prix\" WHERE \"winning_drivers\"='frank lockhart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"ranking\" text\n);\n\nQuestion: What Ranking has Gold less than 20 and the Event 1976 Toronto?"
},
{
"role": "assistant",
"content": "SELECT \"ranking\" FROM \"summer_paralympics\" WHERE \"gold\"<20 AND \"event\"='1976 toronto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"ranking\" text\n);\n\nQuestion: What Gold has a Silver greater than 30 and a Total less than 107?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"summer_paralympics\" WHERE \"silver\">30 AND \"total\"<107;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"ranking\" text\n);\n\nQuestion: What is the highest Bronze with the Event 1972 Heidelberg and Total less than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"summer_paralympics\" WHERE \"event\"='1972 heidelberg' AND \"total\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"ranking\" text\n);\n\nQuestion: What is the Total with the Event 2004 Athens and Gold less than 20?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"summer_paralympics\" WHERE \"event\"='2004 athens' AND \"gold\"<20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real,\n \"ranking\" text\n);\n\nQuestion: What is the lowest Bronze with a Ranking of 22nd of 32 and Gold larger than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"summer_paralympics\" WHERE \"ranking\"='22nd of 32' AND \"gold\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_published\" text,\n \"t_papadopoulos\" text,\n \"d_christofias\" text,\n \"i_kasoulidis\" text,\n \"k_themistokleous\" text\n);\n\nQuestion: Which polling firm put T. Papadopoulos at 31%?"
},
{
"role": "assistant",
"content": "SELECT \"polling_firm\" FROM \"opinion_polls\" WHERE \"t_papadopoulos\"='31%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_published\" text,\n \"t_papadopoulos\" text,\n \"d_christofias\" text,\n \"i_kasoulidis\" text,\n \"k_themistokleous\" text\n);\n\nQuestion: What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%?"
},
{
"role": "assistant",
"content": "SELECT \"t_papadopoulos\" FROM \"opinion_polls\" WHERE \"i_kasoulidis\"='27.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_published\" text,\n \"t_papadopoulos\" text,\n \"d_christofias\" text,\n \"i_kasoulidis\" text,\n \"k_themistokleous\" text\n);\n\nQuestion: What was the percentage for K. Themistokleous when I. Kasoulidis was 30.1%?"
},
{
"role": "assistant",
"content": "SELECT \"k_themistokleous\" FROM \"opinion_polls\" WHERE \"i_kasoulidis\"='30.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"polling_firm\" text,\n \"date_published\" text,\n \"t_papadopoulos\" text,\n \"d_christofias\" text,\n \"i_kasoulidis\" text,\n \"k_themistokleous\" text\n);\n\nQuestion: What was the percentage for T. Papadopoulos when D. Christofias was 28.4%?"
},
{
"role": "assistant",
"content": "SELECT \"t_papadopoulos\" FROM \"opinion_polls\" WHERE \"d_christofias\"='28.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament has a 2007 of 2r, and a 2011 of 2r?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2007\"='2r' AND \"2011\"='2r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities\" (\n \"rank\" real,\n \"city\" text,\n \"titles\" real,\n \"winning_clubs\" text,\n \"last_victory\" real\n);\n\nQuestion: What is the number of titles for the city of gy\u0151r with a rank larger than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"titles\") FROM \"cities\" WHERE \"city\"='gy\u0151r' AND \"rank\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of the Toronto Maple Leafs home game on February 1?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"home\"='toronto maple leafs' AND \"date\"='february 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the Boston Bruins away game on March 13?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"visitor\"='boston bruins' AND \"date\"='march 13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visiting team has a record of 9\u20135\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"record\"='9\u20135\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game with a record of 12\u20138\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='12\u20138\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the date that the Montreal Canadiens hosted a game with a record of 14\u201311\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='montreal canadiens' AND \"record\"='14\u201311\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the country of Craig Stadler?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"player\"='craig stadler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the average total of Gay Brewer from the United States with a to par of 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"to_par\"=9 AND \"player\"='gay brewer';"
}
]
|
[
{
"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 was the finish by the player from West Germany?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='west germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"budi_sudarsono_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the smallest goal during the 2006 fifa world cup qualification competition?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goal\") FROM \"budi_sudarsono_international_goals\" WHERE \"competition\"='2006 fifa world cup qualification';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: Name the representative for party of whig"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"external_links\" WHERE \"party\"='whig';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the total number of years for chassis of maserati 250f and points less than 0"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='maserati 250f' AND \"points\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the engine with chassis of maserati 250f and entrant of luigi piotti with year less than 1957"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='maserati 250f' AND \"entrant\"='luigi piotti' AND \"year\"<1957;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of points for chassis of maserati 250f and entrant of officine alfieri maserati"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='maserati 250f' AND \"entrant\"='officine alfieri maserati';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the lowest points for officine alfieri maserati"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='officine alfieri maserati';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"players\" text,\n \"sh_c\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: How tall is Ye Fei?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"current_roster\" WHERE \"players\"='ye fei';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance of the game on July 26?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"date\"='july 26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: How many years did the team place 2nd in Antwerp, Belgium?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"venue\"='antwerp, belgium' AND \"result\"='2nd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the name of the venue that was used before 1991?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<1991;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: How many years did the team place 2nd in Auckland, New Zealand?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"result\"='2nd' AND \"venue\"='auckland, new zealand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: What was the started round for the competition that had the last match on January 16, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"started_round\" FROM \"overall\" WHERE \"last_match\"='january 16, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: On what date was the first match for the competition that ended its last match on December 16, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"first_match\" FROM \"overall\" WHERE \"last_match\"='december 16, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: What competition had a final round in the finals and the final position winners?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"overall\" WHERE \"final_position\"='winners' AND \"final_round\"='finals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: On what date did the first match occur for the competition that ended with a final position of winners and the final round in the finals?"
},
{
"role": "assistant",
"content": "SELECT \"first_match\" FROM \"overall\" WHERE \"final_position\"='winners' AND \"final_round\"='finals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: What competition had its first match on December 20, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"overall\" WHERE \"first_match\"='december 20, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"competition\" text,\n \"started_round\" text,\n \"final_position\" text,\n \"final_round\" text,\n \"first_match\" text,\n \"last_match\" text\n);\n\nQuestion: What was the date of the first match of the Fifa Club World Cup that ended with the final position as winners?"
},
{
"role": "assistant",
"content": "SELECT \"first_match\" FROM \"overall\" WHERE \"final_position\"='winners' AND \"competition\"='fifa club world cup';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was Len Sutton's total number of completed laps when his qualifying time was 142.653?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='142.653';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What call sign has a frequency of 91.3 MHz?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"frequency_m_hz\"=91.3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What city of license has a value of k293bg for its call sign?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"call_sign\"='k293bg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: When the frequency is 103.7 MHz and the ERP W is more than 10, what is the call sign?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"erp_w\">10 AND \"frequency_m_hz\"=103.7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: In Los Banos, California, when the ERP W is than 10, what is the average Frequency MHz?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"frequency_m_hz\") FROM \"translators\" WHERE \"city_of_license\"='los banos, california' AND \"erp_w\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the call sign when the frequency is less than 95.5 MHz, and a ERP W is higher than 10?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"frequency_m_hz\"<95.5 AND \"erp_w\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Name the player with score of 73-69-74-71=287"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"score\"='73-69-74-71=287';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: Name the sum To par for score of 71-74-71-72=288"
},
{
"role": "assistant",
"content": "SELECT SUM(\"to_par\") FROM \"final_round\" WHERE \"score\"='71-74-71-72=288';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Tell me the tournament for kathy horvath opponent"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"references\" WHERE \"opponent\"='kathy horvath';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Name the date for hard surface at maybelline classic with opponent of wendy turnbull"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"references\" WHERE \"surface\"='hard' AND \"tournament\"='maybelline classic' AND \"opponent\"='wendy turnbull';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Name the tournament for semifinal hard surface for opponent of pam casale"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"references\" WHERE \"round\"='semifinal' AND \"surface\"='hard' AND \"opponent\"='pam casale';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Name the date for grass surface for quarterfinal at the nsw building society open tournament"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"references\" WHERE \"surface\"='grass' AND \"round\"='quarterfinal' AND \"tournament\"='nsw building society open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Name the surface for united airlines tournament of champions final round"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"references\" WHERE \"tournament\"='united airlines tournament of champions' AND \"round\"='final';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"tournament\" text,\n \"date\" text,\n \"surface\" text,\n \"round\" text,\n \"opponent\" text\n);\n\nQuestion: Name the date for chris evert opponent and carpet surface"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"references\" WHERE \"opponent\"='chris evert' AND \"surface\"='carpet';"
}
]
|
[
{
"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: Name the venue for 25 may 2008"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='25 may 2008';"
}
]
|
[
{
"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: Name the score for 2015 afc asian cup qualification"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2015 afc asian cup qualification';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Name the competition for 13 december 2012"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='13 december 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was arrows racing team's highest points after 1982?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='arrows racing team' AND \"year\">1982;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many years has 2 points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"complete_formula_one_results\" WHERE \"points\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: Name the catalogue with song title of love me tonight"
},
{
"role": "assistant",
"content": "SELECT \"catalogue\" FROM \"disc_two\" WHERE \"song_title\"='love me tonight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: Name the song title with time of 1:51"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"disc_two\" WHERE \"time\"='1:51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_two\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: Name the least track with song of little sister"
},
{
"role": "assistant",
"content": "SELECT MIN(\"track\") FROM \"disc_two\" WHERE \"song_title\"='little sister';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_scores\" (\n \"player\" text,\n \"score\" text,\n \"balls\" real,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: What player has a score of 79?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"highest_scores\" WHERE \"score\"='79';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_scores\" (\n \"player\" text,\n \"score\" text,\n \"balls\" real,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: Who played on waca ground and scored 79 points?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"highest_scores\" WHERE \"ground\"='waca ground' AND \"score\"='79';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_scores\" (\n \"player\" text,\n \"score\" text,\n \"balls\" real,\n \"opponent\" text,\n \"ground\" text\n);\n\nQuestion: What player had 49 balls?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"highest_scores\" WHERE \"balls\"=49;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the highest attendance of a game that had a score of 3-5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"score\"='3-5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who took the loss in the game that ended with a 54-61 record?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='54-61';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the report with 125cc winner of simone corsi and circuit of valencia"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"grands_prix\" WHERE \"125cc_winner\"='simone corsi' AND \"circuit\"='valencia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the motogp winner with 125cc winner of g\u00e1bor talm\u00e1csi and round of 13"
},
{
"role": "assistant",
"content": "SELECT \"moto_gp_winner\" FROM \"grands_prix\" WHERE \"125cc_winner\"='g\u00e1bor talm\u00e1csi' AND \"round\"=13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the 125cc winner with circuit of estoril"
},
{
"role": "assistant",
"content": "SELECT \"125cc_winner\" FROM \"grands_prix\" WHERE \"circuit\"='estoril';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"date\" text,\n \"grand_prix\" text,\n \"circuit\" text,\n \"125cc_winner\" text,\n \"250cc_winner\" text,\n \"moto_gp_winner\" text,\n \"report\" text\n);\n\nQuestion: Name the date for motogp winner of casey stoner and grand prix of valencian grand prix"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"grands_prix\" WHERE \"moto_gp_winner\"='casey stoner' AND \"grand_prix\"='valencian grand prix';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.