Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> query with Min function
I HAve a table (datitemppirisposta) (ORACLE)
it has 3 colums
DataInserimento, codicecontrollo, temporisposta
The first 2 colims are primary key.
I have to select "tempodirisposta" with the date nearest at other one taken as input
Es.
select
min(a.datainserimento), a.temporisposta
from
datitempirisposta where
a.codicecontrollo = 'C0005098' and
a.datainserimento > to_Date('01/06/2003','dd/mm/yyyy')
group by a.datainserimento, a.temporisposta
order by a.datainserimento
In this way i have got many rows instead i need only one row . Received on Fri Jul 11 2003 - 08:01:09 CDT