Table: thai_games_medals_2
Columns: rank
province
gold
silver
bronze
total

Question: What is the rank of Si Sa Ket province with less than 14 bronze medals?
SQL: SELECT COUNT("rank") FROM thai_games_medals_2 WHERE "province" = 'si sa ket' AND "bronze" < 14

Question: How many total medals does rank 3 with less than 40 silver medals?
SQL: SELECT MAX("total") FROM thai_games_medals_2 WHERE "silver" < 40 AND "rank" = 3

Question: How many average gold medals for provinces higher than rank 9 with 25 bronzes?
SQL: SELECT AVG("gold") FROM thai_games_medals_2 WHERE "bronze" = 25 AND "rank" < 9