How many ranks have 40 as the apps, with goals per match greater than 1?
CREATE TABLE "most_goals_in_a_season_all_competitions_" (
  "rank" real,
  "name" text,
  "season" text,
  "club" text,
  "goals" real,
  "apps" real,
  "goals_per_match" real
);
SELECT SUM("rank") FROM "most_goals_in_a_season_all_competitions_" WHERE "apps"=40 AND "goals_per_match">1;