counter in a Sql statement
559353Feb 7 2007 — edited Feb 8 2007Hi,
Given a column payment_type, where payment type varies, I need to count each time when the value of the payment_type changes and display the total count in the end.
For example,
payment_typ is 1 1 2 2 2 2 2 3 3 3 3 3 4. Total count should be 3. I need to traverse the values, capture the change and increment the counter.
Any help is appreciated.
Thanks