CREATE TABLE table_name_21 (total VARCHAR(255), silver VARCHAR(255), gold VARCHAR(255))
How many totals have a Silver of 40, and a Gold smaller than 39?
    
SQL: SELECT COUNT(total) FROM table_name_21 WHERE silver = 40 AND gold < 39