Table: fiba_cocaba_medals
Columns: rank
gold
silver
bronze
total

Question: What is the total medals for nation with more than 0 silvers and more than 0 golds?
SQL: SELECT AVG("total") FROM fiba_cocaba_medals WHERE "silver" > 0 AND "gold" > 0

Question: What is the fewest gold medals for a team with fewer than 1 silver, more than 1 bronze and a total less than 4?
SQL: SELECT MIN("gold") FROM fiba_cocaba_medals WHERE "silver" < 1 AND "total" < 4 AND "bronze" > 1

Question: What is the smallest rank when there are fewer than 1 silver, 4 golds and less than 0 bronze?
SQL: SELECT MIN("rank") FROM fiba_cocaba_medals WHERE "silver" < 1 AND "gold" = 4 AND "bronze" < 0

Question: How many gold medals for a nation with rank less than 5, more than 0 silvers and a total of 2 medals?
SQL: SELECT AVG("gold") FROM fiba_cocaba_medals WHERE "rank" < 5 AND "silver" > 0 AND "total" = 2

Question: What is the total for the team with more than 2 golds and more than 0 bronze?
SQL: SELECT SUM("total") FROM fiba_cocaba_medals WHERE "gold" > 2 AND "bronze" > 0