Subject Re: [ib-support] COUNT DISTINCT on a composite key
Author Helen Borrie
At 04:44 PM 1/05/2003 -0700, you wrote:
>I was wondering how to perform a distinct count when my table has a
>composite primary key. I naively thought something like this might work:
>
>SELECT COUNT( DISTINCT keyColumn1, keyColumn2 ) ....

Are you saying this doesn't work? If not, what's the exception?

But Select count(*) is all you need. The PK is by definition unique. Your
table will have exactly as many rows as there are distinct occurrences of
the key elements.

heLen