Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL QUESTION
ggstr wrote:
> i have a table with 3 fields : OBJECT,DATE,VALUE
> every object can have many values with different date
>
> i want to display only the last value for each object(date most recently)
> like this: object,date,value
>
> what is the good sql code to to this?
SELECT MAX(date)
,object ,value FROM mytable GROUP BY object ,value