Help with dups in query

T

TotallyConfused

I need help revising this query please. This works great. By sorting
Address in ascending order. However, there are instances where age and
gender are the same. I want only to return the first instance of the
address. Thank you.

SELECT Address, City, State, Zip
Max(Age) as The Age
MaxGender as The Gender
From DuplicateList
Group by Address, City, State, Zip
 
M

Maurice

Try this...

SELECT distinct Address, City, State, Zip
Max(Age) as The Age
MaxGender as The Gender
From DuplicateList
Group by Address, City, State, Zip
 

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

Similar Threads

Help with Query 2
Eliminating Dups??? 1
Query 2 tables 1
Please help with Query "dups" 7
Query return value is Null 4
Unique values in a query 2
Query to select individual records 4
Query Building 7

Top