title: Group by returning null
body: <p>I have a simple sql that is not returning the correct values in the correct format.  The data is a follows:</p>
  
  <pre><code>Emp    Date          totaltime
   15   2017-01-25      05:18:35
   15   2017-01-25      04:51:03
   31   2017-01-25      05:33:22
   31   2017-01-25      03:31:36
   33   2017-01-25      04:35:06
   33   2017-01-25      04:22:24
  </code></pre>
  
  <p>I have the following sql statement:</p>
  
  <pre><code>select emp_num, TIME_FORMAT(sum(TotalTime),'%H:%i:%s')
   from pr_hours  
   where date='2017-01-25' 
   group by emp_num
  </code></pre>
  
  <p>I get the following results:</p>
  
  <pre><code>Emp_num +   TIME_FORMAT(sum(TotalTime), '%H:%i:%s') '
   15     +   NULL
   31     +   NULL 
   33     +   08:57:30
  </code></pre>
  
  <p>I have tried a variations of the above sql with mix results but none with the correct data. </p>
  
  <p>This is a simple sql statement and should not be this time consuming, so please point me in the correct direction.</p>