title: Get duplicate values from mySQL using GROUP BY
body: <p>I want to get the count of p1 which r1 having</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>R1</th>
  <th>P1</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>RC1</td>
  <td>PC1</td>
  </tr>
  <tr>
  <td>RC1</td>
  <td>PC1</td>
  </tr>
  <tr>
  <td>RC2</td>
  <td>PC2</td>
  </tr>
  <tr>
  <td>RC1</td>
  <td>PC3</td>
  </tr>
  <tr>
  <td>RC1</td>
  <td>PC3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to get the result like bellow</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>R1</th>
  <th>count(P1)</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>RC1</td>
  <td>2</td>
  </tr>
  <tr>
  <td>RC2</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Can anyone please help to write MySQL query to get this?</p>