title: Generating increment identifiers for group of sequence values
body: <p>In SQL:
  I have a table similar to this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Name</th>
  <th>Room</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>John</td>
  <td>A</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>A</td>
  </tr>
  <tr>
  <td>3</td>
  <td>John</td>
  <td>B</td>
  </tr>
  <tr>
  <td>4</td>
  <td>John</td>
  <td>A</td>
  </tr>
  <tr>
  <td>5</td>
  <td>John</td>
  <td>C</td>
  </tr>
  <tr>
  <td>6</td>
  <td>John</td>
  <td>C</td>
  </tr>
  <tr>
  <td>7</td>
  <td>Nick</td>
  <td>C</td>
  </tr>
  <tr>
  <td>8</td>
  <td>Nick</td>
  <td>B</td>
  </tr>
  <tr>
  <td>9</td>
  <td>Nick</td>
  <td>B</td>
  </tr>
  <tr>
  <td>10</td>
  <td>Nick</td>
  <td>A</td>
  </tr>
  <tr>
  <td>11</td>
  <td>Nick</td>
  <td>A</td>
  </tr>
  <tr>
  <td>12</td>
  <td>Nick</td>
  <td>B</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need to create an auto increasing <code>ID</code> where it follows the order of two columns <code>Name</code> and <code>Room</code>. If the order changes, the number increases.</p>
  <p>The result should be something like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ID</th>
  <th>Name</th>
  <th>Room</th>
  <th>New ID</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>John</td>
  <td>A</td>
  <td>1</td>
  </tr>
  <tr>
  <td>2</td>
  <td>John</td>
  <td>A</td>
  <td>1</td>
  </tr>
  <tr>
  <td>3</td>
  <td>John</td>
  <td>B</td>
  <td>2</td>
  </tr>
  <tr>
  <td>4</td>
  <td>John</td>
  <td>A</td>
  <td>3</td>
  </tr>
  <tr>
  <td>5</td>
  <td>John</td>
  <td>C</td>
  <td>4</td>
  </tr>
  <tr>
  <td>6</td>
  <td>John</td>
  <td>C</td>
  <td>4</td>
  </tr>
  <tr>
  <td>7</td>
  <td>Nick</td>
  <td>C</td>
  <td>5</td>
  </tr>
  <tr>
  <td>8</td>
  <td>Nick</td>
  <td>B</td>
  <td>6</td>
  </tr>
  <tr>
  <td>9</td>
  <td>Nick</td>
  <td>B</td>
  <td>6</td>
  </tr>
  <tr>
  <td>10</td>
  <td>Nick</td>
  <td>A</td>
  <td>7</td>
  </tr>
  <tr>
  <td>11</td>
  <td>Nick</td>
  <td>A</td>
  <td>7</td>
  </tr>
  <tr>
  <td>12</td>
  <td>Nick</td>
  <td>B</td>
  <td>8</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Could you please help?</p>