Simple SQL statement -


i've been over-thinking much. let's have table test(refnum varchar(5))

    |refnum|     --------     | 12345|     | 56873|     | 63423|     | 12345|     | 56873|     | 12345| 

i want "view" along lines of this

    |refnum| count|     ---------------     | 12345|   3  |     | 56873|   2  | 

so requirements count each refnum has > 1. i'm having little trouble wrapping head around one. thank in advance help.

unless missing something, looks simple

select refnum, count(*) test group refnum having count(*) > 1 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -