title: ORA-24347: Warning of a NULL column in an aggregate function
body: <p>I'm getting this warning:</p>
  
  <pre><code>ORA-24347: Warning of a NULL column in an aggregate function
  </code></pre>
  
  <p>when using Oracle's <code>MAX()</code> function in production. I'm using the OCI library to connect to Oracle, version 11.2.0.2.</p>
  
  <p>But, on the testing server, this error is not coming. I've hard-coded the query in such way that a <code>NULL</code> value can be passed to an aggregate function. I still couldn't reproduce this issue.</p>
  
  <p>Is this warning related to any Oracle bug? Can anyone provide some example query which will throw this warning?</p>
  
  <p>Edit:</p>
  
  <pre><code>Table: EX_TABLE
  Columns:
  ID NOT NULL NUMBER
  SOME_NUMBER NUMBER
  MAX_VAL NUMBER
  </code></pre>
  
  <p>Query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select MAX(DECODE(some_number,1,max_val,NULL)) val1
       , MAX(DECODE(some_number,2,max_val,NULL)) val2
       , MAX(DECODE(some_number,3,max_val,NULL)) val3 
    from EX_TABLE
  </code></pre>