"David" <da************@gmail.com> wrote in message

news:11**********************@j33g2000cwa.googlegr oups.com...

Hi, I have a table that for ease has this data in:

R1, R2, R....z

---------------------

A | 12

A | 22

A | 30

B | 0

B | -1

B | -3

C | 100

I want to generate a table for each distinct row in R1, gives a count

of all the rows with data corresponding

For the above table I would get

A | 3

B | 3

C | 1

Im probably being stupid but cannot see this at the moment... please

help.

Thanks

Look at the "GROUP BY" clause.