CREATE TABLE "table1_23279434_1" (
  "series_num" real,
  "season_num" real,
  "title" text,
  "directed_by" text,
  "written_by" text,
  "original_air_date" text,
  "production_code" text
);

Question: Which season used production code "am10"?
SQL: SELECT COUNT("season_num") FROM "table1_23279434_1" WHERE "production_code"='AM10';

Question: When did Jeremy Kagan's episode first air?
SQL: SELECT "original_air_date" FROM "table1_23279434_1" WHERE "directed_by"='Jeremy Kagan';

Question: What seasons  in series 7 did David E. Kelley write ?
SQL: SELECT COUNT("season_num") FROM "table1_23279434_1" WHERE "written_by"='David E. Kelley' AND "series_num"=7;