CREATE TABLE "main_characters" (
  "character" text,
  "portrayed_by" text,
  "first_appearance" text,
  "last_appearance" text,
  "duration" text,
  "episodes" text
);

Question: On which episode did actress Sela Ward make her last appearance?
SQL: SELECT "last_appearance" FROM "main_characters" WHERE "portrayed_by"='Sela Ward';

Question: Which actors first appeared in "Zoo York"?
SQL: SELECT "portrayed_by" FROM "main_characters" WHERE "first_appearance"='\"Zoo York\"';

Question: How many episodes did actress Vanessa Ferlito appear in?
SQL: SELECT "episodes" FROM "main_characters" WHERE "portrayed_by"='Vanessa Ferlito';

Question: Which actors first appeared in episode "Blink" 1, 2, 3?
SQL: SELECT "portrayed_by" FROM "main_characters" WHERE "first_appearance"='\"Blink\" 1, 2, 3';

Question: What was the duration of Robert Joy's portrayal?
SQL: SELECT COUNT("duration") FROM "main_characters" WHERE "portrayed_by"='Robert Joy';

Question: Which episode did actor A. J. Buckley last appear in?
SQL: SELECT "last_appearance" FROM "main_characters" WHERE "portrayed_by"='A. J. Buckley';