i need help with some sql. I have a table with 200,000 rows of data. one of the columns ref contains non unique values. I'm only interested in these rows if the ref values are not unique. If this is the case i'd like to know how many times they are being used.
i would expect my select statement to return just 2 values, namely ref and the number of times ref value was used in the table.