CREATE TABLE "competitive_history" (
  "year" real,
  "competition_description" text,
  "location" text,
  "apparatus" text,
  "rank_final" real,
  "score_final" real,
  "rank_qualifying" real,
  "score_qualifying" real
);

Question: Count the Rank-Final which has a Year larger than 2008, and an Apparatus of balance beam, and a Rank-Qualifying larger than 4?
SQL: SELECT COUNT("rank_final") FROM "competitive_history" WHERE "year">2008 AND "apparatus"='balance beam' AND "rank_qualifying">4;

Question: Which the lowest Score-Fina has a Rank-Final of 7 and a Year larger than 2009?
SQL: SELECT MIN("score_final") FROM "competitive_history" WHERE "rank_final"=7 AND "year">2009;

Question: Name the Year with a Rank-Final smaller than 2, an Apparatus of team, and a Score-Qualifying smaller than 248.275?
SQL: SELECT AVG("year") FROM "competitive_history" WHERE "rank_final"<2 AND "apparatus"='team' AND "score_qualifying"<248.275;