CREATE TABLE table_58831 ("Rank" TEXT, "Nation" TEXT, "Gold" FLOAT, "Silver" FLOAT, "Bronze" FLOAT, "Total" FLOAT)

What is the average number of gold medals won by Brazil for entries with more than 1 bronze medal but a total smaller than 4?
SELECT AVG("Gold") FROM table_58831 WHERE "Total" < '4' AND "Nation" = 'brazil' AND "Bronze" > '1'
SELECT AVG("Gold") FROM "table_58831" WHERE "Bronze" > '1' AND "Nation" = 'brazil' AND "Total" < '4'