Table: donington_sbk_race
Columns: rider
bike
laps
time
grid

Question: Tell me the average Laps for grid larger than 12 and bikes of ducati 999rs for dean ellison
SQL: SELECT AVG("laps") FROM donington_sbk_race 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 donington_sbk_race 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 donington_sbk_race WHERE "rider" = 'james toseland'

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