I am working on a query that uses a user defined function in a group by clause.

select myfunction (datecolumn)
         ,count(*)
from    table
group by myfunction (datecolumn)

Executing the query gives the error "The SELECT list of a group query contains at least one invalid expression."

When I replace myfunction (user defined function) with a DATE function which comes standard with Derby, the query works.

All help is greatly appreciated.

Kim