why group function is not allowed in group by clause
Posted: Sun Dec 20, 2009 5:05 pm
Hello,
i want to know why group function is not allowed in group by clause.
select to_char(hiredate,'yyyy')
from emp
group by to_char(hiredate,'yyyy');
I need equivalent query in db2 .(to select recruited year in a organisation )
i want to know why group function is not allowed in group by clause.
select to_char(hiredate,'yyyy')
from emp
group by to_char(hiredate,'yyyy');
I need equivalent query in db2 .(to select recruited year in a organisation )