I tried many times by many ways but I cannot resolve this...
I'm performing an Oracle SQL query:
SELECT
TRUNC(months_between(sysdate, DateofBirth) / 12) AS "age"
FROM players
group by age
HAVING COUNT
(TRUNC(months_between(sysdate, DateofBirth) / 12)) > 30;
ERROR at line 4: ORA-00904: "AGE": invalid identifier
Any ideas?