Table: wales_election_2011_2
Columns: rank
constituency
winning_party_2007
swing_to_gain
ld_s_place_2007
result

Question: I want the constituency which has a swing to gain less than 6.05 and a rank of 2
SQL: SELECT "constituency" FROM wales_election_2011_2 WHERE "swing_to_gain" < 6.05 AND "rank" = 2

Question: Name the winning party 2007 for result of labour hold and swing to gain less than 7.11 for wrexham
SQL: SELECT "winning_party_2007" FROM wales_election_2011_2 WHERE "result" = 'labour hold' AND "swing_to_gain" < 7.11 AND "constituency" = 'wrexham'

Question: Name the total number of swing to gain with rank more than 1 and LD's place 2007 of 2nd for labour winning party of 2007
SQL: SELECT COUNT("swing_to_gain") FROM wales_election_2011_2 WHERE "rank" > 1 AND "ld_s_place_2007" = '2nd' AND "winning_party_2007" = 'labour'