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 number of losses when the goal difference was -8, and position is smaller than 10?
gpt
SELECT COUNT Losses FROM table WHERE Goal Difference = -8 AND Position < 10