Table: motorcycle_race_results_6
Columns: rider
manufacturer
laps
time_retired
grid

Question: What is the rider when the grid is 21?
SQL: SELECT "rider" FROM motorcycle_race_results_6 WHERE "grid" = 21

Question: What is the average laps when the manufacturer is yamaha, and the rider is garry mccoy and the grid is smaller than 4?
SQL: SELECT AVG("laps") FROM motorcycle_race_results_6 WHERE "manufacturer" = 'yamaha' AND "rider" = 'garry mccoy' AND "grid" < 4

Question: What is the lowest laps for rider andrew pitt, with a grid smaller than 18? Wha
SQL: SELECT MIN("laps") FROM motorcycle_race_results_6 WHERE "rider" = 'andrew pitt' AND "grid" < 18

Question: What is the lowest laps that has a manufacturer of yamaha, and a time/retired of +1:08.312, and a grid less than 20?
SQL: SELECT MIN("laps") FROM motorcycle_race_results_6 WHERE "manufacturer" = 'yamaha' AND "time_retired" = '+1:08.312' AND "grid" < 20