Unique Records

C

carl

My data looks like this.

Product Sequence#
ABC 1
ABC 2
ABC 2
ABC 3
EFG 1
EFG 1
EFG 2
EFG 2
EFG 2


I am trying to create a qry that will give me a unique count of sequence
numbers for each of my products. Sort of like this:

Product UniqueCount
ABC 3
EFG 2

Thank you in advance.
 
B

Bob Barrows

carl said:
My data looks like this.

Product Sequence#
ABC 1
ABC 2
ABC 2
ABC 3
EFG 1
EFG 1
EFG 2
EFG 2
EFG 2


I am trying to create a qry that will give me a unique count of
sequence numbers for each of my products. Sort of like this:

Product UniqueCount
ABC 3
EFG 2
Not-so-simple grouping query. You first need to generate the unique
records. Create a saved query called UniqueSeqPerProduct:
SELECT DISTINCT Product, [Sequence#] FROM yourtable

To use the above sql, switch a query to SQL View and paste in the sql.
Fix yourtable, then save the query

Then create a new query that uses that saved query as its source:
SELECT DISTINCT Product, Count([Sequence#]) As UniqueCount FROM
UniqueSeqPerProduct
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top