title: Identiy missing rows and calculate them in SQL
body: <p>I have the follwing data. Need to identify the missing rows and calculate the average</p>
  
  <p>LineNo Field1   Field2  Year    Average<br>
  1&emsp; France&emsp;Paris&emsp;2019&emsp;100&emsp;<br>
  2&emsp; France&emsp;Paris&emsp;2017&emsp;300&emsp;<br>
  3&emsp; France&emsp;Nice&emsp;2018&emsp;200&emsp;<br>
  4&emsp; Italy&emsp;       Rome&emsp;2019&emsp;50&emsp;<br>
  5&emsp; Italy&emsp; Rome&emsp;2018&emsp;500&emsp;<br>
  6&emsp; Italy&emsp; Rome    2017&emsp;250&emsp;<br></p>
  
  <p>Need to calculate the average for all years (2019,2018,2017). </p>
  
  <p>So  for France and Paris combination - Year 2018 is missing.<br>
  So for France and Nice - Year  2019 and 2017 is missing.
  For Italy and Rome combination, we have all records.</p>
  
  <p>So for missing combination need to calculate the average like below ( formula, sum/3 in all cases, irrespective of number of years present)</p>
  
  <p>The final data looks like below.</p>
  
  <p>LineNo  Field1  Field2  Year    Value<br>
  1&emsp; France&emsp;    Paris&emsp; 2019&emsp;100&emsp;<br>
  2&emsp; France&emsp;    Paris&emsp; 2017&emsp;300&emsp;<br>
  3&emsp; France&emsp;    Nice&emsp;  2017&emsp;200&emsp;<br>
  4&emsp; Italy&emsp; Rome&emsp;  2019&emsp;50&emsp;<br>
  5&emsp; Italy&emsp; Rome&emsp;  2018&emsp;500&emsp;<br>
  6&emsp; Italy&emsp; Rome&emsp;  2017&emsp;250&emsp;<br>
  *7&emsp;France&emsp;    Paris&emsp; 2018&emsp;133&emsp;<br>
  *8&emsp;France&emsp;    Nice&emsp;  2018&emsp;66&emsp;<br>
  *9&emsp;France&emsp;    Nice&emsp;  2019&emsp;66&emsp;<br></p>
  
  <p>Line 7,8,9 are the new ones</p>