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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL QUESTION

Re: SQL QUESTION

From: Mark <cdo_at_lambic.co.uk>
Date: Mon, 18 Sep 2000 18:36:11 GMT
Message-ID: <39C6608C.CC162A28@lambic.co.uk>

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

/ Received on Mon Sep 18 2000 - 13:36:11 CDT

Original text of this message

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