CREATE TABLE table_name_87 (laps INTEGER, constructor VARCHAR(255), grid VARCHAR(255), time_retired VARCHAR(255))
What is the average laps for a grid larger than 2, for a ferrari that got in an accident?
    
SQL: SELECT AVG(laps) FROM table_name_87 WHERE grid > 2 AND time_retired = "accident" AND constructor = "ferrari"