Which Wins has an Against of 1940, and a Byes larger than 0?
CREATE TABLE "2012_ladder" (
  "peel" text,
  "wins" real,
  "byes" real,
  "losses" real,
  "draws" real,
  "against" real
);
SELECT MAX("wins") FROM "2012_ladder" WHERE "against"=1940 AND "byes">0;