CREATE TABLE "quarterbacks_sorted_by_win_percentage" (
  "quarterback" text,
  "games" real,
  "teams" text,
  "wins" real,
  "losses" real,
  "percent" real
);

Question: what is games when the losses is more than 1, percent is 0.5 and wins is 2?
SQL: SELECT "games" FROM "quarterbacks_sorted_by_win_percentage" WHERE "losses">1 AND "percent"=0.5 AND "wins"=2;

Question: what is the average wins when percent is more than 0.4 and teams is chargers~?
SQL: SELECT AVG("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "percent">0.4 AND "teams"='chargers~';

Question: What is the average wins when teams is lions and the percent is more than 0?
SQL: SELECT AVG("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "teams"='lions' AND "percent">0;

Question: what is the highest wins when the losses is less than 1, team is rams and the games is more than 8?
SQL: SELECT MAX("wins") FROM "quarterbacks_sorted_by_win_percentage" WHERE "losses"<1 AND "teams"='rams' AND "games">8;