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 more than 0 ties and goals against of 37, how many wins were tallied?
gpt
SELECT MAX Wins FROM table WHERE Goals Against = 37 AND Ties > 0