CREATE TABLE "liberal_democrat_targets" (
  "rank" real,
  "constituency" text,
  "winning_party_2007" text,
  "swing_to_gain" real,
  "ld_s_place_2007" text,
  "result" text
);

Question: what is the constituency when the swing to gain is less than 4.16, the winning party 2007 is snp and ld's place 2007 is 2nd?
SQL: SELECT "constituency" FROM "liberal_democrat_targets" WHERE "swing_to_gain"<4.16 AND "winning_party_2007"='snp' AND "ld_s_place_2007"='2nd';

Question: how many times is the constituency edinburgh northern and leith?
SQL: SELECT COUNT("swing_to_gain") FROM "liberal_democrat_targets" WHERE "constituency"='edinburgh northern and leith';

Question: what is the constituency when the rank is less than 5 and the result is con hold?
SQL: SELECT "constituency" FROM "liberal_democrat_targets" WHERE "rank"<5 AND "result"='con hold';

Question: what is the lowest rank when the constituency is edinburgh northern and leith and the swing to gain is less than 4.16?
SQL: SELECT MIN("rank") FROM "liberal_democrat_targets" WHERE "constituency"='edinburgh northern and leith' AND "swing_to_gain"<4.16;