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


Top