CREATE TABLE "the_open_championship_champions" (
  "year" real,
  "country" text,
  "course" text,
  "location" text,
  "total_score" text,
  "to_par_a" text
);

Question: What's the year with a score of 305?
SQL: SELECT MIN("year") FROM "the_open_championship_champions" WHERE "total_score"='305';

Question: What's the To par of St Andrews before the year 1888?
SQL: SELECT "to_par_a" FROM "the_open_championship_champions" WHERE "course"='st andrews' AND "year"<1888;

Question: What's the location that has a total of 149?
SQL: SELECT "location" FROM "the_open_championship_champions" WHERE "total_score"='149';