Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count two fields in a query but not count the duplicates?

Status
Not open for further replies.

dduva

Programmer
May 16, 2001
38
US
I have a query where I am selecting fields a, b, and c. I am grouping by a. I want to get a count of b and c. The problem is there are duplicates in b. Column c has no duplicates. How can I count all of column c, only the unique records in column b and group by a. Thanks in advance.

Devin
 
That worked. Didn't know I could put distinct inside the count.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top