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

Question: What is the average number of laps when Gerhard Berger is the driver?
SQL: SELECT AVG("laps") FROM "race" WHERE "driver"='gerhard berger';

Question: What is the name of the constructor who has more than 50 laps and a grid of 7?
SQL: SELECT "constructor" FROM "race" WHERE "laps">50 AND "grid"=7;