title: Oracle result without group by
body: <p>I'm running below query on Oracle Exadata.</p>
  
  <blockquote>
    <p>Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic
    Storage Management, OLAP, Data Mining and Real Application Testing
    options</p>
  </blockquote>
  
  <pre><code>select sum (t.sum_edw_trx_cnt) 
    from ( 
           select max(x.edw_trx_cnt)sum_edw_trx_cnt, 
                  x.prctr_cell_nbr
             from p_prctr_smpl_pf_sp3 x
            where  mdld_prctr_flg = 'Y'
         )t;
  </code></pre>
  
  <p>I was expecting oracle to return an error since - As you can see there's no <code>group by</code> clause in the inner query “t” and I was expecting this query to fail.</p>
  
  <p>There are millions of records and for each <code>prctr_cell_nbr</code> I want max count and then outer query should sum up max counts for every <code>prctr_cell</code>.
  It's a simple query.
  However, query runs and returns the output of <code>112</code> which is max count from the inner query.</p>
  
  <p>I'm puzzled by this behavior since this is not the correct result returned by query. I don't think this is a known behavior, has anyone seen this recently ?</p>
  
  <p>Thanks</p>