Hi Nikkos
Make sure you are running the most recent patch.
Try adding
WITH NOOJFLATTEN
to the end of the query.
Early last year I ran into a similar problem after upgrading to 11.0. The SQL statement had aggregates and a NOT IN (subquery). Removing a simple column made the problem go away. Changing NOT IN to a NOT EXISTS structure also worked around the bug.
A suggestion from the Support team also worked. Add
WITH NOOJFLATTEN
at the end of the query.
I fixed the issue with Patch P15516 which had a bunch of fixes for aggregate queries and subselects.
Regarding my test case, the Support team wrote: