Which Grid has Laps smaller than 24, and a Time of retirement?
CREATE TABLE "moto_gp_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time" text,
  "grid" real
);
SELECT MIN("grid") FROM "moto_gp_classification" WHERE "laps"<24 AND "time"='retirement';