SELECT Company, Plan, Count(*) ;
FROM mytable ;
GROUP BY Company, Plan ;
INTO CURSOR ComPlan
>I have a file of all the insured at several companies. I need summary data and im certain there must be sql to do it.
>
>I have this detail
>
>emp 1 comp 1 plan 1
>emp 2 comp 1 plan 1
>emp 3 comp 1 plan 2
>
>emp 4 comp 2 plan 1
>emp 5 comp 2 plan 2
>
>
>and I need to get to this
>
>comp 1 plan 1 2 emps
>comp 1 plan 2 1 emp
>
>comp 2 plan 1 1 emp
>comp 2 plan 2 1 emp
>
>where there is one summary line for each company for each so that the companies can print out and pay their bills.
>
>
>Any Ideas
>
>TIA
>Chris
--sb--