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

Question: Which constructor has a Grid smaller than 18, and a Driver of mika häkkinen?
SQL: SELECT "constructor" FROM "race" WHERE "grid"<18 AND "driver"='mika häkkinen';

Question: What is the average Lap of damon hill, with a Grid smaller than 1?
SQL: SELECT AVG("laps") FROM "race" WHERE "driver"='damon hill' AND "grid"<1;

Question: What is the total number of laps with a Driver of eddie irvine?
SQL: SELECT SUM("laps") FROM "race" WHERE "driver"='eddie irvine';