What average rank of the premier has NSW as the state, Liberalism as the party, and 22 March 1877 was the assumed office?
CREATE TABLE "historical_premiers" (
  "rank" real,
  "state" text,
  "premier" text,
  "party" text,
  "assumed_office" text,
  "left_office" text,
  "total_time_in_office" text
);
SELECT AVG("rank") FROM "historical_premiers" WHERE "state"='nsw' AND "party"='liberalism' AND "assumed_office"='22 march 1877';