Table: motorcycle_race_results_2008_6
Columns: rider
manufacturer
laps
time
grid

Question: What is the highest grid for Aprilia vehicles, laps over 5, and a retirement finish?
SQL: SELECT MAX("grid") FROM motorcycle_race_results_2008_6 WHERE "manufacturer" = 'aprilia' AND "time" = 'retirement' AND "laps" > 5

Question: What is the average laps completed by riders with times of +2:11.524?
SQL: SELECT AVG("laps") FROM motorcycle_race_results_2008_6 WHERE "time" = '+2:11.524'

Question: Which rider has a time of +2:11.524?
SQL: SELECT "rider" FROM motorcycle_race_results_2008_6 WHERE "time" = '+2:11.524'

Question: What is the average grid for vehicles manufactured by Aprilia and having run more than 16 laps?
SQL: SELECT AVG("grid") FROM motorcycle_race_results_2008_6 WHERE "manufacturer" = 'aprilia' AND "laps" > 16