CREATE TABLE "sprint_cup_series" (
  "year" text,
  "starts" real,
  "wins" real,
  "top_fives" real,
  "top_tens" real,
  "poles" real,
  "rank" text
);

Question: What is the sum of wins for casey mears when the player ranked 22nd and was in teh top fives 3 times?
SQL: SELECT SUM("wins") FROM "sprint_cup_series" WHERE "rank"='22nd' AND "top_fives"=3;

Question: What is the total number of top fives in 2010 when casey mears had more than 0 wins?
SQL: SELECT COUNT("top_fives") FROM "sprint_cup_series" WHERE "year"='2010' AND "wins">0;

Question: What is the total number of wins when casey mears ranked 36th and had more than 0 top fives?
SQL: SELECT COUNT("wins") FROM "sprint_cup_series" WHERE "rank"='36th' AND "top_fives">0;

Question: What is the total number of top fives when casey mears had more than 1 poles and top tens less than 9?
SQL: SELECT SUM("top_fives") FROM "sprint_cup_series" WHERE "poles">1 AND "top_tens"<9;