title: Find date gap between two events based on other column condition
body: <p>I have a Dataset like below :</p>
  <p>How can I find  the time gap by day between the first hire date and terminated date  for each employee No and show the result within a new column called FinalTenure in front of the terminated value row and leave other if condition not true as null ?</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>employee No</th>
  <th>Event date</th>
  <th>Event Description</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>102</td>
  <td>2021-10-12</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>103</td>
  <td>2021-11-02</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>102</td>
  <td>2022-01-01</td>
  <td>Terminated</td>
  </tr>
  <tr>
  <td>102</td>
  <td>2021-12-12</td>
  <td>Shift Change</td>
  </tr>
  <tr>
  <td>101</td>
  <td>2021-12-03</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>103</td>
  <td>2021-11-05</td>
  <td>Terminated</td>
  </tr>
  <tr>
  <td>101</td>
  <td>2021-12-04</td>
  <td>Terminated</td>
  </tr>
  <tr>
  <td>105</td>
  <td>2022-02-26</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>106</td>
  <td>2022-02-26</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>102</td>
  <td>2022-03-29</td>
  <td>Second Hire</td>
  </tr>
  <tr>
  <td>107</td>
  <td>2021-05-04</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>108</td>
  <td>2022-04-04</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>109</td>
  <td>2022-03-03</td>
  <td>Terminated</td>
  </tr>
  <tr>
  <td>109</td>
  <td>2021-12-29</td>
  <td>First Hire</td>
  </tr>
  <tr>
  <td>109</td>
  <td>2022-04-01</td>
  <td>Second Hire</td>
  </tr>
  <tr>
  <td>109</td>
  <td>2022-01-10</td>
  <td>Shift Change</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Using window function is preferable .Thank you in advance.</p>