title: Mysql increment value in one row each time it reads the same value in another row
body: <p>Lets say i have a table called customer_order:</p>
  
  <pre><code>id|    cust#|    counter 
   1    1        1
   2    2        1 
   3    1        2 
   4    3        1
   5    2        2
   6    1        3 
  </code></pre>
  
  <p>So the idea is, every time a customer (cust#) repeats, you want to increment counter as demonstrated above.I need to do this in the SELECT statement while quering data. I am using Pentaho kettle to query data from a database. How can i achieve this?</p>
  
  <p>Thank you.   </p>