human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Rank, Player, Country, Earnings ( $ ), Events, Wins
###Question: How many events have earnings less than 1,030,717?
gpt
SELECT COUNT Events FROM table WHERE Earnings ( $ ) < 1,030,717