Table: malaysian_grand_prix_2001
Columns: driver
constructor
laps
time_retired
grid

Question: What is the mean number of laps where Time/retired was a water leak and the grid number was bigger than 12?
SQL: SELECT AVG("laps") FROM malaysian_grand_prix_2001 WHERE "time_retired" = 'water leak' AND "grid" > 12

Question: What is the mean number of laps when time/retired was spun off and the driver was Nick Heidfeld?
SQL: SELECT AVG("laps") FROM malaysian_grand_prix_2001 WHERE "time_retired" = 'spun off' AND "driver" = 'nick heidfeld'

Question: What is the sum grid number when the driver was Luciano Burti?
SQL: SELECT COUNT("grid") FROM malaysian_grand_prix_2001 WHERE "driver" = 'luciano burti'

Question: Which constructor had a laps number bigger than 3 when the driver was Jarno Trulli?
SQL: SELECT "constructor" FROM malaysian_grand_prix_2001 WHERE "laps" > 3 AND "driver" = 'jarno trulli'