title: Db2 select query with group by clause throws error?
body: <p>I want to get Distinct values of <code>SERIAL_NUM</code> and <code>EMP_NAME</code> but the below query throws an error.</p>
  
  <pre><code>SELECT SERIAL_NUM,EMP_NAME,NOTESID FROM DB2INST1.EMP_HC 
  GROUP BY 
  SERIAL_NUM,EMP_NAME,NOTESID 
  HAVING   
  FUNC_VP ='Bob '  AND 
  VICE_PRES ='Bob'  AND 
  DIRECTOR ='Michael'  AND 
  THIRD_LINE ='Linda ' 
  </code></pre>
  
  <p>error</p>
  
  <p><code>DB2 SQL Error: SQLCODE=-119, SQLSTATE=42803, SQLERRMC=FUNC_VP, DRIVER=3.63.123</code></p>