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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL to count the number of instances each time a certian value appears

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi I have a tbl
that contains a field called admin

This coloum has A unique name that can appear a number of times

What I want to do is return the Nummber of times each name appears and the name

ie

Name time

me 5
you 6
them 5


Many Thanks
paul@formz.co.uk

 
select name, count(name) from mytable group by name;

is that what you want? I tried to remain child-like, all I acheived was childish.
 
Solved it my self


SELECT ADMIN , COUNT(ADMIN) as times
FROM TBL_XXXXX
GROUP BY ADMIN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top