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

Question: What is the lowest Laps, when Rider is Sylvain Guintoli, and when Grid is less than 16?
SQL: SELECT MIN("laps") FROM "moto_gp_classification" WHERE "rider"='sylvain guintoli' AND "grid"<16;

Question: What is the lowest Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802?
SQL: SELECT MIN("grid") FROM "moto_gp_classification" WHERE "laps"=21 AND "manufacturer"='yamaha' AND "time"='+18.802';

Question: What is Rider, when Grid is less than 16, when Laps is 21, when Manufacturer is Honda, and when Time is +10.583?
SQL: SELECT "rider" FROM "moto_gp_classification" WHERE "grid"<16 AND "laps"=21 AND "manufacturer"='honda' AND "time"='+10.583';

Question: What is the average Grid, when Rider is Shinya Nakano, and when Laps is less than 21?
SQL: SELECT AVG("grid") FROM "moto_gp_classification" WHERE "rider"='shinya nakano' AND "laps"<21;