With foreign banks as the bank type, and on-site ATMS less than 218, what is the average off-site ATMs?
CREATE TABLE "branches_and_at_ms_of_scheduled_commerci" (
  "bank_type" text,
  "number_of_branches" real,
  "on_site_at_ms" real,
  "off_site_at_ms" real,
  "total_at_ms" real
);
SELECT AVG("off_site_at_ms") FROM "branches_and_at_ms_of_scheduled_commerci" WHERE "bank_type"='foreign banks' AND "on_site_at_ms"<218;