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

Question: What is the rider when the grid is 21?
SQL: SELECT "rider" FROM "moto_gp_classification" WHERE "grid"=21;

Question: What is the average laps when the manufacturer is yamaha, and the rider is garry mccoy and the grid is smaller than 4?
SQL: SELECT AVG("laps") FROM "moto_gp_classification" WHERE "manufacturer"='yamaha' AND "rider"='garry mccoy' AND "grid"<4;

Question: What is the lowest laps for rider andrew pitt, with a grid smaller than 18? Wha
SQL: SELECT MIN("laps") FROM "moto_gp_classification" WHERE "rider"='andrew pitt' AND "grid"<18;

Question: What is the lowest laps that has a manufacturer of yamaha, and a time/retired of +1:08.312, and a grid less than 20?
SQL: SELECT MIN("laps") FROM "moto_gp_classification" WHERE "manufacturer"='yamaha' AND "time_retired"='+1:08.312' AND "grid"<20;