title: SQL Error code 1630 for SUM function in mysql
body: <p>The code I am trying is as follows:</p>
  
  <pre><code>SELECT CONCAT(D.DriverFirstName,' ',D.DriverLastName)AS'Full Name',
  SUM(T.EndOdometerKM-T.StartODometerKM) AS'Total KM Travelled'
  FROM DRIVER AS D, TRIP AS T
  WHERE D.DriverLicenceNum=T.DriverLicenceNum
  GROUP BY T.DriverLicenceNum
  HAVING SUM (T.EndOdometerKM-T.StartOdometerKM)&gt;1000
  ORDER BY SUM (T.EndOdometerKM-T.StartOdometerKM)ASC;
  </code></pre>
  
  <p>However, I receive this error message: </p>
  
  <pre><code>#1630 - FUNCTION dbname.SUM does not exist.
  </code></pre>
  
  <p>According to other posts, the problem is usually whitespace between the function and parentheses <code>(SUM (code))</code> as opposed to <code>(SUM(code))</code>, yet my problem still persists without the whitespace.</p>