I have a sql query in db oracle I want to output max value. SQL query contains unique field values
Sql query below contains duplicate rows:
select
field1,field2,field3,field4,field5,field6,field7,field8,field9,MAX(field10) as field10
from(
select
field1,field2,field3,field4,field5,field6,field7,field8,field9,field10
from table
)tabl
GROUP BY field1,field2,field3,field4,field5,field6,field7,field8,field9
I corrected sql request but it doesn't work.
Sql query below an error message is displayed :ORA-00942 table or view does not exist.
select
field1,field2,field3,field4,field5,field6,field7,field8,field9
,(SELECT MAX(field10) FROM tabl ) as field10
from(
select
field1,field2,field3,field4,field5,field6,field7,field8,field9,field10
from table
)tabl
how can i fix it? Thanks for your help!
,(SELECT MAX(field10) FROM tabl ) as field10
=> You meantable
nottabl
?? Because the aliastabl
is not valid in innerselect
field. – Utsav