human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Year, Class, Team, Machine, Points, Rank, Wins
###Question: Which year had a team of Aprilia and a rank of 4th?
gpt
SELECT Year FROM table WHERE Team = aprilia AND Rank = 4th