
Distinct Count on a Field?
The following select returns records that do not have distinct values
in field A.C. But I want the Count(A.C) to be distinct on this field
(all else remain the same). How can I make this count distinct without
affecting the rest of the results? If I can't in this one statement,
what is the best way to accomplish this?
TRANSFORM Sum(A.A)
SELECT C.P, A.B, Count(A.C), Sum(A.A)
FROM (C INNER JOIN B ON C.P = B.P) INNER JOIN A ON B.C = A.C
GROUP BY C.P, A.B
PIVOT A.D;
Thanks for the advice,
Eric