user: ### NOW ANSWER:
Question: Which works number has a class of 15th and year of 1940?
Columns: ['Gauge', 'Railway', 'Class', 'Works no.', 'Year', 'Builder']
Types: ['text', 'text', 'text', 'text', 'text', 'text']
Sample row: ['3 ft 6 in', 'Rhodesia Railways', '15th', '6936–6939', '1940', 'Beyer, Peacock']
SQL:

assistant: SELECT "Works no." FROM "Table" WHERE "Class" = '15th' AND "Year" = '1940';