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 -> Re: create view performance problem

Re: create view performance problem

From: Alexander I. Doroshko <aid_at_grant.kharkov.ua>
Date: 3 May 1999 10:34:42 GMT
Message-ID: <01be9550$8c1289a0$190114c1@sister.grant.UUCP>


Supposing you are to choose the max st_date from all rows having value=max_value

select
  a.symbol, max(st_date) st_date_for_max_value, max_value  from your_table a,
  (select symbol, max(value) max_value    from your_table
   group by symbol) b
 where
  a.symbol=b.symbol and value=max_value  group by
  a.symbol, max_value;

vagelis Hristidis <exrist_at_cc.ece.ntua.gr> wrote in article <7ghkpn$fqt$1_at_ulysses.noc.ntua.gr>...
: I have a table with columns :symbol, st_date,value
: and I would like to create a view with columns:
: symbol,st_date_for_max_value,max_value
: where there is one row for each stock symbol.

--
 Alexander I.Doroshko, aid_at_grant.kharkov.ua

Received on Mon May 03 1999 - 05:34:42 CDT

Original text of this message

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