Paul,
Try this:
select cycle, count(*) cnt ;
from mytable ;
group by cycle
HTH,
Chad
>Hi all,
>
>I have mytable that contained 1 field :
>
>cycle
>
>1 day
>2 days
>3 days
>4 days
>1 day
>2 days
>3 days
>1 day
>2 days
>
>How to select to get the counting of cycle field results like this:
>
>1 day (3 times)
>2 days (3 times)
>3 days (2 times)
>4 days (1 time)
>
>I have tried this but not worked yet :
>
>select sum(iif(cycle = '1 day',cycle,0) as n1day,sum(iif(cycle='2 days',cycle,0) as n2days,sum(iif(cycle='3 days',cycle,0) as n3days,
>sum(iif(cycle='4 days',cycle,0) as n4days from mytable
>
>
>TIA.
_________________________________
There are 2 types of people in the world: