I work in sql server 2000 and I'm doing a query to a "people" table, that has many duplicate records, does not have a primary key, that is, each time a person enters the system they have a record with a different age (the one that was recorded at the time of registration), I want to obtain only one record for each person, the last you have, that is, the oldest, but when using MAX, take the maximum of the entire table not from each person:
select distinct nombre,apellido,max(edad) from persona
that's what I have.