CREATE TABLE "tv_ratings" (
  "year" text,
  "broadcast_date" text,
  "bbc_one_total_viewing" text,
  "bbc_one_rank" text,
  "bbc_two_total_viewing" text,
  "bbc_two_rank" text
);

Question: How much is the total BBC 2 viewing in 1999?
SQL: SELECT "bbc_two_total_viewing" FROM "tv_ratings" WHERE "year"='1999';

Question: What was the rank of BBC 2 in 2005?
SQL: SELECT "bbc_two_rank" FROM "tv_ratings" WHERE "year"='2005';

Question: What is the BBC 2 rank when BBC 1 is 1st rank and the total viewing is 9,840,000?
SQL: SELECT "bbc_two_rank" FROM "tv_ratings" WHERE "bbc_one_rank"='1st' AND "bbc_one_total_viewing"='9,840,000';

Question: In what year was BBC 2 13th in rank?
SQL: SELECT "year" FROM "tv_ratings" WHERE "bbc_two_rank"='13th';