human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Name, Gain, Loss, Long, Avg/G
###Question: Which Avg/G has a Name of david allen, and a Gain larger than 371?
gpt
SELECT AVG Avg/G FROM table WHERE Name = david allen AND Gain > 371