CREATE TABLE "superbike_race_2_classification" (
  "rider" text,
  "bike" text,
  "laps" real,
  "time" text,
  "grid" real
);

Question: What is the mean number of laps when the grid was 8?
SQL: SELECT AVG("laps") FROM "superbike_race_2_classification" WHERE "grid"=8;

Question: What is the largest lap number when the time was +31.982?
SQL: SELECT MAX("laps") FROM "superbike_race_2_classification" WHERE "time"='+31.982';

Question: What time was there when the bike was Ducati 999 F06 and the grid number was 15?
SQL: SELECT "time" FROM "superbike_race_2_classification" WHERE "bike"='ducati 999 f06' AND "grid"=15;