title: SQL - How to SUM column with date range
body: <p>This is my first select. Name it as A</p>
  
  <pre><code>EMPLID    DATE       TIMEIN    GRACEPERIOD    NUMBER_OF_LATE
  ------    --------   ------    -----------    --------------
  000001    1/1/2017   8:16      8:15                        1
  000001    1/2/2017   8:25      8:15                        1
  000001    1/3/2017   8:10      8:15                        1
  000002    1/1/2017   8:30      8:15                        1
  000002    1/2/2017   8:14      8:15                        0
  000002    1/3/2017   8:23      8:15                        1
  </code></pre>
  
  <p>The result of sum should be like  this:</p>
  
  <pre><code>EMPLID    DATE                    NUMBER_OF_LATE
  ------    -------------------     --------------
  000001    1/1/2017 - 1/3/2017                  3
  000002    1/1/2017 - 1/3/2017                  2
  </code></pre>
  
  <p>I just want to group by EMPLID and will sum based on Date Range.</p>