human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Team, Games Played, Wins, Losses, Ties, Goals For, Goals Against
###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?
gpt
SELECT AVG Ties FROM table WHERE Wins < 5 AND Goals Against > 37 AND Games Played < 8