title: Can't create materialized view with a join and group-by
body: <p>I'm trying to create a materialized view with a left outer join and a group by. </p>
  
  <p>I'm getting this error: </p>
  
  <blockquote>
    <p>Error report - ORA-12015: cannot create a fast refresh materialized
    view from a complex query
    12015. 00000 -  "cannot create a fast refresh materialized view from a complex query"</p>
    
    <p>Cause:    Neither ROWIDs and nor primary key constraints are supported for
               complex queries.</p>
    
    <p>Action:   Reissue the command with the REFRESH FORCE or REFRESH COMPLETE
               option or create a simple materialized view.</p>
  </blockquote>
  
  <p>The code: </p>
  
  <pre><code>CREATE MATERIALIZED VIEW CSPRD.MV_LLATTRDATA_MAX_VERSIONS
      PARALLEL 16
      USING INDEX 
      REFRESH 
      NEXT trunc(SYSDATE, 'hh') + 1/24      
      FAST 
      WITH ROWID 
      USING DEFAULT LOCAL ROLLBACK SEGMENT 
      ENABLE QUERY REWRITE 
      AS 
          SELECT /*+ PARALLEL(16) */ 
              AD.ID, 
              AD.DEFID, 
              AD.ATTRID,
              MAX(AD.VERNUM) MAX_VERNUM, 
              MAX(AD.DEFVERN) MAX_DEFVERN, 
              AD.ROWID, 
              DT.ROWID
          FROM  csprd.mv_llattrdata_shrunk_v1  AD, MV_DTREECORE_SHRUNK_V2 DT
          WHERE AD.ID = DT.DATAID(+)
          GROUP BY AD.ID, AD.DEFID, AD.ATTRID;
  </code></pre>