output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT MIN("opponents") FROM "schedule" WHERE "opponent"='Arizona State';
## Task Generate a SQL query to answer the following question: `How many opponents were there when the opponent was Arizona State?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `How many opponents were there when the opponent was Arizona State?`: ```sql
SELECT COUNT("record") FROM "schedule" WHERE "opponent"='Utah';
## Task Generate a SQL query to answer the following question: `How many records show Utah as the opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `How many records show Utah as the opponent?`: ```sql
SELECT "opponents" FROM "schedule" WHERE "cowboys_points"=10;
## Task Generate a SQL query to answer the following question: `How many opponents are there when cowboy points were 10?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `How many opponents are there when cowboy points were 10?`: ```sql
SELECT COUNT("record") FROM "schedule" WHERE "opponents"=9;
## Task Generate a SQL query to answer the following question: `How many records were there when opponents were 9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `How many records were there when opponents were 9?`: ```sql
SELECT COUNT("record") FROM "schedule" WHERE "cowboys_points"=12;
## Task Generate a SQL query to answer the following question: `Name the number of record for 12 cowboys points` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of record for 12 cowboys points`: ```sql
SELECT MAX("game") FROM "schedule" WHERE "record"='4-0';
## Task Generate a SQL query to answer the following question: `Name the most game for record 4-0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the most game for record 4-0`: ```sql
SELECT COUNT("result") FROM "schedule" WHERE "cowboys_points"=23;
## Task Generate a SQL query to answer the following question: `Name the result for cowboys points being 23` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the result for cowboys points being 23`: ```sql
SELECT "record" FROM "schedule" WHERE "opponent"='Arizona';
## Task Generate a SQL query to answer the following question: `Name the record for arizona` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "game" real, "date" text, "opponent" text, "result" text, "cowboys_points" real, "opponents" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the record for arizona`: ```sql
SELECT COUNT("unemployment_rate") FROM "list_of_appalachian_regional_commission_" WHERE "population"=34024;
## Task Generate a SQL query to answer the following question: `Name the unemployment rate for 34024` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the unemployment rate for 34024`: ```sql
SELECT COUNT("population") FROM "list_of_appalachian_regional_commission_" WHERE "county"='Craig';
## Task Generate a SQL query to answer the following question: `Name the total number of population for craig` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of population for craig`: ```sql
SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Botetourt';
## Task Generate a SQL query to answer the following question: `Name the unemployment rate for botetourt` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the unemployment rate for botetourt`: ```sql
SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "unemployment_rate"='6.7%';
## Task Generate a SQL query to answer the following question: `Name the status for unemployment rate being 6.7%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the status for unemployment rate being 6.7%`: ```sql
SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='14.7%';
## Task Generate a SQL query to answer the following question: `What is the status of the county that has a 14.7% poverty rate?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the status of the county that has a 14.7% poverty rate?`: ```sql
SELECT "poverty_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$16,420';
## Task Generate a SQL query to answer the following question: `What is the poverty rate in the county that has a market income per capita of $16,420?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the poverty rate in the county that has a market income per capita of $16,420?`: ```sql
SELECT MIN("population") FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$24,383';
## Task Generate a SQL query to answer the following question: `What is the lowest population in a county with market income per capita of $24,383?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest population in a county with market income per capita of $24,383?`: ```sql
SELECT "poverty_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$20,518';
## Task Generate a SQL query to answer the following question: `What is the povery rate of the county with market income per capita of $20,518?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the povery rate of the county with market income per capita of $20,518?`: ```sql
SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Hancock';
## Task Generate a SQL query to answer the following question: `what is the market income per capita where the county is hancock?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the market income per capita where the county is hancock?`: ```sql
SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$25,006';
## Task Generate a SQL query to answer the following question: `what is the county where the market income per capita is $25,006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the county where the market income per capita is $25,006?`: ```sql
SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "market_income_per_capita"='$16,406';
## Task Generate a SQL query to answer the following question: `what is the unemployment rate where the market income per capita is $16,406?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the unemployment rate where the market income per capita is $16,406?`: ```sql
SELECT "unemployment_rate" FROM "list_of_appalachian_regional_commission_" WHERE "county"='Wayne';
## Task Generate a SQL query to answer the following question: `what is the unemployment rate for wayne county?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the unemployment rate for wayne county?`: ```sql
SELECT "original_air_date" FROM "table1_22815870_1" WHERE "prod_code"=105;
## Task Generate a SQL query to answer the following question: `What is the original air date of the episode with a production code of 105? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date of the episode with a production code of 105? `: ```sql
SELECT "original_air_date" FROM "table1_22815870_1" WHERE "title"='\"Pilot\"';
## Task Generate a SQL query to answer the following question: `What is the original air date of the episode titled "Pilot"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Pilot"?`: ```sql
SELECT "written_by" FROM "table1_22815870_1" WHERE "title"='\"Christmas\"';
## Task Generate a SQL query to answer the following question: `Who wrote the episode titled "Christmas"? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote the episode titled "Christmas"? `: ```sql
SELECT MAX("prod_code") FROM "table1_22815870_1" WHERE "title"='\"Lenny\"';
## Task Generate a SQL query to answer the following question: `What is the production code of the episode titled "Lenny"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code of the episode titled "Lenny"?`: ```sql
SELECT "original_air_date" FROM "table1_22815870_1" WHERE "written_by"='Adrienne Carter' AND "title"='\"Mom at the Bar/Train Buddy\"';
## Task Generate a SQL query to answer the following question: `What is the original air date of the episode titled "Mom at the Bar/Train Buddy" that was written b Adrienne Carter? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Mom at the Bar/Train Buddy" that was written b Adrienne Carter? `: ```sql
SELECT "original_air_date" FROM "table1_22815870_1" WHERE "title"='\"Commercial/Coach DMV\"';
## Task Generate a SQL query to answer the following question: `What is the original air date of the episode titled "Commercial/Coach DMV"? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_22815870_1" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date of the episode titled "Commercial/Coach DMV"? `: ```sql
SELECT COUNT("county") FROM "list_of_appalachian_regional_commission_" WHERE "population"=2266;
## Task Generate a SQL query to answer the following question: `How many counties have a population of 2266?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `How many counties have a population of 2266?`: ```sql
SELECT COUNT("status") FROM "list_of_appalachian_regional_commission_" WHERE "county"='Wayne';
## Task Generate a SQL query to answer the following question: `How many statuses are listed for Wayne county? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `How many statuses are listed for Wayne county? `: ```sql
SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "status"='Distressed' AND "unemployment_rate"='10.5%';
## Task Generate a SQL query to answer the following question: `What is the market income per capita in a county where the status is distressed and the unemployment rate is at 10.5%? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the market income per capita in a county where the status is distressed and the unemployment rate is at 10.5%? `: ```sql
SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='36.6%';
## Task Generate a SQL query to answer the following question: `What is the status for all the counties that have a poverty rate of 36.6%? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the status for all the counties that have a poverty rate of 36.6%? `: ```sql
SELECT "status" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='11.4%';
## Task Generate a SQL query to answer the following question: `What is the status if the poverty rate is 11.4%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the status if the poverty rate is 11.4%?`: ```sql
SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='12.9%';
## Task Generate a SQL query to answer the following question: `If the poverty rate is 12.9%, what is the county?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `If the poverty rate is 12.9%, what is the county?`: ```sql
SELECT MAX("population") FROM "list_of_appalachian_regional_commission_";
## Task Generate a SQL query to answer the following question: `What is the population maximum?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population maximum?`: ```sql
SELECT "county" FROM "list_of_appalachian_regional_commission_" WHERE "unemployment_rate"='4.8%';
## Task Generate a SQL query to answer the following question: `What county is the unemployment rate 4.8%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `What county is the unemployment rate 4.8%?`: ```sql
SELECT "market_income_per_capita" FROM "list_of_appalachian_regional_commission_" WHERE "poverty_rate"='12.9%';
## Task Generate a SQL query to answer the following question: `If the poverty rate is 12.9%, what is the market income per capita?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_appalachian_regional_commission_" ( "county" text, "population" real, "unemployment_rate" text, "market_income_per_capita" text, "poverty_rate" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `If the poverty rate is 12.9%, what is the market income per capita?`: ```sql
SELECT "viewers_millions" FROM "ratings_chart" WHERE "rating"='2.1';
## Task Generate a SQL query to answer the following question: `Name the viewers for 2.1 rating` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ratings_chart" ( "order" real, "episode" text, "airdate" text, "rating" text, "share" real, "rating_share_18_49" text, "viewers_millions" text, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the viewers for 2.1 rating`: ```sql
SELECT MAX("share") FROM "ratings_chart" WHERE "viewers_millions"='2.76';
## Task Generate a SQL query to answer the following question: `Name the most share for 2.76 million viewers ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ratings_chart" ( "order" real, "episode" text, "airdate" text, "rating" text, "share" real, "rating_share_18_49" text, "viewers_millions" text, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the most share for 2.76 million viewers `: ```sql
SELECT "viewers_millions" FROM "ratings_chart" WHERE "rating_share_18_49"='1.2/4';
## Task Generate a SQL query to answer the following question: `Name the viewers for 1.2/4 rating` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ratings_chart" ( "order" real, "episode" text, "airdate" text, "rating" text, "share" real, "rating_share_18_49" text, "viewers_millions" text, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the viewers for 1.2/4 rating`: ```sql
SELECT "rating_share_18_49" FROM "ratings_chart" WHERE "viewers_millions"='3.79';
## Task Generate a SQL query to answer the following question: `Name the rating for 3.79 viewers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ratings_chart" ( "order" real, "episode" text, "airdate" text, "rating" text, "share" real, "rating_share_18_49" text, "viewers_millions" text, "rank_night" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the rating for 3.79 viewers`: ```sql
SELECT MIN("europa_league") FROM "top_scorers";
## Task Generate a SQL query to answer the following question: `Name the least europa league` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "r" real, "player" text, "scottish_premier_league" real, "scottish_cup" real, "scottish_league_cup" real, "champions_league_qualifying" real, "europa_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least europa league`: ```sql
SELECT MAX("total") FROM "top_scorers" WHERE "player"='Aiden McGeady';
## Task Generate a SQL query to answer the following question: `Name the max total for aiden mcgeady` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "r" real, "player" text, "scottish_premier_league" real, "scottish_cup" real, "scottish_league_cup" real, "champions_league_qualifying" real, "europa_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the max total for aiden mcgeady`: ```sql
SELECT "scottish_premier_league" FROM "top_scorers" WHERE "player"='Georgios Samaras';
## Task Generate a SQL query to answer the following question: `Name the scottish premier league georgios samaras` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "r" real, "player" text, "scottish_premier_league" real, "scottish_cup" real, "scottish_league_cup" real, "champions_league_qualifying" real, "europa_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the scottish premier league georgios samaras`: ```sql
SELECT COUNT("r") FROM "top_scorers" WHERE "player"='Josh Thompson';
## Task Generate a SQL query to answer the following question: `Name the total number of r for josh thompson` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "r" real, "player" text, "scottish_premier_league" real, "scottish_cup" real, "scottish_league_cup" real, "champions_league_qualifying" real, "europa_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of r for josh thompson`: ```sql
SELECT COUNT("high_rebounds") FROM "game_log" WHERE "date"='November 27';
## Task Generate a SQL query to answer the following question: `What was the total number of rebounds on november 27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the total number of rebounds on november 27?`: ```sql
SELECT "date" FROM "game_log" WHERE "team"='@ Toronto';
## Task Generate a SQL query to answer the following question: `On what date did the Pistons play @ toronto?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date did the Pistons play @ toronto?`: ```sql
SELECT COUNT("location_attendance") FROM "game_log" WHERE "game"=7;
## Task Generate a SQL query to answer the following question: `List the location and number of fans in attendance for game 7/` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `List the location and number of fans in attendance for game 7/`: ```sql
SELECT "steals" FROM "player_stats" WHERE "games_played"=31;
## Task Generate a SQL query to answer the following question: `How many interceptions for the team who played 31 games?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many interceptions for the team who played 31 games?`: ```sql
SELECT MIN("steals") FROM "player_stats" WHERE "rebounds"=121;
## Task Generate a SQL query to answer the following question: `How many steals for the player who had 121 rebounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many steals for the player who had 121 rebounds?`: ```sql
SELECT "date" FROM "game_log" WHERE "record"='23-47';
## Task Generate a SQL query to answer the following question: `What date was the Piston's record at 23-47?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What date was the Piston's record at 23-47?`: ```sql
SELECT "high_rebounds" FROM "game_log" WHERE "record"='23-47';
## Task Generate a SQL query to answer the following question: `Who had the highest rebounds during the game with a record of 23-47?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had the highest rebounds during the game with a record of 23-47?`: ```sql
SELECT COUNT("rebounds") FROM "player_stats" WHERE "points"=147;
## Task Generate a SQL query to answer the following question: `How many rebound did the person who scored 147 points have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "minutes" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many rebound did the person who scored 147 points have?`: ```sql
SELECT MIN("three_pointers") FROM "player_stats" WHERE "free_throws"=50;
## Task Generate a SQL query to answer the following question: `Of the players with 50 free throws, what is the lowest number of three pointers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "minutes" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Of the players with 50 free throws, what is the lowest number of three pointers?`: ```sql
SELECT "player" FROM "player_stats" WHERE "rebounds"=156;
## Task Generate a SQL query to answer the following question: `Who are all the players with 156 rebounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "minutes" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Who are all the players with 156 rebounds?`: ```sql
SELECT MAX("games_played") FROM "player_stats" WHERE "three_pointers"=5;
## Task Generate a SQL query to answer the following question: `Of the players who scored 5 three pointers, what is the highest number of games played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "minutes" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Of the players who scored 5 three pointers, what is the highest number of games played?`: ```sql
SELECT "no" FROM "roster" WHERE "hometown"='Canton, Illinois';
## Task Generate a SQL query to answer the following question: `What is every number for the hometown of Canton, Illinois?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "hometown" text, "class" text, "position" text, "height" text, "weight" real ); ### SQL Given the database schema, here is the SQL query that answers `What is every number for the hometown of Canton, Illinois?`: ```sql
SELECT "player" FROM "roster" WHERE "height"='6-5';
## Task Generate a SQL query to answer the following question: `Who is every player with a height of 6-5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "hometown" text, "class" text, "position" text, "height" text, "weight" real ); ### SQL Given the database schema, here is the SQL query that answers `Who is every player with a height of 6-5?`: ```sql
SELECT "player" FROM "roster" WHERE "hometown"='Carbondale, Illinois';
## Task Generate a SQL query to answer the following question: `Who are all players from hometown of Carbondale, Illinois?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "hometown" text, "class" text, "position" text, "height" text, "weight" real ); ### SQL Given the database schema, here is the SQL query that answers `Who are all players from hometown of Carbondale, Illinois?`: ```sql
SELECT "class" FROM "roster" WHERE "position"='Guard' AND "player"='Tal Brody';
## Task Generate a SQL query to answer the following question: `What is every class with a position of guard and Tal Brody as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "hometown" text, "class" text, "position" text, "height" text, "weight" real ); ### SQL Given the database schema, here is the SQL query that answers `What is every class with a position of guard and Tal Brody as the player?`: ```sql
SELECT COUNT("no") FROM "roster" WHERE "hometown"='Canton, Illinois';
## Task Generate a SQL query to answer the following question: `How many values for number occur with the hometown of Canton, Illinois?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "hometown" text, "class" text, "position" text, "height" text, "weight" real ); ### SQL Given the database schema, here is the SQL query that answers `How many values for number occur with the hometown of Canton, Illinois?`: ```sql
SELECT "class" FROM "roster" WHERE "player"='Ren Alde';
## Task Generate a SQL query to answer the following question: `What class was ren alde?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "position" text, "height" text, "weight" real, "class" text, "hometown" text ); ### SQL Given the database schema, here is the SQL query that answers `What class was ren alde?`: ```sql
SELECT "player" FROM "roster" WHERE "weight"=170;
## Task Generate a SQL query to answer the following question: `Who are the player's who weighed 170?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "position" text, "height" text, "weight" real, "class" text, "hometown" text ); ### SQL Given the database schema, here is the SQL query that answers `Who are the player's who weighed 170?`: ```sql
SELECT "hometown" FROM "roster" WHERE "player"='Jim Dutcher';
## Task Generate a SQL query to answer the following question: `What is jim dutcher's hometown?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "no" real, "player" text, "position" text, "height" text, "weight" real, "class" text, "hometown" text ); ### SQL Given the database schema, here is the SQL query that answers `What is jim dutcher's hometown?`: ```sql
SELECT COUNT("player") FROM "player_stats" WHERE "points"=51;
## Task Generate a SQL query to answer the following question: `Name the total number of player for 51 points` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of player for 51 points`: ```sql
SELECT MAX("rebounds") FROM "player_stats" WHERE "player"='Larry Smith';
## Task Generate a SQL query to answer the following question: `Name the most rebounds for larry smith` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the most rebounds for larry smith`: ```sql
SELECT "steals" FROM "player_stats" WHERE "blocks"=5;
## Task Generate a SQL query to answer the following question: `Name the steals for 5 blocks` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the steals for 5 blocks`: ```sql
SELECT MIN("points") FROM "player_stats";
## Task Generate a SQL query to answer the following question: `Name the least points` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least points`: ```sql
SELECT "h_ci_k_a_m" FROM "magnetic_properties" WHERE "b_r_t"='0.6–1.4';
## Task Generate a SQL query to answer the following question: `When 0.6–1.4 is the b r (t) what is the h ci (ka/m)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "magnetic_properties" ( "magnet" text, "b_r_t" text, "h_ci_k_a_m" text, "bh_max_k_j_m_3" text, "t_c_c" text ); ### SQL Given the database schema, here is the SQL query that answers `When 0.6–1.4 is the b r (t) what is the h ci (ka/m)?`: ```sql
SELECT COUNT("t_c_c") FROM "magnetic_properties" WHERE "magnet"='Nd 2 Fe 14 B (bonded)';
## Task Generate a SQL query to answer the following question: `When nd 2 fe 14 b (bonded) is the magnet how many measurements of tc (Β°c)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "magnetic_properties" ( "magnet" text, "b_r_t" text, "h_ci_k_a_m" text, "bh_max_k_j_m_3" text, "t_c_c" text ); ### SQL Given the database schema, here is the SQL query that answers `When nd 2 fe 14 b (bonded) is the magnet how many measurements of tc (Β°c)?`: ```sql
SELECT "h_ci_k_a_m" FROM "magnetic_properties" WHERE "t_c_c"='720';
## Task Generate a SQL query to answer the following question: `When 720 is the t c (Β°c) what is the h ci (ka/m)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "magnetic_properties" ( "magnet" text, "b_r_t" text, "h_ci_k_a_m" text, "bh_max_k_j_m_3" text, "t_c_c" text ); ### SQL Given the database schema, here is the SQL query that answers `When 720 is the t c (Β°c) what is the h ci (ka/m)?`: ```sql
SELECT "sec_wins" FROM "conference_standings" WHERE "percentage"='.357' AND "home_record"='4-3';
## Task Generate a SQL query to answer the following question: `Name the sec wins for .357 percentage and 4-3 home record` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "conference_standings" ( "team" text, "sec_wins" real, "sec_losses" real, "percentage" text, "home_record" text, "road_record" text, "overall_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the sec wins for .357 percentage and 4-3 home record`: ```sql
SELECT "percentage" FROM "conference_standings" WHERE "team"='Georgia';
## Task Generate a SQL query to answer the following question: `Name the percentage for georgia` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "conference_standings" ( "team" text, "sec_wins" real, "sec_losses" real, "percentage" text, "home_record" text, "road_record" text, "overall_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the percentage for georgia`: ```sql
SELECT "overall_record" FROM "conference_standings" WHERE "road_record"='4-3';
## Task Generate a SQL query to answer the following question: `Name the overall record for road record being 4-3` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "conference_standings" ( "team" text, "sec_wins" real, "sec_losses" real, "percentage" text, "home_record" text, "road_record" text, "overall_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the overall record for road record being 4-3`: ```sql
SELECT COUNT("road_record") FROM "conference_standings" WHERE "team"='Ole Miss';
## Task Generate a SQL query to answer the following question: `Name the number of road record for team ole miss` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "conference_standings" ( "team" text, "sec_wins" real, "sec_losses" real, "percentage" text, "home_record" text, "road_record" text, "overall_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of road record for team ole miss`: ```sql
SELECT "percentage" FROM "conference_standings" WHERE "team"='Ole Miss';
## Task Generate a SQL query to answer the following question: `Name the percentage for ole miss` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "conference_standings" ( "team" text, "sec_wins" real, "sec_losses" real, "percentage" text, "home_record" text, "road_record" text, "overall_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the percentage for ole miss`: ```sql
SELECT MAX("blocks") FROM "player_stats" WHERE "player"='Kendall Gill';
## Task Generate a SQL query to answer the following question: `What is the most number of blocks kendall gill had?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the most number of blocks kendall gill had?`: ```sql
SELECT MIN("three_pointers") FROM "player_stats" WHERE "rebounds"=178;
## Task Generate a SQL query to answer the following question: `What is the lowest number of three pointers in games where the number of rebounds was 178?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number of three pointers in games where the number of rebounds was 178?`: ```sql
SELECT COUNT("steals") FROM "player_stats" WHERE "player"='Andy Kaufmann';
## Task Generate a SQL query to answer the following question: `How many steals were the in games that andy kaufmann played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many steals were the in games that andy kaufmann played?`: ```sql
SELECT MIN("three_pointers") FROM "player_stats" WHERE "player"='Kendall Gill';
## Task Generate a SQL query to answer the following question: `What is the lowest number of three pointers in games that kendall gill played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number of three pointers in games that kendall gill played?`: ```sql
SELECT COUNT("three_pointers") FROM "player_stats" WHERE "points"=581;
## Task Generate a SQL query to answer the following question: `How many games had three pointers where the number of points was 581?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "player_stats" ( "player" text, "games_played" real, "field_goals" real, "three_pointers" real, "free_throws" real, "rebounds" real, "assists" real, "blocks" real, "steals" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many games had three pointers where the number of points was 581?`: ```sql
SELECT COUNT("timeslot_et") FROM "seasonal_ratings" WHERE "season_finale"='August 29, 2009';
## Task Generate a SQL query to answer the following question: `How many timeslots were available for the season finale on August 29, 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many timeslots were available for the season finale on August 29, 2009?`: ```sql
SELECT MAX("episodes") FROM "seasonal_ratings" WHERE "viewers_in_millions"='5.74';
## Task Generate a SQL query to answer the following question: `What was the highest amount of episodes for the season with 5.74 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the highest amount of episodes for the season with 5.74 million viewers?`: ```sql
SELECT "rank" FROM "seasonal_ratings" WHERE "season_premiere"='December 24, 2011';
## Task Generate a SQL query to answer the following question: `What rank number had a season premiere on December 24, 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What rank number had a season premiere on December 24, 2011?`: ```sql
SELECT COUNT("rank") FROM "seasonal_ratings" WHERE "season_finale"='August 20, 2011';
## Task Generate a SQL query to answer the following question: `How many rankings were there for the season with a finale on August 20, 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many rankings were there for the season with a finale on August 20, 2011?`: ```sql
SELECT COUNT("episodes") FROM "seasonal_ratings" WHERE "season_premiere"='December 11, 2010';
## Task Generate a SQL query to answer the following question: `How many episodes had a season premiere on December 11, 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes had a season premiere on December 11, 2010?`: ```sql
SELECT MAX("season") FROM "seasonal_ratings" WHERE "season_premiere"='December 11, 2010';
## Task Generate a SQL query to answer the following question: `What was the season number that had a premiere on December 11, 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "seasonal_ratings" ( "season" real, "episodes" real, "timeslot_et" text, "season_premiere" text, "season_finale" text, "tv_season" text, "rank" text, "viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the season number that had a premiere on December 11, 2010?`: ```sql
SELECT "surface" FROM "singles_19_11_titles_8_runner_ups" WHERE "score_in_the_final"='6–1, 6–7 (2–7) , 7–6 (7–5) , 7–6 (10–8)';
## Task Generate a SQL query to answer the following question: `Which surfaces have the final score of 6–1, 6–7 (2–7) , 7–6 (7–5) , 7–6 (10–8)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which surfaces have the final score of 6–1, 6–7 (2–7) , 7–6 (7–5) , 7–6 (10–8)?`: ```sql
SELECT COUNT("outcome") FROM "singles_19_11_titles_8_runner_ups" WHERE "score_in_the_final"='7–6 (9–7) , 6–3';
## Task Generate a SQL query to answer the following question: `How many outcome have a score of 7–6 (9–7) , 6–3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `How many outcome have a score of 7–6 (9–7) , 6–3?`: ```sql
SELECT "outcome" FROM "singles_19_11_titles_8_runner_ups" WHERE "score_in_the_final"='6–3, 6–2';
## Task Generate a SQL query to answer the following question: `Which outcomes have a final score of 6–3, 6–2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which outcomes have a final score of 6–3, 6–2?`: ```sql
SELECT MAX("year") FROM "singles_19_11_titles_8_runner_ups" WHERE "opponent_in_the_final"='Andre Agassi';
## Task Generate a SQL query to answer the following question: `What is the last year that Andre Agassi was the final opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the last year that Andre Agassi was the final opponent?`: ```sql
SELECT COUNT("year") FROM "singles_19_11_titles_8_runner_ups" WHERE "score_in_the_final"='6–3, 6–2';
## Task Generate a SQL query to answer the following question: `How many years have a final score of 6–3, 6–2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `How many years have a final score of 6–3, 6–2?`: ```sql
SELECT "championship" FROM "singles_19_11_titles_8_runner_ups" WHERE "score_in_the_final"='6–7 (9–11) , 6–4, 7–5, 4–6, 4–6';
## Task Generate a SQL query to answer the following question: `Which championship has a final score of 6–7 (9–11) , 6–4, 7–5, 4–6, 4–6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_19_11_titles_8_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which championship has a final score of 6–7 (9–11) , 6–4, 7–5, 4–6, 4–6?`: ```sql
SELECT COUNT("year") FROM "atp_tour_career_earnings" WHERE "earnings"=2254598;
## Task Generate a SQL query to answer the following question: `How many years had a total earnings amount of 2254598?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `How many years had a total earnings amount of 2254598?`: ```sql
SELECT MAX("year") FROM "atp_tour_career_earnings";
## Task Generate a SQL query to answer the following question: `What is the latest year that data is available for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the latest year that data is available for?`: ```sql
SELECT "score_in_the_final" FROM "singles_6_5_titles_1_runner_up" WHERE "year"=1994;
## Task Generate a SQL query to answer the following question: `What is the score in the final in the year 1994?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6_5_titles_1_runner_up" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score in the final in the year 1994?`: ```sql
SELECT "championship" FROM "singles_6_5_titles_1_runner_up" WHERE "year"=1993;
## Task Generate a SQL query to answer the following question: `Who is the championship for the year of 1993?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6_5_titles_1_runner_up" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the championship for the year of 1993?`: ```sql
SELECT "opponent_in_the_final" FROM "singles_6_5_titles_1_runner_up" WHERE "championship"='Frankfurt' AND "year"<1993.0;
## Task Generate a SQL query to answer the following question: `Who is the opponent in the final when frankfurt is championship and the year is less than 1993.0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6_5_titles_1_runner_up" ( "outcome" text, "year" real, "championship" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the opponent in the final when frankfurt is championship and the year is less than 1993.0?`: ```sql
SELECT MIN("year") FROM "atp_tour_career_earnings" WHERE "money_list_rank"=3;
## Task Generate a SQL query to answer the following question: `In what year was his money list rank 3? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `In what year was his money list rank 3? `: ```sql
SELECT MIN("money_list_rank") FROM "atp_tour_career_earnings" WHERE "year"=2001;
## Task Generate a SQL query to answer the following question: `What was his money list rank in 2001? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What was his money list rank in 2001? `: ```sql
SELECT MAX("atp_wins") FROM "atp_tour_career_earnings" WHERE "money_list_rank"=4;
## Task Generate a SQL query to answer the following question: `How many atp wins did he have when his money list rank was 4? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `How many atp wins did he have when his money list rank was 4? `: ```sql
SELECT MAX("total_wins") FROM "atp_tour_career_earnings";
## Task Generate a SQL query to answer the following question: `What is the maximum total wins he had for any year? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atp_tour_career_earnings" ( "year" real, "majors" real, "atp_wins" real, "total_wins" real, "earnings" real, "money_list_rank" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the maximum total wins he had for any year? `: ```sql