human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Rank, Nation, Gold, Silver, Bronze, Total
###Question: What is the average number of silver medals for countries with 0 gold and rank under 3?
gpt
SELECT AVG Silver FROM table WHERE Gold = 0 AND Rank < 3