title: MySQL AVG TIME giving weird behaviour
body: <p>I am getting confusing behaviour when performing AVG on a TIME(3) property.</p>
  
  <p>The query is as follows:</p>
  
  <pre><code>SELECT
      SEC_TO_TIME(STD(`duration`)) standard_deviation,
      SEC_TO_TIME(AVG(`duration`)) mean,
      MIN(`duration`) min,
      MAX(`duration`) max
  FROM `races`
  </code></pre>
  
  <p>Then the results are:</p>
  
  <p><a href="https://i.stack.imgur.com/bBbcx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bBbcx.png" alt="enter image description here"></a></p>
  
  <p>As you can see the <strong>mean</strong> is larger than the <strong>max</strong> value. How is this possible. Am I doing something wrong within the query ?</p>
  
  <p>The <code>duration</code> column is a <code>TIME(3)</code> column. Which represents the duration of the race.</p>