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 total number of medals when there are 18 gold medals?
gpt
SELECT SUM Total FROM table WHERE Gold = 18