CREATE TABLE table_name_40 (total INT, gold VARCHAR, rank VARCHAR)

What is the highest total number of medals for a team ranked smaller than 1 and had 20 gold medals?
SELECT MAX(total) FROM table_name_40 WHERE gold = 20 AND rank < 1
SELECT MAX("total") FROM "table_name_40" WHERE "gold" = 20 AND "rank" < 1