Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number of matched values

Status
Not open for further replies.

wdbouk

Technical User
May 28, 2003
81
CA
Hi all,

I will start with an example:

I have a column A consisting of ID numbers . I want to count the number of times each ID number is mentioned.
For example

ID

ABC
ABC
XYZ
a123
a123
a123
then ABC should =2,XYZ=1,a123=3.
Any help of how to do it?
thx
 
Try this
Code:
Select ID, Count(*) As [NumberOfIDs]

From tbl

GROUP BY ID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top