Which episode did actor A. J. Buckley last appear in?
CREATE TABLE "main_characters" (
  "character" text,
  "portrayed_by" text,
  "first_appearance" text,
  "last_appearance" text,
  "duration" text,
  "episodes" text
);
SELECT "last_appearance" FROM "main_characters" WHERE "portrayed_by"='A. J. Buckley';