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 highest amount of goals with more than 51 goals against and less than 30 played?
gpt
SELECT MAX Goals for FROM table WHERE Goals against > 51 AND Played < 30