title: Find Missing Dates in Data
body: <p>I receive a daily txt file of data from multiple antennas. The naming convention for the files is: </p>
  
  <p><em>Unique Antenna ID + year + month + day + Random 3 digit number</em></p>
  
  <p>I parsed the file names and created a table like this one:</p>
  
  <pre><code>AntennaID    fileyear    filemonth    fileday    filenumber     filename
  0000         2016        09           22         459            000020160922459.txt
  0000         2016        09           21         981            000020160921981.txt
  0000         2016        09           20         762            000020160920762.txt
  0001         2016        09           22         635            000120160922635.txt
  .
  .
  .
  etc. (200k rows)
  </code></pre>
  
  <p>Sometimes the antennas send either more than 1 file or no file at all. The unique 3 digit filenumber distinguishes the files if more than 1 gets sent, however I'm trying to find the days when a file wasn't sent. </p>
  
  <p>I've tried a couple groupby statements to compare the amount of datafiles in a given month and to see if it matches up w/ the days in that month - but the problem is sometimes the antennas send more than 1 file per day which could artificially make up for a "missing" file if we're just comparing the count. </p>
  
  <p>I'm seeking a more robust method for finding the dates or date ranges for the missing files. I've looked into the Partition and Over functions and feel as there might be potential there, but I'm unsure as to how to use them as I'm fairly new to SQL.</p>
  
  <p>I'm using Microsoft SQL Server 2016</p>