title: SQL query find missing consecutive numbers
body: <p>I have the following data in a SQL Table:</p>
  
  <p><img src="https://i.stack.imgur.com/eps9X.png" alt="enter image description here"></p>
  
  <p>I need to query the data so I can get a list of missing "<strong>familyid</strong>" per employee.</p>
  
  <p>For example, I should get for Employee 1021 that is missing in the sequence the IDs: 2 and 5 and for Employee 1027 should get the missing numbers 1 and 6.</p>
  
  <p>Any clue on how to query that?</p>
  
  <p>Appreciate any help.</p>