Question: How many total medals does rank 3 with less than 40 silver medals?
SQL: SELECT MAX Total FROM table WHERE Silver < 40 AND Rank = 3