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

Question: what average grid has laps larger than 52 and contains the driver of andrea de adamich?
SQL: SELECT AVG("grid") FROM "classification" WHERE "laps">52 AND "driver"='andrea de adamich';

Question: what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?
SQL: SELECT MAX("laps") FROM "classification" WHERE "driver"='graham hill' AND "grid">18;

Question: what's the average grid that has a time/retired piston and laps smaller than 15?
SQL: SELECT AVG("grid") FROM "classification" WHERE "time_retired"='piston' AND "laps"<15;