Context: CREATE TABLE table_name_40 (opponent VARCHAR, record VARCHAR)
Question: Who was the opponent when the record was 31-24?
Answer: SELECT opponent FROM table_name_40 WHERE record = "31-24"