Sunday, February 21, 2010

Schema Old Radio SQL: How Do I Select The Name Of The Oldest Person In A City For Each City?

SQL: How do I select the name of the oldest person in a city for each city? - schema old radio

How do I choose the name of the oldest person in a city by city? Imagine a table with the schema enumeration (name, age, place). I would like to choose the name and age of the oldest person in every city.

I've tried:
SELECT name, MAX (age) of the census City Group

but I'm not sure there is the correct data.

3 comments:

Anonymous said...

It looks good for me. Make sure that the column of age is a number or an integer, and * not * to varchar. Sorting numbers as strings are funky. Eg 100 comes before 11

Anonymous said...

It looks good for me. Make sure that the column of age is a number or an integer, and * not * to varchar. Sorting numbers as strings are funky. Eg 100 comes before 11

Anonymous said...

The Office does not indicate if this person has little chance of being identified. The board may determine the age of the oldest person in a particular city, but if you say that someone is probably in jail.

Post a Comment