I am trying to make a stored proc that will count the number of times each company comes up. Here is an example of my data set.
Company | ID
1 25
1 25
2 26
3 27
3 27
3 27
I want the final result of the query to be :
Company | count
1 2
2 1
3 3
Is this possible in SQL?
Thanks in advance!
Company | ID
1 25
1 25
2 26
3 27
3 27
3 27
I want the final result of the query to be :
Company | count
1 2
2 1
3 3
Is this possible in SQL?
Thanks in advance!