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

Question: Which Laps have a Time of +39.476, and a Grid larger than 11?
SQL: SELECT AVG("laps") FROM "moto_gp_classification" WHERE "time"='+39.476' AND "grid">11;

Question: Which Time has Laps smaller than 28, and a Rider of nicky hayden?
SQL: SELECT "time" FROM "moto_gp_classification" WHERE "laps"<28 AND "rider"='nicky hayden';

Question: Which Rider has a Grid larger than 6, and has Laps of 28, and a Time of +39.476?
SQL: SELECT "rider" FROM "moto_gp_classification" WHERE "grid">6 AND "laps"=28 AND "time"='+39.476';