Table: monza_superbike_2007_2
Columns: rider
bike
laps
time
grid

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

Question: What is the largest lap number when the time was +31.982?
SQL: SELECT MAX("laps") FROM monza_superbike_2007_2 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 monza_superbike_2007_2 WHERE "bike" = 'ducati 999 f06' AND "grid" = 15