Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Easy SQL question

Easy SQL question

From: <wbailey_at_pomb.com>
Date: Sun, 29 Nov 1998 22:53:11 GMT
Message-ID: <73sj8i$skv$1@nnrp1.dejanews.com>


Forgive my lack of SQL knowledge, but I can't figure this query out....

I have a table x with the following fields: Name, Age, Weight and Date. Each time a person is weighed, the record is not replaced, but just versioned by adding a new record with the same name, current age and new weight & date. What I need to do is, given a person's name, query the table to get the most recent weighing for each age. eg:
Name Age Weight Date


Joe    12   110      10/10/90
Joe    13   130      12/23/91

...

I can figure out how to retun the most recent weighing given the name, but I'm stuck on doing it for each age... any ideas?

Thanks for the help,
Bill

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sun Nov 29 1998 - 16:53:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US