CREATE TABLE "by_seasons_and_teams" (
  "season" text,
  "races" real,
  "wins" real,
  "podiums" real,
  "poles" real,
  "fastest_laps" real
);

Question: What is the total number of races in the 2006 season with 0 poles and more than 0 podiums?
SQL: SELECT COUNT("races") FROM "by_seasons_and_teams" WHERE "poles"=0 AND "season"='2006' AND "podiums">0;

Question: What is the highest number of the fastest laps when there were 0 poles, more than 2 podiums, and more than 15 races?
SQL: SELECT MAX("fastest_laps") FROM "by_seasons_and_teams" WHERE "poles"=0 AND "races">15 AND "podiums">2;

Question: What is the total number of races when there was more than 1 pole, and the fastest number of laps was less than 4?
SQL: SELECT SUM("races") FROM "by_seasons_and_teams" WHERE "poles">1 AND "fastest_laps"<4;

Question: What was the average number of fastest laps with less than 0 poles?
SQL: SELECT AVG("fastest_laps") FROM "by_seasons_and_teams" WHERE "poles"<0;

Question: What is the smallest number of poles when the fastest laps are less than 0?
SQL: SELECT MIN("poles") FROM "by_seasons_and_teams" WHERE "fastest_laps"<0;

Question: What is the total number of wins in the 2007 season when the fastest laps is 0, there are less than 0 podiums, and there are less than 16 races?
SQL: SELECT SUM("wins") FROM "by_seasons_and_teams" WHERE "fastest_laps"=0 AND "races"<16 AND "season"='2007' AND "podiums"<0;