Table: gymnastics_champs
Columns: rank
nation
gold
silver
bronze
total

Question: How many bronze medals did the nation have that had less than 3 silver, 5 gold and ranked better than 31?
SQL: SELECT SUM("bronze") FROM gymnastics_champs WHERE "silver" < 3 AND "rank" < 31 AND "gold" = 5

Question: What's the bronze medal count of Spain that has less than 39 Gold, 3 silver, and a rank better than 35?
SQL: SELECT "bronze" FROM gymnastics_champs WHERE "gold" < 39 AND "silver" = 3 AND "rank" < 35 AND "nation" = 'spain'

Question: What's the total amount of USSR that has more than 0 gold, less than 85 silver and more than 6 bronze?
SQL: SELECT MIN("total") FROM gymnastics_champs WHERE "gold" > 0 AND "bronze" > 6 AND "nation" = 'ussr' AND "silver" < 85

Question: What's the lowest bronze medal amount that has fewer than 0 gold?
SQL: SELECT MIN("bronze") FROM gymnastics_champs WHERE "gold" < 0

Question: What's the total amount of Bulgaria that has more than 13 bronze?
SQL: SELECT SUM("total") FROM gymnastics_champs WHERE "nation" = 'bulgaria' AND "bronze" > 13