
-- group_by_malformed.sql
-- this works in oracle < 11.2.0.2
-- it works only due to bug 9477688 which was fixed in 11.2.0.2
-- the _fix_control is missing in the patch
-- __fix_control can be added with patch #10624168

select count(*)
from
(
   select   *
   from  (
      select   dummy
         , count(*)    countsum
      from  dual
      group by dummy
   )
   group by dummy
)
/

