CREATE TABLE "table1_22580855_1" (
  "season_no" real,
  "series_no" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" real,
  "u_s_viewers_millions" text
);

Question: who are the writer of the series episode number 170?
SQL: SELECT "written_by" FROM "table1_22580855_1" WHERE "series_no"=170;

Question: which is the  maximun serie episode number when the millions of North American spectators is 3.14?
SQL: SELECT MAX("series_no") FROM "table1_22580855_1" WHERE "u_s_viewers_millions"='3.14';

Question: How many writers write the episode whose director is Jonathan Herron?
SQL: SELECT COUNT("written_by") FROM "table1_22580855_1" WHERE "directed_by"='Jonathan Herron';

Question: which is the biggest production code?
SQL: SELECT MAX("production_code") FROM "table1_22580855_1";

Question: who are the writers when the production code is 8011?
SQL: SELECT "written_by" FROM "table1_22580855_1" WHERE "production_code"=8011;

Question: what is the name of the episode whose writer is Timothy J. Lea and the director is Norberto Barba?
SQL: SELECT "title" FROM "table1_22580855_1" WHERE "written_by"='Timothy J. Lea' AND "directed_by"='Norberto Barba';