What's the total losses that has more than 12 wins and 1017 against?
CREATE TABLE "2009_ladder_and_finals" (
  "benalla_dfl" text,
  "wins" real,
  "losses" real,
  "draws" real,
  "byes" real,
  "against" real
);
SELECT COUNT("losses") FROM "2009_ladder_and_finals" WHERE "against"=1017 AND "wins">12;