|
Posted by Ronnie Chee on 05/03/06 19:52
"David" <david.goodyear@gmail.com> wrote in message
news:1146673034.443139.173600@j33g2000cwa.googlegroups.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.
Navigation:
[Reply to this message]
|