CREATE TABLE "by_county" (
  "county" text,
  "obamapct" text,
  "obamanum" real,
  "mc_cainpct" text,
  "mc_cainnum" real,
  "total" real
);

Question: How many votes did McCain get in the county where Obama got 50.7% of the votes?
SQL: SELECT MAX("mc_cainnum") FROM "by_county" WHERE "obamapct"='50.7%';

Question: Where did McCain get 20226 votes?
SQL: SELECT "county" FROM "by_county" WHERE "mc_cainnum"=20226;

Question: How many people voted in Cabarrus county?
SQL: SELECT MIN("total") FROM "by_county" WHERE "county"='Cabarrus';

Question: How many different results were there for the number of votes fro Obama in the county where he got 27.8% of the votes?
SQL: SELECT COUNT("obamanum") FROM "by_county" WHERE "obamapct"='27.8%';