I have a table like this:
HOST_ID SCSI_LUN_ID
92 1
92 1
92 1
80 1
80 17
76 462
76 331
76 464
10 3
10 3
I need a quick sql help that can create output like this:
HOST_ID HOST_ID_COUNT
92 3
80 2
76 3
10 2
Basically, I want to count all distinct HOST_IDs.
Thanks.
(Using MS Sql Server if that matters)
1 Answer