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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -