Help with dups in query

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