CREATE TABLE table_name_40 (average NUMBER, tally VARCHAR2, total VARCHAR2)

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