CREATE TABLE "provinces" (
  "province" text,
  "provincial_capital" text,
  "largest_city" text,
  "area_km_2" real,
  "population_2013" real
);

Question: what is the largest city where the population is 6620100?
SQL: SELECT "largest_city" FROM "provinces" WHERE "population_2013"=6620100;

Question: what is the largest city where the province is eastern cape?
SQL: SELECT "largest_city" FROM "provinces" WHERE "province"='Eastern Cape';

Question: what is minimum area where the largest city is bloemfontein?
SQL: SELECT MIN("area_km_2") FROM "provinces" WHERE "largest_city"='Bloemfontein';

Question: what is the numbe of provincial captial where the population is 1162900?
SQL: SELECT COUNT("provincial_capital") FROM "provinces" WHERE "population_2013"=1162900;

Question: what is the number of provincial captial where the province is northern cape?
SQL: SELECT COUNT("provincial_capital") FROM "provinces" WHERE "province"='Northern Cape';