Table: pan_athletics_2007
Columns: rank
nation
gold
silver
bronze
total

Question: How many bronzes have a Nation of jamaica (jam), and a Total smaller than 7?
SQL: SELECT COUNT("bronze") FROM pan_athletics_2007 WHERE "nation" = 'jamaica (jam)' AND "total" < 7

Question: What is the average silver with more than 0 gold, a Rank of 1, and a Total smaller than 30?
SQL: SELECT AVG("silver") FROM pan_athletics_2007 WHERE "gold" > 0 AND "rank" = '1' AND "total" < 30

Question: What is the total gold with a total less than 1?
SQL: SELECT SUM("gold") FROM pan_athletics_2007 WHERE "total" < 1