CREATE TABLE "table1_2226817_9" (
  "no_in_series" real,
  "no_in_season" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text
);

Question: How many seasons had episode 158?
SQL: SELECT MIN("no_in_season") FROM "table1_2226817_9" WHERE "no_in_series"=158;

Question: What is the production code of the episode directed by Stacie Lipp?
SQL: SELECT "production_code" FROM "table1_2226817_9" WHERE "written_by"='Stacie Lipp';

Question: What is the name of episode 165?
SQL: SELECT "title" FROM "table1_2226817_9" WHERE "no_in_series"=165;

Question: How many episodes have the production code 8.04
SQL: SELECT COUNT("directed_by") FROM "table1_2226817_9" WHERE "production_code"='8.04';