Duplicate value query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a table that has a list of User Names and references next to them, i
have a lot of duplicate records. For each of the users i want to count the
number of unique references.

I can do this using 2 queries, where the first one is a simple query with
the property for Unique Records set to Yes, and then have a second query that
groups the User Names and counts the records.

But is there a way to do this in 1 query?


All help is appreciated.
 
Check out query wizard.
--
***************************
If the message was helpful to you, click Yes next to Was this post helpful
to you?
If the post answers your question, click Yes next to Did this post answer
the question?
 
Yes it can be done. You can't do it in the query grid, but must build the
query in the SQL window

SELECT UserNames, Count(References)
FROM (SELECT Distinct UserNames, References
FROM YourTable) as UniqueNames
GROUP BY UserNames

If you need a more specific example,
Please copy and post the SQL of your existing queries

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message
 

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

Back
Top