What is the average laps when the manufacturer is yamaha, and the rider is garry mccoy and the grid is smaller than 4?
CREATE TABLE "moto_gp_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);
SELECT AVG("laps") FROM "moto_gp_classification" WHERE "manufacturer"='yamaha' AND "rider"='garry mccoy' AND "grid"<4;