What is the lowest rank that has goals per match less than 1.237, real madrid as the club, goals less than 53, with apps greater than 40?
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 MIN("rank") FROM "most_goals_in_a_season_all_competitions_" WHERE "goals_per_match"<1.237 AND "club"='real madrid' AND "goals"<53 AND "apps">40;