human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Learner driver, Partner, Driver's Age, Years on learners, Licence test attempts, Passed Yet
###Question: What is the average number of years on learners of the drivers over the age of 24 with less than 0 attempts at the licence test?
gpt
SELECT AVG Years on learners FROM table WHERE Driver's Age > 24 AND Licence test attempts < 0