Is it possible to apply Group by clause on the result of this function

Hello,
I want to know if it’s possible to apply Group by clause on the result of this function.

select function(‘to_char’, u.createTs, ‘MM/YYYY’) from sec$User u
Suppose I use this query to obtain dates in Month and year format. Now I want to group them Monthwise. How can I write the query for the same?

Hi,
Try to use the following query:

select function(‘to_char’, u.createTs, ‘MM/YYYY’) from sec$User u order by function(‘to_char’, u.createTs, ‘MM/YYYY’)

Order by clause creates groups with the same months.

Hi,
Thanks for reply!
But Solution is not working for me. Order by clause is not creating groups.