Distinct Count on a Field? 
Author Message
 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



Sun, 01 May 2005 23:27:23 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. select count(distinct field)

2. Select distinct on 1 field but returns multiple fields

3. Microsoft Access SQL: Distinct Count?

4. Does Access support SELECT Count(DISTINCT fieldname) ...

5. Why does SELECT COUNT(DISTINCT price) .. not work

6. count( distinct col ) in Access ?

7. "Count distinct"

8. select count distinct doesnt work

9. Get running count of distinct ID

10. distinct count

11. Distinct Count

12. Counting distinct records

 

 
Powered by phpBB® Forum Software