Table: thai_games_medals
Columns: rank
province
gold
silver
bronze
total

Question: What team had less than 291 total points whole having 76 bronze and over 21 gold?
SQL: SELECT SUM("silver") FROM thai_games_medals WHERE "gold" > 21 AND "bronze" = 76 AND "total" < 291

Question: What was the average rank for team with more than 44 gold, more and 76 bronze and a higher total than 73?
SQL: SELECT AVG("rank") FROM thai_games_medals WHERE "total" > 73 AND "gold" > 44 AND "bronze" > 76