Unique Records

  • Thread starter Thread starter carl
  • Start date Start date
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.
 
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
 
Back
Top