>In my table"dly" have fileds "code,date,cat" In cat filed I am inserintg "A" ,"P"
>I want to count the records If:
>When a "code" with "date" have 6 "A" How to count this like this
>
>code date cat
>111 21/08/07 A
>111 22/08/07 A
>111 23/08/07 A
>111 24/08/07 A
>111 25/08/07 A
>111 26/08/07 A
Is this waht you want?
Select cat, count(*) from dly order by 1