Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
### Context:
CREATE TABLE table_name_16 (attendance INTEGER, record VARCHAR)
### Question:
What was the average attendance of a team with a 38–31–8 record?
### Answer:
SELECT AVG(attendance) FROM table_name_16 WHERE record = "38–31–8"