title: SQL query to count number of rows with same value
body: <p>I have this table data: </p>
  
  <p><a href="https://i.stack.imgur.com/A9IN2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A9IN2.png" alt="enter image description here"></a></p>
  
  <p>I want to perform an sql query which will give me the total number of distinct loan applications per city. </p>
  
  <p>So for example, I would expect this output</p>
  
  <pre><code>City Wexford
  Loans 1
  
  City Waterford 1 
  Loans 1
  
  City Galway
  Loans 3
  </code></pre>
  
  <p>Any idea what kind of query I need to perform to get the count of distinct loans for each city? </p>