What is the average number of ties for the Detroit Lions team when they have fewer than 5 wins, fewer than 3 losses, and a win percentage of 0.800?
CREATE TABLE "coaching_record_vs_other_teams" (
  "team" text,
  "wins" real,
  "losses" real,
  "ties" real,
  "win_pct" text
);
SELECT AVG("ties") FROM "coaching_record_vs_other_teams" WHERE "losses"<3 AND "wins"<5 AND "win_pct"='0.800' AND "team"='detroit lions';