Table: tv_station_rating_history
Columns: tv_station_operator
2005
2006
2007
2008
2009
2010
2011_1h

Question: What's the 2008 that has 3.4 in 2009 and more than 2.9 in 2005?
SQL: SELECT MAX("2008") FROM tv_station_rating_history WHERE "2009" = 3.4 AND "2005" > 2.9

Question: What's the 2006 if there's less than 6.7 in 2007 and less than 3.4 in 2009?
SQL: SELECT SUM("2006") FROM tv_station_rating_history WHERE "2007" < 6.7 AND "2009" < 3.4

Question: What's the total in 2005 if there's more than 10.2 in 2006, less than 29.5 in 2007, more than 4.9 in 2009 and less than 43.8 in 2010?
SQL: SELECT COUNT("2005") FROM tv_station_rating_history WHERE "2010" < 43.8 AND "2007" < 29.5 AND "2009" > 4.9 AND "2006" > 10.2

Question: What is the 2009 when there's 11.8 in 2005 and less than 12.6 in 2006?
SQL: SELECT MIN("2009") FROM tv_station_rating_history WHERE "2005" = 11.8 AND "2006" < 12.6

Question: What's the 2005 of TV3 when there is less than 42 in 2007 and less than 29.5 in 2010?
SQL: SELECT MAX("2005") FROM tv_station_rating_history WHERE "2007" < 42 AND "tv_station_operator" = 'tv3' AND "2010" < 29.5