CREATE TABLE "moto_gp_classification" (
  "rider" text,
  "manufacturer" text,
  "laps" real,
  "time" text,
  "grid" real
);

Question: How many Laps have Grid larger than 14, and a Rider of sylvain guintoli?
SQL: SELECT COUNT("laps") FROM "moto_gp_classification" WHERE "grid">14 AND "rider"='sylvain guintoli';

Question: Which Grid has Laps of 24, and a Rider of marco melandri?
SQL: SELECT SUM("grid") FROM "moto_gp_classification" WHERE "laps"=24 AND "rider"='marco melandri';

Question: Which Grid has Laps smaller than 24, and a Time of retirement?
SQL: SELECT MIN("grid") FROM "moto_gp_classification" WHERE "laps"<24 AND "time"='retirement';

Question: Which Grid has a Rider of randy de puniet, and Laps smaller than 24?
SQL: SELECT MAX("grid") FROM "moto_gp_classification" WHERE "rider"='randy de puniet' AND "laps"<24;