human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Year, Competition, Wins, Draws, Loses
###Question: What average Year has Losses 4, and Wins less than 18, and Draws greater than 1?
gpt
SELECT AVG Year FROM table WHERE Loses = 4 AND Wins < 18 AND Draws > 1