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

Question: Tell me the average Laps for grid larger than 12 and bikes of ducati 999rs for dean ellison
SQL: SELECT AVG("laps") FROM "superbike_race_2_classification" WHERE "grid">12 AND "bike"='ducati 999rs' AND "rider"='dean ellison';

Question: Tell me the highest Laps for grid less than 22 and riderS of ruben xaus
SQL: SELECT MAX("laps") FROM "superbike_race_2_classification" WHERE "grid"<22 AND "rider"='ruben xaus';

Question: Tell me the total number of grid for rider of james toseland
SQL: SELECT COUNT("grid") FROM "superbike_race_2_classification" WHERE "rider"='james toseland';

Question: Tell me the least Laps for grid larger than 2 with 35:26.734
SQL: SELECT MIN("laps") FROM "superbike_race_2_classification" WHERE "time"='35:26.734' AND "grid">2;