human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Position, Club, Played, Points, Wins, Draws, Losses, Goals for, Goals against, Goal Difference
###Question: What is the average goal difference with 51 goals scored against and less than 17 losses?
gpt
SELECT AVG Goal Difference FROM table WHERE Goals against = 51 AND Losses < 17