CREATE TABLE "average_scores_of_all_couples" (
  "rank_by_average" text,
  "place" text,
  "perfect_40s" text,
  "total" text,
  "number_of_dances" text,
  "season" text,
  "average" text
);

Question: What is the average score for 6th place with a total of 165?
SQL: SELECT "average" FROM "average_scores_of_all_couples" WHERE "place"='6th' AND "total"='165';

Question: What is the total with a 74 rank by average for 8th place?
SQL: SELECT "total" FROM "average_scores_of_all_couples" WHERE "rank_by_average"='74' AND "place"='8th';

Question: What was the place in season 8 with a rank by average at 139?
SQL: SELECT "place" FROM "average_scores_of_all_couples" WHERE "season"='8' AND "rank_by_average"='139';

Question: What is the total for 3rd place on season 9?
SQL: SELECT "total" FROM "average_scores_of_all_couples" WHERE "place"='3rd' AND "season"='9';

Question: What rank by average has 1 dance on season 9?
SQL: SELECT "rank_by_average" FROM "average_scores_of_all_couples" WHERE "number_of_dances"='1' AND "season"='9';