Table: motogp_results_3
Columns: year
class
team
points
rank
wins

Question: Which class had a rank of 2nd?
SQL: SELECT "class" FROM motogp_results_3 WHERE "rank" = '2nd'

Question: How many wins did the 500cc class have in 1979?
SQL: SELECT "wins" FROM motogp_results_3 WHERE "class" = '500cc' AND "year" = 1979

Question: What is the total of the points for wins under 6 and a rank of 2nd?
SQL: SELECT SUM("points") FROM motogp_results_3 WHERE "rank" = '2nd' AND "wins" < 6

Question: Which class had 110 points?
SQL: SELECT "class" FROM motogp_results_3 WHERE "points" = 110

Question: What is the average year having 142 points?
SQL: SELECT AVG("year") FROM motogp_results_3 WHERE "points" = 142