For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
CREATE TABLE table_name_21 (ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR)
SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE table_name_21 (ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR) Question: For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties? [/INST] SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8 </s>