Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create view performance problem
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
![]() |
![]() |