Joined: 04 Apr 2007 Posts: 37 Location: Lisbon, Portugal
Select cust_id, count(*)
group by cust_id
It will give you a list with the customer id's and the number of times they occur within the table.
Notice that this is a very expensive SQL statement. It has to perform a full table space scan in order to obtain the data.