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

Question: What is the highest numbered grid for piercarlo ghinzani with over 3 laps?
SQL: SELECT MAX("grid") FROM "classification" WHERE "driver"='piercarlo ghinzani' AND "laps">3;

Question: How many laps for a grid of over 18 and retired due to electrical failure?
SQL: SELECT SUM("laps") FROM "classification" WHERE "grid">18 AND "time_retired"='electrical';