Table: sea_2007_aquatics
Columns: rank
nation
gold
silver
bronze
total

Question: What is the average total with less than 8 bronze, 3 silver, and a Rank smaller than 2?
SQL: SELECT AVG("total") FROM sea_2007_aquatics WHERE "bronze" < 8 AND "silver" = 3 AND "rank" < 2

Question: What is the average Total with a Rank greater than 1, and a Bronze larger than 8?
SQL: SELECT AVG("total") FROM sea_2007_aquatics WHERE "rank" > 1 AND "bronze" > 8

Question: What is the smallest silver from Vietnam?
SQL: SELECT MIN("silver") FROM sea_2007_aquatics WHERE "nation" = 'vietnam'

Question: What is the largest silver from Malaysia with a Total smaller than 23?
SQL: SELECT MAX("silver") FROM sea_2007_aquatics WHERE "nation" = 'malaysia' AND "total" < 23

Question: What is the largest bronze with a Rank of 2, and a Gold smaller than 8?
SQL: SELECT MAX("bronze") FROM sea_2007_aquatics WHERE "rank" = 2 AND "gold" < 8

Question: How many ranks have a Bronze smaller than 8, and a Total smaller than 7, and a Gold smaller than 1?
SQL: SELECT COUNT("rank") FROM sea_2007_aquatics WHERE "bronze" < 8 AND "total" < 7 AND "gold" < 1