CREATE TABLE "table1_21831229_3" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_u_s_air_date" text,
  "prod_code" real
);

Question: Who wrote episode 31 in the series?
SQL: SELECT "written_by" FROM "table1_21831229_3" WHERE "no_in_series"=31;

Question: What was the date that the episode with a production code of 213 was originally aired?
SQL: SELECT "original_u_s_air_date" FROM "table1_21831229_3" WHERE "prod_code"=213;