title: Count how many id share the same identical multiple value
body: <p>Despite research i maked to find the answer in Stack on advised article i cannot find a way to make this query.</p>
  <p>I want to know how many distinct ids share the same group of value (brand, category, start_date and end_date)</p>
  <p><strong>table1:</strong></p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>brand</th>
  <th>category</th>
  <th>start_date</th>
  <th>end_date</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Xy-eee2</td>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  </tr>
  <tr>
  <td>Xd-FF456</td>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  </tr>
  <tr>
  <td>Xy-234</td>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  </tr>
  <tr>
  <td>Xd-345</td>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  </tr>
  <tr>
  <td>Xy-eee2</td>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  </tr>
  <tr>
  <td>Xd-FFF21</td>
  <td>venus</td>
  <td>beta</td>
  <td>20/03/2021</td>
  <td>25/04/2021</td>
  </tr>
  <tr>
  <td>Xy-eee2</td>
  <td>venus</td>
  <td>beta</td>
  <td>20/03/2021</td>
  <td>25/04/2021</td>
  </tr>
  <tr>
  <td>Xd-FF23</td>
  <td>venus</td>
  <td>beta</td>
  <td>20/03/2021</td>
  <td>25/04/2021</td>
  </tr>
  <tr>
  <td>Xd-FF45</td>
  <td>mars</td>
  <td>beta</td>
  <td>01/03/2022</td>
  <td>06/08/2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Expected result :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>brand</th>
  <th>category</th>
  <th>start_date</th>
  <th>end_date</th>
  <th>number_of_distinct_id_matching</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>mercury</td>
  <td>alpha</td>
  <td>05/12/2021</td>
  <td>16/12/2021</td>
  <td>5</td>
  </tr>
  <tr>
  <td>venus</td>
  <td>beta</td>
  <td>20/03/2021</td>
  <td>25/04/2021</td>
  <td>3</td>
  </tr>
  <tr>
  <td>mars</td>
  <td>beta</td>
  <td>01/03/2022</td>
  <td>06/08/2021</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>