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 \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1996\" text\n);\n\nQuestion: What team plays at Spartak, Mogilev?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams_and_venues\" WHERE \"venue\"='spartak, mogilev';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"role\" text,\n \"producer_director\" text,\n \"notes\" text\n);\n\nQuestion: Who was the Producer/Director of Fear Beneath?"
},
{
"role": "assistant",
"content": "SELECT \"producer_director\" FROM \"filmography\" WHERE \"film\"='fear beneath';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"role\" text,\n \"producer_director\" text,\n \"notes\" text\n);\n\nQuestion: What film was released in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"film\" FROM \"filmography\" WHERE \"year\"=1996;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"role\" text,\n \"producer_director\" text,\n \"notes\" text\n);\n\nQuestion: Who is the Producer/Director of Political Engagement?"
},
{
"role": "assistant",
"content": "SELECT \"producer_director\" FROM \"filmography\" WHERE \"film\"='political engagement';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_7_1943_1944\" (\n \"episode\" text,\n \"title\" text,\n \"writer_s\" text,\n \"preservation\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the original airdate for episode 7-17 (195) from writer Sidney Slon?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"season_7_1943_1944\" WHERE \"writer_s\"='sidney slon' AND \"episode\"='7-17 (195)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank of Greg Norman who earned more than $12,507,322?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"leaders\" WHERE \"player\"='greg norman' AND \"earnings\">'12,507,322';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank of the United States player Davis Love III with earnings under $12,487,463?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"country\"='united states' AND \"player\"='davis love iii' AND \"earnings\"<'12,487,463';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wta_tour_singles_finals_19_7_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the date of the tournament played in Madrid, Spain?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"wta_tour_singles_finals_19_7_12\" WHERE \"tournament\"='madrid, spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_cardiff_city_f_c_season\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What opponent has final as the round?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"2007_08_cardiff_city_f_c_season\" WHERE \"round\"='final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_cardiff_city_f_c_season\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What round has hereford united as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"2007_08_cardiff_city_f_c_season\" WHERE \"opponent\"='hereford united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which Location /State has a Winner of craig lowndes, and a Date of 29\u201331 may?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"winner\"='craig lowndes' AND \"date\"='29\u201331 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which Team has a Winner of craig lowndes, and a Circuit of phillip island grand prix circuit?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"winner\"='craig lowndes' AND \"circuit\"='phillip island grand prix circuit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Which Location/ State has a Date of 29\u201331 may?"
},
{
"role": "assistant",
"content": "SELECT \"location_state\" FROM \"race_calendar\" WHERE \"date\"='29\u201331 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"location_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Who won at the Circuit of lakeside international raceway?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"circuit\"='lakeside international raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_dahlgren_boat_howitzers\" (\n \"designation\" text,\n \"bore\" text,\n \"weight\" text,\n \"service_charge\" text,\n \"range_yards\" text,\n \"number_made\" real\n);\n\nQuestion: What is the service charge of the boat howitzers with 456 made?"
},
{
"role": "assistant",
"content": "SELECT \"service_charge\" FROM \"table_of_dahlgren_boat_howitzers\" WHERE \"number_made\"=456;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_dahlgren_boat_howitzers\" (\n \"designation\" text,\n \"bore\" text,\n \"weight\" text,\n \"service_charge\" text,\n \"range_yards\" text,\n \"number_made\" real\n);\n\nQuestion: What is the service chage of the boat howitzers with a 12-pdr light destination?"
},
{
"role": "assistant",
"content": "SELECT \"service_charge\" FROM \"table_of_dahlgren_boat_howitzers\" WHERE \"designation\"='12-pdr light';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_dahlgren_boat_howitzers\" (\n \"designation\" text,\n \"bore\" text,\n \"weight\" text,\n \"service_charge\" text,\n \"range_yards\" text,\n \"number_made\" real\n);\n\nQuestion: What is the service charge of the boat howitzers with 1009 made?"
},
{
"role": "assistant",
"content": "SELECT \"service_charge\" FROM \"table_of_dahlgren_boat_howitzers\" WHERE \"number_made\"=1009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_dahlgren_boat_howitzers\" (\n \"designation\" text,\n \"bore\" text,\n \"weight\" text,\n \"service_charge\" text,\n \"range_yards\" text,\n \"number_made\" real\n);\n\nQuestion: What is the bore of the boat howitzers with a 12-pdr heavy designation?"
},
{
"role": "assistant",
"content": "SELECT \"bore\" FROM \"table_of_dahlgren_boat_howitzers\" WHERE \"designation\"='12-pdr heavy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"report\" text,\n \"attendance\" real\n);\n\nQuestion: Which attendance has 9 as the tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"second_round\" WHERE \"tie_no\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Picks have a Position of defensive end, and an Overall smaller than 33?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='defensive end' AND \"overall\"<33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall is the highest one that has a Name of gregory spann, and a Pick # larger than 19?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"name\"='gregory spann' AND \"pick_num\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregory spann, and an Overall larger than 228?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"round\">5 AND \"position\"='wide receiver' AND \"name\"='gregory spann' AND \"overall\">228;"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What is the score from the 21-27 Record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='21-27';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: How many people attended the May 28 game?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='may 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average drawn number of the team with less than 70 points and less than 46 played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"drawn\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"points\"<70 AND \"played\"<46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the highest position of the team with 24 lost and a drawn greater than 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"lost\"=24 AND \"drawn\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many Points has a Game of 82 and a April larger than 10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"game\"=82 AND \"april\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many Games have a Score of 3\u20133 ot?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"score\"='3\u20133 ot';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"april\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which April has a Game of 84"
},
{
"role": "assistant",
"content": "SELECT MAX(\"april\") FROM \"regular_season\" WHERE \"game\"=84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_2007_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points\" text\n);\n\nQuestion: what's the played status when the club was banwen rfc?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2006_2007_table\" WHERE \"club\"='banwen rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_2007_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points\" text\n);\n\nQuestion: what's the points total when points against was points against?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2006_2007_table\" WHERE \"points_against\"='points against';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_2007_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points\" text\n);\n\nQuestion: when points were 36 and points against 489 what is the lost?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"2006_2007_table\" WHERE \"points\"='36' AND \"points_against\"='489';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_2007_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points\" text\n);\n\nQuestion: when points against was 387 what was the lost?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"2006_2007_table\" WHERE \"points_against\"='387';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_2007_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points\" text\n);\n\nQuestion: when points for was points for what was the points?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"2006_2007_table\" WHERE \"points_for\"='points for';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selection\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was 1948's pick?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"player_selection\" WHERE \"year\"=1948;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selection\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the pick in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"player_selection\" WHERE \"year\"=2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selection\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many years have a Pick of 12, and a Position of dt, and a College of penn state?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"player_selection\" WHERE \"pick\"='12' AND \"position\"='dt' AND \"college\"='penn state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_record\" (\n \"year\" real,\n \"wins\" real,\n \"earnings\" text,\n \"rank\" real,\n \"scoring_average\" real\n);\n\nQuestion: What is the scoring average where the wins are 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scoring_average\") FROM \"lpga_tour_record\" WHERE \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_record\" (\n \"year\" real,\n \"wins\" real,\n \"earnings\" text,\n \"rank\" real,\n \"scoring_average\" real\n);\n\nQuestion: What year has earnings of $557,158?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"lpga_tour_record\" WHERE \"earnings\"='557,158';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have an Opponent of @ florida panthers, and a Game larger than 58?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"opponent\"='@ florida panthers' AND \"game\">58;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roman_catholicism_in_asia\" (\n \"region\" text,\n \"total_population\" real,\n \"catholic\" real,\n \"pct_catholic\" text,\n \"pct_of_global_catholic_pop\" text\n);\n\nQuestion: what is the catholic when the % catholic is 1.39%?"
},
{
"role": "assistant",
"content": "SELECT \"catholic\" FROM \"roman_catholicism_in_asia\" WHERE \"pct_catholic\"='1.39%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roman_catholicism_in_asia\" (\n \"region\" text,\n \"total_population\" real,\n \"catholic\" real,\n \"pct_catholic\" text,\n \"pct_of_global_catholic_pop\" text\n);\n\nQuestion: with catholic of 3.33% and total population more than 1,528,384,440, what is the % global catholic pop.?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_global_catholic_pop\" FROM \"roman_catholicism_in_asia\" WHERE \"total_population\">'1,528,384,440' AND \"pct_catholic\"='3.33%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which February has a Game of 64?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"february\") FROM \"regular_season\" WHERE \"game\"=64;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Game smaller than 60, and a Score of 2\u20130, and a February larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"regular_season\" WHERE \"game\"<60 AND \"score\"='2\u20130' AND \"february\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game is the highest one that has a February of 25?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"february\"=25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game is the highest one that has a Score of 3\u20134 ot, and Points larger than 75?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"score\"='3\u20134 ot' AND \"points\">75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How much February has a Score of 5\u20132, and Points of 70?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"february\") FROM \"regular_season\" WHERE \"score\"='5\u20132' AND \"points\"=70;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: Which result happened more recently than week 2, and had a date of November 30, 1958?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">2 AND \"date\"='november 30, 1958';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: what album is 4:30 long"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"official_versions\" WHERE \"length\"='4:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"previous_season\" text,\n \"team\" text,\n \"town\" text,\n \"arena_capacity\" text,\n \"website\" text,\n \"head_coach\" text,\n \"foreign_players_max_2\" text\n);\n\nQuestion: What is the Head Coach of Novy Urengoy?"
},
{
"role": "assistant",
"content": "SELECT \"head_coach\" FROM \"teams\" WHERE \"town\"='novy urengoy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"previous_season\" text,\n \"team\" text,\n \"town\" text,\n \"arena_capacity\" text,\n \"website\" text,\n \"head_coach\" text,\n \"foreign_players_max_2\" text\n);\n\nQuestion: What is the Arena o Kazan?"
},
{
"role": "assistant",
"content": "SELECT \"arena_capacity\" FROM \"teams\" WHERE \"town\"='kazan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"previous_season\" text,\n \"team\" text,\n \"town\" text,\n \"arena_capacity\" text,\n \"website\" text,\n \"head_coach\" text,\n \"foreign_players_max_2\" text\n);\n\nQuestion: What is the Website of Head Coach Yuriy Korotkevich?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"teams\" WHERE \"head_coach\"='yuriy korotkevich';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Opponents of sebasti\u00e1n decoud santiago giraldo had what surface?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_5\" WHERE \"opponents\"='sebasti\u00e1n decoud santiago giraldo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Partnering of franco ferreiro had what tournament?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_5\" WHERE \"partnering\"='franco ferreiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Date of april 10, 2006 had what surface?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_5\" WHERE \"date\"='april 10, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Surface of clay, and a Partnering of j\u00falio silva had what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_5\" WHERE \"surface\"='clay' AND \"partnering\"='j\u00falio silva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Date of november 3, 2008 had what score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_5\" WHERE \"date\"='november 3, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Points have a Name of denis kornilov?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"sapporo\" WHERE \"name\"='denis kornilov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Rank is the highest one that has a 1st (m) larger than 130, and a Name of thomas morgenstern, and a 2nd (m) larger than 139?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"sapporo\" WHERE \"1st_m\">130 AND \"name\"='thomas morgenstern' AND \"2nd_m\">139;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Rank that a Name of thomas morgenstern, and Points larger than 288.7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"sapporo\" WHERE \"name\"='thomas morgenstern' AND \"points\">288.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sapporo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: How many Points have a Nationality of nor, and an Overall WC points (Rank) of 374 (13), and a Rank smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"sapporo\" WHERE \"nationality\"='nor' AND \"overall_wc_points_rank\"='374 (13)' AND \"rank\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall number for Louisiana Tech college, and a pick more than 10?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"college\"='louisiana tech' AND \"pick_num\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the pick number for Deji Karim, in a round lower than 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"name\"='deji karim' AND \"round\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college had an overall number more than 180?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\">180;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the overall number for a pick of #10, from Louisiana Tech, and a round bigger than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"pick_num\"=10 AND \"college\"='louisiana tech' AND \"round\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"nfl_draft\" WHERE \"school_club_team\"='alabama' AND \"round\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What's the sum of the Pick that has the Player of Robert Ingalls?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='robert ingalls';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What's the sum of the Pick that has the Position of Tackle, the Player Woody Adams, and a Round that's larger than 22?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='tackle' AND \"player\"='woody adams' AND \"round\">22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What Position has a Round that's larger than 21?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_official_appearances\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"position\" text,\n \"years\" text,\n \"league\" real,\n \"europe\" real,\n \"others\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the Europe totals for players with other appearances of 0, league appearances under 328, and a position of MF?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"europe\") FROM \"most_official_appearances\" WHERE \"others\"=0 AND \"league\"<328 AND \"position\"='mf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: Occupational pensions of 7%, and a Working tax credit of 2%, and a Other social security benefits of 6% has what investment income?"
},
{
"role": "assistant",
"content": "SELECT \"investment_income\" FROM \"sources_of_income\" WHERE \"occupational_pensions\"='7%' AND \"working_tax_credit\"='2%' AND \"other_social_security_benefits\"='6%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: Region of eastern england has what investment income?"
},
{
"role": "assistant",
"content": "SELECT \"investment_income\" FROM \"sources_of_income\" WHERE \"region\"='eastern england';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income?"
},
{
"role": "assistant",
"content": "SELECT \"investment_income\" FROM \"sources_of_income\" WHERE \"state_pensions\"='7%' AND \"self_employed\"='7%' AND \"other_income_sources\"='2%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: Other income sources of 2%, and a State pensions of 7%, and a Working tax credit of 2%, and a Employment ( salaries & wages) of 66% has what occupational pensions?"
},
{
"role": "assistant",
"content": "SELECT \"occupational_pensions\" FROM \"sources_of_income\" WHERE \"other_income_sources\"='2%' AND \"state_pensions\"='7%' AND \"working_tax_credit\"='2%' AND \"employment_salaries_wages\"='66%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: Investment income of 2%, and an other income sources of 3%, and an employment (salaries & wages) of 71% involves which self employed?"
},
{
"role": "assistant",
"content": "SELECT \"self_employed\" FROM \"sources_of_income\" WHERE \"investment_income\"='2%' AND \"other_income_sources\"='3%' AND \"employment_salaries_wages\"='71%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources_of_income\" (\n \"region\" text,\n \"employment_salaries_wages\" text,\n \"self_employed\" text,\n \"investment_income\" text,\n \"working_tax_credit\" text,\n \"state_pensions\" text,\n \"occupational_pensions\" text,\n \"disability_benefits\" text,\n \"other_social_security_benefits\" text,\n \"other_income_sources\" text\n);\n\nQuestion: Employment ( salaries & wages) of 64%, and a Occupational pensions of 6% has what working tax credit?"
},
{
"role": "assistant",
"content": "SELECT \"working_tax_credit\" FROM \"sources_of_income\" WHERE \"employment_salaries_wages\"='64%' AND \"occupational_pensions\"='6%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many Drawn is which has a Games smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"world_championship_group_c_denmark\" WHERE \"games\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the Points that has 61 - 15 Point difference and a Drawn larger than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"world_championship_group_c_denmark\" WHERE \"points_difference\"='61 - 15' AND \"drawn\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many Drawn has a Games larger than 6?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"world_championship_group_c_denmark\" WHERE \"games\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"births_by_mother\" (\n \"year\" real,\n \"jewish\" real,\n \"muslim\" real,\n \"christian\" real,\n \"druze\" real,\n \"total\" real\n);\n\nQuestion: How many jewish have a muslim less than 36,041, a total less than 161,042, a year after 2006, with a druze greater than 2,534?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"jewish\") FROM \"births_by_mother\" WHERE \"muslim\"<'36,041' AND \"total\"<'161,042' AND \"year\">2006 AND \"druze\">'2,534';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"births_by_mother\" (\n \"year\" real,\n \"jewish\" real,\n \"muslim\" real,\n \"christian\" real,\n \"druze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest year that has a druze greater than 2,534, with a total less than 121,333?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"births_by_mother\" WHERE \"druze\">'2,534' AND \"total\"<'121,333';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"births_by_mother\" (\n \"year\" real,\n \"jewish\" real,\n \"muslim\" real,\n \"christian\" real,\n \"druze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest jewish that has a druze less than 2,517, and a year prior to 2007?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"jewish\") FROM \"births_by_mother\" WHERE \"druze\"<'2,517' AND \"year\"<2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"births_by_mother\" (\n \"year\" real,\n \"jewish\" real,\n \"muslim\" real,\n \"christian\" real,\n \"druze\" real,\n \"total\" real\n);\n\nQuestion: What is the average muslim that has a druze less than 2,534, a year prior to 2005, and a jewish greater than 100,657?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"muslim\") FROM \"births_by_mother\" WHERE \"druze\"<'2,534' AND \"year\"=2005 AND \"jewish\">'100,657';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"births_by_mother\" (\n \"year\" real,\n \"jewish\" real,\n \"muslim\" real,\n \"christian\" real,\n \"druze\" real,\n \"total\" real\n);\n\nQuestion: How many muslims have a jewish of 112,803, and a year after 2008?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"muslim\") FROM \"births_by_mother\" WHERE \"jewish\"='112,803' AND \"year\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting_details\" (\n \"constituency\" text,\n \"electorate\" real,\n \"turnout\" text,\n \"spoilt\" text,\n \"valid_poll\" real,\n \"quota\" text,\n \"seats\" real,\n \"candidates\" real\n);\n\nQuestion: What is the smallest electorate with 78,076 quota and less than 13 candidates?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"electorate\") FROM \"voting_details\" WHERE \"quota\"='78,076' AND \"candidates\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"voting_details\" (\n \"constituency\" text,\n \"electorate\" real,\n \"turnout\" text,\n \"spoilt\" text,\n \"valid_poll\" real,\n \"quota\" text,\n \"seats\" real,\n \"candidates\" real\n);\n\nQuestion: What is the turnout with 15 candidates and more than 377,591 valid poll?"
},
{
"role": "assistant",
"content": "SELECT \"turnout\" FROM \"voting_details\" WHERE \"candidates\"=15 AND \"valid_poll\">'377,591';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What country is ranked 79?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"accolades\" WHERE \"rank\"=79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"publication\" text,\n \"country\" text,\n \"accolade\" text,\n \"year\" real,\n \"rank\" real\n);\n\nQuestion: What is the lowest rank for an album after 1999 and an Accolade of the 100 greatest indie rock albums of all time?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"accolades\" WHERE \"year\">1999 AND \"accolade\"='the 100 greatest indie rock albums of all time';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"result\" text\n);\n\nQuestion: Which Week is on sunday november 28?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='sunday november 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"result\" text\n);\n\nQuestion: How many weeks have an Opponent of at new york giants?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='at new york giants';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"result\" text\n);\n\nQuestion: When is the Opponent of new england patriots?"
},
{
"role": "assistant",
"content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"opponent\"='new england patriots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"result\" text\n);\n\nQuestion: Which week has a Result of w 23\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='w 23\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities_of_midhordland\" (\n \"name\" text,\n \"innhabitants\" real,\n \"area\" real,\n \"mayor\" text,\n \"party\" text,\n \"municipal_code\" real,\n \"language_form\" text\n);\n\nQuestion: How many people did Mayor Olav Martin Vik preside over?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"innhabitants\") FROM \"municipalities_of_midhordland\" WHERE \"mayor\"='olav martin vik';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities_of_midhordland\" (\n \"name\" text,\n \"innhabitants\" real,\n \"area\" real,\n \"mayor\" text,\n \"party\" text,\n \"municipal_code\" real,\n \"language_form\" text\n);\n\nQuestion: What's the area of ask\u00f8y, with a Municipal code less than 1247?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"area\") FROM \"municipalities_of_midhordland\" WHERE \"name\"='ask\u00f8y' AND \"municipal_code\"<1247;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities_of_midhordland\" (\n \"name\" text,\n \"innhabitants\" real,\n \"area\" real,\n \"mayor\" text,\n \"party\" text,\n \"municipal_code\" real,\n \"language_form\" text\n);\n\nQuestion: What Mayor is from the KRF Party?"
},
{
"role": "assistant",
"content": "SELECT \"mayor\" FROM \"municipalities_of_midhordland\" WHERE \"party\"='krf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities_of_midhordland\" (\n \"name\" text,\n \"innhabitants\" real,\n \"area\" real,\n \"mayor\" text,\n \"party\" text,\n \"municipal_code\" real,\n \"language_form\" text\n);\n\nQuestion: What's the Municipal code of the FRP Party with an area of 100?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"municipal_code\") FROM \"municipalities_of_midhordland\" WHERE \"party\"='frp' AND \"area\"=100;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities_of_midhordland\" (\n \"name\" text,\n \"innhabitants\" real,\n \"area\" real,\n \"mayor\" text,\n \"party\" text,\n \"municipal_code\" real,\n \"language_form\" text\n);\n\nQuestion: How many people does the KRF Party preside over?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"innhabitants\") FROM \"municipalities_of_midhordland\" WHERE \"party\"='krf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_packers_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of overall draft picks for player whose position is C and was picked after round 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"1980_packers_draft_selections\" WHERE \"position\"='c' AND \"round\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_packers_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position was Jafus White who was picked after round 1?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"1980_packers_draft_selections\" WHERE \"round\">1 AND \"player\"='jafus white';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1980_packers_draft_selections\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of overall draft picks for Fred Nixon?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"1980_packers_draft_selections\" WHERE \"player\"='fred nixon';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.