title: How do i get datediff to work with min() max() on sql?
body: <p>Say I have this table:</p>
  
  <pre><code>                         EMPLOYEES
  ----------------------------------------------------------
  first    last        ID    hire         terminated    wage
  ------   ---------   ---   ----------   -----------   ----
  Ruth     Halburg     1     2010-05-15   2017-03-01    2000
  Sally    Hallson     2     2010-08-20   NULL          5000
  Merry    Hallway     3     2011-01-24   NULL          3000
  </code></pre>
  
  <p>and I need to get the difference in days between the max 'hire' date and min 'hire' date of employees still working in the company (terminated = NULL).</p>
  
  <p>I know I need to use something like </p>
  
  <pre><code>Select *, datediff(d, max(hire), min(hire) as Difference
  From Employees
  Where terminated = NULL
  </code></pre>
  
  <p>but i'm not sure how to get it to work.</p>