CREATE TABLE "race" (
  "driver" text,
  "constructor" text,
  "laps" real,
  "time_retired" text,
  "grid" real
);

Question: What is the top grid that laps less than 66 and a retried engine?
SQL: SELECT MAX("grid") FROM "race" WHERE "time_retired"='engine' AND "laps"<66;

Question: What is the top lap that had a tyre time?
SQL: SELECT MAX("laps") FROM "race" WHERE "time_retired"='tyre';

Question: What is the top grid that roger williamson lapped less than 7?
SQL: SELECT MAX("grid") FROM "race" WHERE "driver"='roger williamson' AND "laps"<7;