Need help: Count on unique entries:

Clut

Registered User.
Local time
Today, 00:29
Joined
May 5, 2010
Messages
29
Hi,

I have a table containing some data, simplified here for ease of explaination:

Name : Sex
Alan : Male
Diane : Female
Bob : Male
Kate : Female
Alan : Male

I want to pull out a list of unique names, how often each name appears, followed by whatever other data I have in the table, so I want the results to look like the following:

Alan : 2 : Male
Diane : 1 : Female
Bob : 1 : Male
Kate : 1 : Female

Can anyone help with the SQL to do this?

Thanks
 
I experimented with the totals columns.. but when I used the COUNT function, it just returned 5 (the total number of rows in the first example table above).

How do I get it to perform a count within each of the unique entiries in the column instead of just counting the entire column?
 
Try adding your name field again as a group by
 

Users who are viewing this thread

Back
Top Bottom