title: Transform rows to comma delimited string by groups of n records
body: <p>Based on this sample table</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>NAME</th>
  <th>ZIP</th>
  <th>NTID</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Juan</td>
  <td>123</td>
  <td>H1</td>
  </tr>
  <tr>
  <td>1</td>
  <td>Juan</td>
  <td>123</td>
  <td>H2</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>456</td>
  <td>H3</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>456</td>
  <td>H4</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>456</td>
  <td>H5</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to show <code>ntid</code> as a comma separated value but in groups of maximum 2 items</p>
  <p>Expected result</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>NAME</th>
  <th>ZIP</th>
  <th>NTID</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>Juan</td>
  <td>123</td>
  <td>H1, H2</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>456</td>
  <td>H3, H4</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>456</td>
  <td>H5</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Using SQL Server, is there a way to achieve this?</p>
  <p>By using the <code>STRING_AGG</code> function it concatenates all in a single row, but I need to group as groups of maximum of 2 members.</p>
  <pre><code>SELECT ID, NAME, ZIP, STRING_AGG(NTID,',')
  FROM MyTable
  GROUP BY ID, NAME, ZIP
  </code></pre>