CREATE TABLE table_name_40 (average INT, tally VARCHAR, total VARCHAR)

Name the average with tally of 0-29 and total more than 29
SELECT AVG(average) FROM table_name_40 WHERE tally = "0-29" AND total > 29
SELECT AVG("average") FROM "table_name_40" WHERE "0-29" = "tally" AND "total" > 29