count problem

Thedon123

Registered User.
Local time
Today, 14:50
Joined
Sep 11, 2002
Messages
98
I have records as below

a 1
b 1
c 1
a 2
b 2
a 3

i am trying to count the number of records for 1 and the number of records in 2 and the number of records in 3 separately.

How can i do this
 
use a GROUP BY clause in your query.
 
I'll expand a little:

Select SomeField, Count(*) as CountOfField
From YourTable
Group By SomeField;
 

Users who are viewing this thread

Back
Top Bottom