Table: lancashire_election_2009
Columns: party
burnley
chorley
fylde
hyndburn
lancaster
pendle
preston
ribble_valley
rossendale
south_ribble
west_lancashire
wyre
total

Question: What is the lowest Chorley with a 6 Preston and a 4 for West Lancashire?
SQL: SELECT MIN("chorley") FROM lancashire_election_2009 WHERE "preston" = 6 AND "west_lancashire" < 4

Question: What is the average rating for a Flyde that has a Burnley less than 0?
SQL: SELECT AVG("fylde") FROM lancashire_election_2009 WHERE "burnley" < 0

Question: What is the highest rated West Lancashire with a Pendle greater than 1 and a Rossendale more than 2?
SQL: SELECT MAX("west_lancashire") FROM lancashire_election_2009 WHERE "pendle" > 1 AND "rossendale" > 2

Question: What was the average Chorley for the Labour party that had a Rossendale greater than 0 and a Pendle less than 1?
SQL: SELECT AVG("chorley") FROM lancashire_election_2009 WHERE "rossendale" > 0 AND "party" = 'labour' AND "pendle" < 1